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")
+set(ICINGA2_GIT_VERSION_INFO ON CACHE BOOL "Whether to use git describe")
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/COPYING" ICINGA2_LICENSE_GPL)
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/COPYING.Exceptions" ICINGA2_LICENSE_ADDITIONS)
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/icinga-version.h.force)
configure_file(icinga-version.h.force ${CMAKE_CURRENT_BINARY_DIR}/icinga-version.h COPYONLY)
else()
- if(GIT_VERSION MATCHES "-NOTFOUND$")
+ if(NOT ICINGA2_GIT_VERSION_INFO OR GIT_VERSION MATCHES "-NOTFOUND$")
file(STRINGS icinga2.spec SPEC_VERSION REGEX "^Version:")
string(SUBSTRING ${SPEC_VERSION} 9 -1 SPEC_VERSION)
set(GIT_VERSION "r${SPEC_VERSION}")
source directory is contained in a Git repository. Otherwise the version number
is extracted from the icinga2.spec file. This behavior can be overridden by
creating a file called "icinga-version.h.force" in the source directory.
+Alternatively the -DICINGA2_GIT_VERSION_INFO=ON option for CMake can be used to
+disable the usage of "git describe".
Use "git archive" to build the release tarball: