Support builds outside the git dir.

Oops.
This commit is contained in:
Unknown W. Brackets 2013-03-02 16:15:13 -08:00
parent 62ab4b7f51
commit 6ca4f2f508

View File

@ -5,6 +5,7 @@ set(GIT_VERSION_UPDATE "1")
find_package(Git)
if(GIT_FOUND)
execute_process(COMMAND ${GIT_EXECUTABLE} describe --always
WORKING_DIRECTORY ${SOURCE_DIR}
RESULT_VARIABLE exit_code
OUTPUT_VARIABLE GIT_VERSION)
if(NOT ${exit_code} EQUAL 0)