mirror of
https://github.com/ohwgiles/laminar.git
synced 2024-10-27 20:34:20 +00:00
cmake: fix install path of /etc/laminar.conf
This commit is contained in:
parent
a1a95c8e7f
commit
8c3d7f62a9
@ -1,5 +1,5 @@
|
|||||||
###
|
###
|
||||||
### Copyright 2015-2021 Oliver Giles
|
### Copyright 2015-2024 Oliver Giles
|
||||||
###
|
###
|
||||||
### This file is part of Laminar
|
### This file is part of Laminar
|
||||||
###
|
###
|
||||||
@ -164,8 +164,8 @@ target_link_libraries(laminard CapnProto::capnp-rpc CapnProto::capnp CapnProto::
|
|||||||
CapnProto::kj Threads::Threads SQLite::SQLite3 ZLIB::ZLIB)
|
CapnProto::kj Threads::Threads SQLite::SQLite3 ZLIB::ZLIB)
|
||||||
|
|
||||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
||||||
pkg_check_modules(INOTIFY REQUIRED libinotify)
|
pkg_check_modules(INOTIFY REQUIRED libinotify)
|
||||||
target_link_libraries(laminard ${INOTIFY_LINK_LIBRARIES})
|
target_link_libraries(laminard ${INOTIFY_LINK_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
## Client
|
## Client
|
||||||
@ -194,16 +194,16 @@ if(BUILD_TESTS)
|
|||||||
target_link_libraries(laminar-tests ${GTEST_LIBRARIES} capnp-rpc capnp kj-http kj-async kj pthread sqlite3 z)
|
target_link_libraries(laminar-tests ${GTEST_LIBRARIES} capnp-rpc capnp kj-http kj-async kj pthread sqlite3 z)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(SYSTEMD_UNITDIR /lib/systemd/system CACHE PATH "Path to systemd unit files")
|
|
||||||
set(BASH_COMPLETIONS_DIR /usr/share/bash-completion/completions CACHE PATH "Path to bash completions directory")
|
set(BASH_COMPLETIONS_DIR /usr/share/bash-completion/completions CACHE PATH "Path to bash completions directory")
|
||||||
set(ZSH_COMPLETIONS_DIR /usr/share/zsh/site-functions CACHE PATH "Path to zsh completions directory")
|
set(ZSH_COMPLETIONS_DIR /usr/share/zsh/site-functions CACHE PATH "Path to zsh completions directory")
|
||||||
install(TARGETS laminard RUNTIME DESTINATION sbin)
|
install(TARGETS laminard RUNTIME DESTINATION sbin)
|
||||||
install(TARGETS laminarc RUNTIME DESTINATION bin)
|
install(TARGETS laminarc RUNTIME DESTINATION bin)
|
||||||
install(FILES etc/laminarc-completion.bash DESTINATION ${CMAKE_INSTALL_PREFIX}${BASH_COMPLETIONS_DIR} RENAME laminarc)
|
install(FILES etc/laminar.conf DESTINATION /etc)
|
||||||
install(FILES etc/laminarc-completion.zsh DESTINATION ${CMAKE_INSTALL_PREFIX}${ZSH_COMPLETIONS_DIR} RENAME _laminarc)
|
install(FILES etc/laminarc-completion.bash DESTINATION ${BASH_COMPLETIONS_DIR} RENAME laminarc)
|
||||||
|
install(FILES etc/laminarc-completion.zsh DESTINATION ${ZSH_COMPLETIONS_DIR} RENAME _laminarc)
|
||||||
|
|
||||||
if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||||
install(FILES etc/laminar.conf DESTINATION ${CMAKE_INSTALL_PREFIX}/etc)
|
set(SYSTEMD_UNITDIR /lib/systemd/system CACHE PATH "Path to systemd unit files")
|
||||||
configure_file(etc/laminar.service.in laminar.service @ONLY)
|
configure_file(etc/laminar.service.in laminar.service @ONLY)
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/laminar.service DESTINATION ${CMAKE_INSTALL_PREFIX}${SYSTEMD_UNITDIR})
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/laminar.service DESTINATION ${SYSTEMD_UNITDIR})
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user