Fix .git/ dir detection on git-version.cmake.

This commit is contained in:
sergiobenrocha2 2015-09-21 01:03:36 -03:00
parent 906b62037a
commit 989ec11158

View File

@ -3,7 +3,7 @@ set(GIT_VERSION "unknown")
set(GIT_VERSION_UPDATE "1")
find_package(Git)
if(GIT_FOUND AND EXISTS ".git")
if(GIT_FOUND AND EXISTS "${SOURCE_DIR}/.git/")
execute_process(COMMAND ${GIT_EXECUTABLE} describe --always
WORKING_DIRECTORY ${SOURCE_DIR}
RESULT_VARIABLE exit_code