-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
34 lines (22 loc) · 947 Bytes
/
CMakeLists.txt
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
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3)
# Global vars
SET(CMAKE_PROJECT_NAME "LockscreenHotKeyDaemon")
SET(EXECUTABLE_NAME "lhkd")
SET(EXECUTABLE_VERSION_MAJOR "0")
SET(EXECUTABLE_VERSION_MINOR "2")
SET(EXECUTABLE_VERSION_PATCH "0")
SET(EXECUTABLE_VERSION "${EXECUTABLE_VERSION_MAJOR}.${EXECUTABLE_VERSION_MINOR}.${EXECUTABLE_VERSION_PATCH}")
# Search all .cpp files within src - recursive!
# You can add all source files by hand here too
file(GLOB_RECURSE SRCS "src/*.cpp")
# Add compiler flags
set(CMAKE_C_FLAGS "-Wall -Wextra -pedantic -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wcast-align -Wstrict-overflow=5 -Wwrite-strings -Wcast-qual -Wswitch-default -Wswitch-enum -Wconversion -Wunreachable-code -fno-inline")
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=c++11 -O0 -g")
ADD_EXECUTABLE(
${EXECUTABLE_NAME}
${SRCS}
)
# TODO properly find these libraries
TARGET_LINK_LIBRARIES(
${EXECUTABLE_NAME} X11 Xi xkbcommon
)