-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
50 lines (42 loc) · 1.28 KB
/
CMakeLists.txt
File metadata and controls
50 lines (42 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Specify a minimum version
cmake_minimum_required (VERSION 2.6 FATAL_ERROR)
# Specify project name
project (synergy-linux C)
# Set version numbers
set (PROJECT_VERSION_MAJOR 0)
set (PROJECT_VERSION_MINOR 0)
set (PROJECT_VERSION_PATCH 1)
# Set directories
set(PROJECT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(PROJECT_BINARY_DIR ${CMAKE_BINARY_DIR}/bin)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/synergy)
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/synergy)
# Add included directories
include_directories("${PROJECT_SOURCE_DIR}/include")
# Add compiler flags
set(PROJECT_DEBUG_FLAGS "-g")
set(PROJECT_LINKER_FLAGS "-ldl -lpthread")
set(PROJECT_SOURCE_FLAGS "-ansi -std=c99 -pedantic -Wall")
set(CMAKE_C_FLAGS " \
${PROJECT_DEBUG_FLAGS} \
${PROJECT_SOURCE_FLAGS} \
${PROJECT_LINKER_FLAGS} \
")
# Setup list of source files
set(PROJECT_SOURCES
src/main.c
src/server.c
src/device.c
src/plugin.c
src/event.c
src/interface.c
src/payload.c
)
# Add subdirectory for plugins
add_subdirectory("plugins/get_notif")
add_subdirectory("plugins/logger")
add_subdirectory("plugins/display_notif")
add_subdirectory("plugins/display_events")
# Add executable
add_executable (${PROJECT_NAME} ${PROJECT_SOURCES})
target_link_libraries(${PROJECT_NAME} ${PROJECT_LINKER_FLAGS})