From ee48214209e66aa8c6f353262b175895373f76df Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Sat, 4 Jan 2020 21:31:55 +0100 Subject: ... --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index f5da0f6..1f76a90 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ include(FindPkgConfig) # ${SRC_FILES} is recursively defined in the subdirectories. # Each subdirectory adds only the source files that are present at its level. -file(GLOB_RECURSE SRC_FILES src/ true *.c) +file(GLOB_RECURSE SRC_FILES src/ true src/*.c) add_executable(relabsd ${SRC_FILES}) include_directories(include/) @@ -21,10 +21,14 @@ pkg_search_module(LIBEVDEV REQUIRED libevdev) include_directories(${LIBEVDEV_INCLUDE_DIRS}) target_link_libraries(relabsd ${LIBEVDEV_LIBRARIES}) +# We use pthreads. +find_package(Threads) +target_link_libraries(relabsd ${CMAKE_THREAD_LIBS_INIT}) + # Be loud about dubious code. if (CMAKE_COMPILER_IS_GNUCC) message(STATUS "CMake is using GNUCC. Verbose flags are activated.") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic -Wextra") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic -Werror -Wextra") endif (CMAKE_COMPILER_IS_GNUCC) option( -- cgit v1.2.3-70-g09d2