aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2023-07-04 02:46:33 +0200
committerPřemysl Eric Janouch <p@janouch.name>2023-07-04 02:46:33 +0200
commit87e52856223a0e310b292389ba732b4b8d35e2c8 (patch)
tree315f4a82273c6ae56a08e8eb136c7d63bb412832 /CMakeLists.txt
parent7e30dfb6f0194d83bc78b67664fbf3231cc8d2bd (diff)
downloaddesktop-tools-87e52856223a0e310b292389ba732b4b8d35e2c8.tar.gz
desktop-tools-87e52856223a0e310b292389ba732b4b8d35e2c8.tar.xz
desktop-tools-87e52856223a0e310b292389ba732b4b8d35e2c8.zip
Don't install orphan supplementary files
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt32
1 files changed, 17 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0e18b66..27dab0c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -71,21 +71,23 @@ include (GNUInstallDirs)
set (SYSTEMD_UNITDIR /lib/systemd/system
CACHE PATH "Base directory for systemd unit files")
-configure_file (${PROJECT_SOURCE_DIR}/fancontrol-ng.service.in
- ${PROJECT_BINARY_DIR}/fancontrol-ng.service @ONLY)
-install (FILES fancontrol-ng.conf.example
- DESTINATION ${CMAKE_INSTALL_DATADIR}/fancontrol-ng)
-
-configure_file (${PROJECT_SOURCE_DIR}/priod.service.in
- ${PROJECT_BINARY_DIR}/priod.service @ONLY)
-install (FILES priod.conf.example
- DESTINATION ${CMAKE_INSTALL_DATADIR}/priod)
-
-# System-wide unit files should be installed under /lib and not /usr/lib
-install (FILES
- ${PROJECT_BINARY_DIR}/fancontrol-ng.service
- ${PROJECT_BINARY_DIR}/priod.service
- DESTINATION "${SYSTEMD_UNITDIR}")
+if ("${CMAKE_SYSTEM_NAME}" STREQUAL Linux)
+ configure_file (${PROJECT_SOURCE_DIR}/fancontrol-ng.service.in
+ ${PROJECT_BINARY_DIR}/fancontrol-ng.service @ONLY)
+ install (FILES fancontrol-ng.conf.example
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/fancontrol-ng)
+
+ configure_file (${PROJECT_SOURCE_DIR}/priod.service.in
+ ${PROJECT_BINARY_DIR}/priod.service @ONLY)
+ install (FILES priod.conf.example
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/priod)
+
+ # System-wide unit files should be installed under /lib and not /usr/lib
+ install (FILES
+ ${PROJECT_BINARY_DIR}/fancontrol-ng.service
+ ${PROJECT_BINARY_DIR}/priod.service
+ DESTINATION "${SYSTEMD_UNITDIR}")
+endif ()
if (WITH_GDM)
install (TARGETS gdm-switch-user DESTINATION ${CMAKE_INSTALL_BINDIR})