summaryrefslogtreecommitdiffstats
path: root/cmake/Version.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/Version.cmake')
-rw-r--r--cmake/Version.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmake/Version.cmake b/cmake/Version.cmake
index c121499..0f26944 100644
--- a/cmake/Version.cmake
+++ b/cmake/Version.cmake
@@ -31,7 +31,7 @@ macro(gen_project_version VERSION_INPUT_FILE VERSION_INPUT_FILE_TEMPLATE VERSION
endmacro(gen_project_version VERSION_INPUT_FILE VERSION_INPUT_FILE_TEMPLATE VERSION_OUTPUT_FILE)
# macro to get Git version information
-macro(get_repository_version REPOSITORY_VERSION REPOSITORY_BRANCH VERSION_HEADER_FILE VERSION_BUILD_TYPE GIT_EXECUTABLE REPOSITORY_DIR)
+macro(get_repository_version REPOSITORY_VERSION REPOSITORY_VERSION_SHORT REPOSITORY_BRANCH VERSION_HEADER_FILE VERSION_BUILD_TYPE GIT_EXECUTABLE REPOSITORY_DIR)
# set empty Git version information
set(GIT_VERSION "")
# set empty Git branch information
@@ -74,6 +74,8 @@ macro(get_repository_version REPOSITORY_VERSION REPOSITORY_BRANCH VERSION_HEADER
endif(${VERSION_BUILD_TYPE} MATCHES "Release")
endif(GIT_VERSION STREQUAL "")
+ set(${REPOSITORY_VERSION_SHORT} ${GIT_VERSION})
+
# get current branch of Git repository
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY ${REPOSITORY_DIR}