Fixed git TAG matching, falling back to short hash if no tag exists.

Setting windows version patch level to build number now.
Setting windows version description to GIT_REVISION.
This commit is contained in:
Armin Novak
2014-10-09 16:14:24 +02:00
parent 43faf76a96
commit 8f74e90807

View File

@@ -77,7 +77,10 @@ if(ANDROID OR IOS)
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
endif(ANDROID OR IOS)
include(GetGitRevisionDescription)
git_describe(GIT_REVISION --match "[0-9]*" --abbrev=4 --tags --always)
git_get_exact_tag(GIT_REVISION --tags --always)
if (${GIT_REVISION} STREQUAL "n/a")
git_rev_parse(GIT_REVISION --short)
endif()
if(ANDROID OR IOS)
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
endif(ANDROID OR IOS)
@@ -239,6 +242,9 @@ if(WIN32)
# Set product and vendor for dll and exe version information.
set(RC_VERSION_VENDOR "FreeRDP")
set(RC_VERSION_PRODUCT "FreeRDP")
set(RC_VERSION_PATCH ${BUILD_NUMBER})
set(RC_VERSION_DESCRIPTION ${GIT_REVISION})
string(TIMESTAMP RC_VERSION_YEAR "%Y")
if(NOT DEFINED CMAKE_WINDOWS_VERSION)