From 9217ea3143af9893af3825522e7f1064692cc722 Mon Sep 17 00:00:00 2001 From: Lars Engels Date: Thu, 13 Nov 2014 22:36:38 +0100 Subject: [PATCH] Add support for FreeBSD and DragonFlyBSD refs #7680 Signed-off-by: Gunnar Beutner --- etc/CMakeLists.txt | 9 +++++++-- third-party/cmake/GNUInstallDirs.cmake | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/etc/CMakeLists.txt b/etc/CMakeLists.txt index 08d781a75..a5dd4fbd8 100644 --- a/etc/CMakeLists.txt +++ b/etc/CMakeLists.txt @@ -20,7 +20,10 @@ include(InstallConfig) configure_file(icinga/icinga-classic-apache.conf.cmake ${CMAKE_CURRENT_BINARY_DIR}/icinga/icinga-classic-apache.conf @ONLY) configure_file(icinga2/init.conf.cmake ${CMAKE_CURRENT_BINARY_DIR}/icinga2/init.conf @ONLY) configure_file(icinga2/constants.conf.cmake ${CMAKE_CURRENT_BINARY_DIR}/icinga2/constants.conf @ONLY) -configure_file(logrotate.d/icinga2.cmake ${CMAKE_CURRENT_BINARY_DIR}/logrotate.d/icinga2 @ONLY) + +if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + configure_file(logrotate.d/icinga2.cmake ${CMAKE_CURRENT_BINARY_DIR}/logrotate.d/icinga2 @ONLY) +endif() install_if_not_exists(${CMAKE_CURRENT_BINARY_DIR}/icinga2/init.conf ${CMAKE_INSTALL_SYSCONFDIR}/icinga2) install_if_not_exists(icinga2/icinga2.conf ${CMAKE_INSTALL_SYSCONFDIR}/icinga2) @@ -79,6 +82,8 @@ else() ) endif() -add_subdirectory(initsystem) +if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + add_subdirectory(initsystem) +endif() set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}" PARENT_SCOPE) diff --git a/third-party/cmake/GNUInstallDirs.cmake b/third-party/cmake/GNUInstallDirs.cmake index 1a52c2ecb..afdd3f1fe 100644 --- a/third-party/cmake/GNUInstallDirs.cmake +++ b/third-party/cmake/GNUInstallDirs.cmake @@ -166,7 +166,7 @@ if(NOT CMAKE_INSTALL_DATADIR) set(CMAKE_INSTALL_DATADIR "${CMAKE_INSTALL_DATAROOTDIR}") endif() -if(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") +if(CMAKE_SYSTEM_NAME MATCHES "(DragonFly|FreeBSD|OpenBSD)") if(NOT CMAKE_INSTALL_INFODIR) set(CMAKE_INSTALL_INFODIR "" CACHE PATH "info documentation (info)") set(CMAKE_INSTALL_INFODIR "info") -- 2.40.0