Don't install orphan supplementary files

This commit is contained in:
Přemysl Eric Janouch 2023-07-04 02:46:33 +02:00
parent 7e30dfb6f0
commit 87e5285622
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 15 additions and 13 deletions

View File

@ -71,21 +71,23 @@ include (GNUInstallDirs)
set (SYSTEMD_UNITDIR /lib/systemd/system set (SYSTEMD_UNITDIR /lib/systemd/system
CACHE PATH "Base directory for systemd unit files") CACHE PATH "Base directory for systemd unit files")
configure_file (${PROJECT_SOURCE_DIR}/fancontrol-ng.service.in if ("${CMAKE_SYSTEM_NAME}" STREQUAL Linux)
configure_file (${PROJECT_SOURCE_DIR}/fancontrol-ng.service.in
${PROJECT_BINARY_DIR}/fancontrol-ng.service @ONLY) ${PROJECT_BINARY_DIR}/fancontrol-ng.service @ONLY)
install (FILES fancontrol-ng.conf.example install (FILES fancontrol-ng.conf.example
DESTINATION ${CMAKE_INSTALL_DATADIR}/fancontrol-ng) DESTINATION ${CMAKE_INSTALL_DATADIR}/fancontrol-ng)
configure_file (${PROJECT_SOURCE_DIR}/priod.service.in configure_file (${PROJECT_SOURCE_DIR}/priod.service.in
${PROJECT_BINARY_DIR}/priod.service @ONLY) ${PROJECT_BINARY_DIR}/priod.service @ONLY)
install (FILES priod.conf.example install (FILES priod.conf.example
DESTINATION ${CMAKE_INSTALL_DATADIR}/priod) DESTINATION ${CMAKE_INSTALL_DATADIR}/priod)
# System-wide unit files should be installed under /lib and not /usr/lib # System-wide unit files should be installed under /lib and not /usr/lib
install (FILES install (FILES
${PROJECT_BINARY_DIR}/fancontrol-ng.service ${PROJECT_BINARY_DIR}/fancontrol-ng.service
${PROJECT_BINARY_DIR}/priod.service ${PROJECT_BINARY_DIR}/priod.service
DESTINATION "${SYSTEMD_UNITDIR}") DESTINATION "${SYSTEMD_UNITDIR}")
endif ()
if (WITH_GDM) if (WITH_GDM)
install (TARGETS gdm-switch-user DESTINATION ${CMAKE_INSTALL_BINDIR}) install (TARGETS gdm-switch-user DESTINATION ${CMAKE_INSTALL_BINDIR})