aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2018-04-10 09:27:22 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2018-04-10 09:27:22 +0800
commitdd96de7379d68659eed8b4c795da1e4b57d3e734 (patch)
tree9a5cad0c413402bb2fdde627f9dc81f29ee1f371 /CMakeLists.txt
parent6bdb9028af9a5256fbb47b942843e49aef7e3aa1 (diff)
downloadlightsd-dd96de7379d68659eed8b4c795da1e4b57d3e734.tar.xz
Hopefully fixed some segmentation faults.
Added init script for OpenRC. Fixed compiler warnings.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e8733c0..8b5e17e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,3 +7,12 @@ find_package(Threads REQUIRED)
add_executable(${PROJECT_NAME} ${SOURCES})
target_link_libraries(${PROJECT_NAME} stdc++fs)
target_link_libraries(${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT})
+install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin)
+find_package(PkgConfig)
+pkg_check_modules(OPENRC "openrc")
+install(FILES lightsd.conf DESTINATION /etc COMPONENT config)
+if(OPENRC_FOUND)
+ #configure_file(lightsd.openrc )
+ install(PROGRAMS lightsd.openrc DESTINATION /etc/init.d RENAME lightsd
+ COMPONENT config)
+endif()