blob: 1c788ce706720c5a7bf6d425544d9a283a0aa783 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
project("relabsd")
include(FindPkgConfig)
add_subdirectory(src)
# ${SRC_FILES} is recursively defined in the subdirectories.
# Each subdirectory only adds the source files that are present at its level.
add_executable(relabsd ${SRC_FILES})
pkg_search_module(LIBEVDEV REQUIRED libevdev)
include_directories(${LIBEVDEV_INCLUDE_DIRS})
target_link_libraries(relabsd ${LIBEVDEV_LIBRARIES})
target_compile_features(relabsd PUBLIC c_variadic_macros)
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")
endif (CMAKE_COMPILER_IS_GNUCC)
|