1
0
mirror of https://github.com/binary-kitchen/doorlockd synced 2024-11-16 20:19:13 +01:00
doorlockd-mirror/doorlockd/CMakeLists.txt

49 lines
1.4 KiB
CMake
Raw Normal View History

2015-05-11 00:18:22 +02:00
cmake_minimum_required(VERSION 2.8)
project(doorlockd)
option(USE_COLORIZED_LOGS "Colorized logging" ON)
add_definitions(-std=c++11)
configure_file (
"${PROJECT_SOURCE_DIR}/config.h.in"
"${PROJECT_BINARY_DIR}/config.h"
)
2015-05-12 17:35:57 +02:00
include_directories(${PROJECT_BINARY_DIR})
include_directories(${Boost_INCLUDE_DIRS})
2015-05-11 00:18:22 +02:00
2015-05-12 16:10:26 +02:00
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -ggdb -Wall -pedantic -Weffc++ -Wextra")
set(CMAKE_CXX_FLAGS "-O2 -Wall -pedantic -Wextra -Weffc++")
set(CMAKE_C_FLAGS_DEBUG "-O0 -ggdb -Wall -pedantic -Wextra")
set(CMAKE_C_FLAGS "-O2 -Wall -pedantic -Wextra")
2015-05-13 16:20:12 +02:00
find_package(Boost 1.55.0 COMPONENTS program_options system REQUIRED)
find_package (Threads)
2015-05-12 16:10:26 +02:00
2015-05-11 00:18:22 +02:00
set(SRCS
main.cpp
logger.cpp
door.cpp
epaper.cpp
logic.cpp
util.cpp
2015-05-14 15:33:40 +02:00
daemon.cpp
2015-05-11 00:18:22 +02:00
epaper/Display_COG_Process.c
epaper/Display_Controller.c
epaper/Display_Hardware_Driver.c
epaper/bsp.c
)
add_executable(doorlockd ${SRCS})
2015-05-13 16:20:12 +02:00
target_link_libraries(doorlockd wiringPi jsoncpp ldap ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
2015-05-14 15:33:40 +02:00
install(TARGETS doorlockd DESTINATION sbin/)
install(FILES img/template.png DESTINATION share/doorlockd/)
install(DIRECTORY scripts/ DESTINATION share/doorlockd/
FILES_MATCHING PATTERN "scripts/doorlockd-*"
PERMISSIONS WORLD_EXECUTE WORLD_READ OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE OWNER_WRITE)
2015-05-14 15:33:40 +02:00
install(FILES scripts/doorlockd.service DESTINATION /etc/systemd/system/)
install(FILES scripts/doorlockd DESTINATION /etc/sysconfig/)