diff --git a/CMakeLists.txt b/CMakeLists.txt index 51df9d6b6..a5aad0dd6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)