1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-18 12:28:31 +01:00

Oops - add the git revision information even when forced

This commit is contained in:
David Sansome 2012-02-28 19:33:14 +00:00
parent d21cd0edd7
commit 50c0cd78a3

View File

@ -121,6 +121,7 @@ endif(CLEMENTINE_VERSION_PRERELEASE)
# Add git revision # Add git revision
if(FORCE_GIT_REVISION) if(FORCE_GIT_REVISION)
set(GIT_REV ${FORCE_GIT_REVISION}) set(GIT_REV ${FORCE_GIT_REVISION})
set(GIT_INFO_RESULT 0)
else(FORCE_GIT_REVISION) else(FORCE_GIT_REVISION)
find_program(GIT_EXECUTABLE git) find_program(GIT_EXECUTABLE git)
@ -130,8 +131,10 @@ else(FORCE_GIT_REVISION)
OUTPUT_VARIABLE GIT_REV OUTPUT_VARIABLE GIT_REV
ERROR_QUIET ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE) OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
endif()
if(${GIT_INFO_RESULT} EQUAL 0) if(${GIT_INFO_RESULT} EQUAL 0)
string(REGEX REPLACE "^(.+)-([0-9]+)-(g[a-f0-9]+)$" "\\1;\\2;\\3" string(REGEX REPLACE "^(.+)-([0-9]+)-(g[a-f0-9]+)$" "\\1;\\2;\\3"
GIT_PARTS ${GIT_REV}) GIT_PARTS ${GIT_REV})
@ -146,9 +149,7 @@ else(FORCE_GIT_REVISION)
list(GET GIT_PARTS 2 GIT_SHA1) list(GET GIT_PARTS 2 GIT_SHA1)
set(HAS_GET_REVISION ON) set(HAS_GET_REVISION ON)
endif(GIT_PARTS_LENGTH EQUAL 3) endif(GIT_PARTS_LENGTH EQUAL 3)
endif(${GIT_INFO_RESULT} EQUAL 0) endif(${GIT_INFO_RESULT} EQUAL 0)
endif(NOT GIT_EXECUTABLE-NOTFOUND)
endif(FORCE_GIT_REVISION)
if(INCLUDE_GIT_REVISION AND HAS_GET_REVISION) if(INCLUDE_GIT_REVISION AND HAS_GET_REVISION)
set(CLEMENTINE_VERSION_DISPLAY "${GIT_REV}") set(CLEMENTINE_VERSION_DISPLAY "${GIT_REV}")