Commit d71cfd12 authored by Volker Krause's avatar Volker Krause
Browse files

Fix application version display in tarball builds

parent cdb92186
......@@ -36,6 +36,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
ecm_setup_version(PROJECT VARIABLE_PREFIX ITINERARY VERSION_HEADER itinerary_version.h)
set(ITINERARY_DETAILED_VERSION_STRING "${ITINERARY_VERSION}")
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
find_package(Git)
set_package_properties(Git PROPERTIES TYPE OPTIONAL PURPOSE "Determine exact build version.")
......@@ -43,8 +44,6 @@ if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE _git_rev)
string(REGEX REPLACE "\n" "" _git_rev "${_git_rev}")
set(ITINERARY_DETAILED_VERSION_STRING "${ITINERARY_VERSION} (${_git_rev})")
else ()
set(ITINERARY_DETAILED_VERSION_STRING "${ITINERARY_VERSION}")
endif()
endif()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment