]> granicus.if.org Git - icinga2/commitdiff
Add support for FreeBSD and DragonFlyBSD
authorLars Engels <lars.engels@0x20.net>
Thu, 13 Nov 2014 21:36:38 +0000 (22:36 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Fri, 14 Nov 2014 09:43:51 +0000 (10:43 +0100)
refs #7680

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
etc/CMakeLists.txt
third-party/cmake/GNUInstallDirs.cmake

index 08d781a7505476e0871200d4736ef060a9a76354..a5dd4fbd83d7b5798f39fd679813e1155bf57965 100644 (file)
@@ -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)
index 1a52c2ecb58c64f9771510f4d40dea826f208926..afdd3f1fe88e60c7e9040c1ac472093363f8edeb 100644 (file)
@@ -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")