aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
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()