Fix icinga-version.h in dist tarballs.

Fixes #5226
This commit is contained in:
Gunnar Beutner 2013-11-27 10:35:48 +01:00
parent fa0e1e66a2
commit 4ff308c948
1 changed files with 7 additions and 2 deletions

View File

@ -42,12 +42,17 @@ set(CPACK_PACKAGE_CONTACT "Icinga Development Team")
set(CPACK_PACKAGE_VERSION ${ICINGA2_VERSION}) set(CPACK_PACKAGE_VERSION ${ICINGA2_VERSION})
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt") set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt")
set(CPACK_WIX_UPGRADE_GUID "68C75073-7CEF-4FC9-8DA5-581758729696") set(CPACK_WIX_UPGRADE_GUID "68C75073-7CEF-4FC9-8DA5-581758729696")
set(CPACK_SOURCE_IGNORE_FILES "/.git/")
include(CPack) include(CPack)
include(GetGitRevisionDescription) include(GetGitRevisionDescription)
set(GIT_VERSION ${CPACK_PACKAGE_VERSION})
git_describe(GIT_VERSION --tags) git_describe(GIT_VERSION --tags)
configure_file(icinga-version.h.cmake icinga-version.h) if(GIT_VERSION MATCHES "-NOTFOUND$")
configure_file(icinga-version.h.fallback ${CMAKE_CURRENT_BINARY_DIR}/icinga-version.h COPYONLY)
else()
configure_file(icinga-version.h.cmake icinga-version.h)
configure_file(${CMAKE_CURRENT_BINARY_DIR}/icinga-version.h ${CMAKE_CURRENT_SOURCE_DIR}/icinga-version.h.fallback COPYONLY)
endif()
if(WIN32) if(WIN32)
set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_STATIC_LIBS ON)