]> granicus.if.org Git - icinga2/blobdiff - CMakeLists.txt
Disable notification feature for agent instances.
[icinga2] / CMakeLists.txt
index a54ed2000b9a9ef93f6050f4eabf24880d32980d..bebda7145de5d94b16e111fccfcc41521b1726ab 100644 (file)
@@ -1,5 +1,5 @@
 # Icinga 2
-# Copyright (C) 2012-2013 Icinga Development Team (http://www.icinga.org/)
+# Copyright (C) 2012-2014 Icinga Development Team (http://www.icinga.org)
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -16,6 +16,8 @@
 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
 cmake_minimum_required(VERSION 2.6)
+set(BOOST_MIN_VERSION "1.41.0")
+
 project(icinga2)
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
 
@@ -28,10 +30,10 @@ endif()
 file(STRINGS icinga2.spec VERSION_LINE REGEX "^Version: ")
 string(REPLACE "Version: " "" ICINGA2_VERSION ${VERSION_LINE})
 
-set(ICINGA2_USER "icinga")
-set(ICINGA2_GROUP "icinga")
-set(ICINGA2_COMMAND_USER "icinga")
-set(ICINGA2_COMMAND_GROUP "icingacmd")
+set(ICINGA2_USER "icinga" CACHE STRING "Icinga 2 user")
+set(ICINGA2_GROUP "icinga" CACHE STRING "Icinga 2 group")
+set(ICINGA2_COMMAND_USER "icinga" CACHE STRING "Icinga 2 command user")
+set(ICINGA2_COMMAND_GROUP "icingacmd" CACHE STRING "Icinga 2 command group")
 
 file(READ "${CMAKE_CURRENT_SOURCE_DIR}/COPYING" ICINGA2_LICENSE_GPL)
 file(READ "${CMAKE_CURRENT_SOURCE_DIR}/COPYING.Exceptions" ICINGA2_LICENSE_ADDITIONS)
@@ -42,7 +44,7 @@ set(CPACK_PACKAGE_CONTACT "Icinga Development Team")
 set(CPACK_PACKAGE_VERSION ${ICINGA2_VERSION})
 set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt")
 set(CPACK_WIX_UPGRADE_GUID "68C75073-7CEF-4FC9-8DA5-581758729696")
-set(CPACK_SOURCE_IGNORE_FILES "/.git/")
+set(CPACK_SOURCE_IGNORE_FILES "/.git/" "/debian/" "/.vagrant/" "/release/" "/debug/" "/build/" )
 include(CPack)
 
 include(GetGitRevisionDescription)
@@ -59,7 +61,8 @@ if(WIN32)
   add_definitions(-DBOOST_ALL_NO_LIB)
 endif()
 
-find_package(Boost 1.41.0 COMPONENTS thread system program_options regex REQUIRED)
+find_package(Boost ${BOOST_MIN_VERSION} COMPONENTS thread system program_options regex REQUIRED)
+
 link_directories(${Boost_LIBRARY_DIRS})
 include_directories(${Boost_INCLUDE_DIRS})
 
@@ -101,6 +104,7 @@ include(CheckLibraryExists)
 check_function_exists(vfork HAVE_VFORK)
 check_function_exists(backtrace_symbols HAVE_BACKTRACE_SYMBOLS)
 check_function_exists(pipe2 HAVE_PIPE2)
+check_library_exists(dl dladdr "dlfcn.h" HAVE_DLADDR)
 check_library_exists(crypto BIO_f_zlib "" HAVE_BIOZLIB)
 
 include(GNUInstallDirs)