mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-18 04:19:55 +01:00
Fix a cmake error when getting the git revision number of an exact tag checkout
(cherry picked from commit 9e2e035ae1
)
This commit is contained in:
parent
5b60c9adcd
commit
5abfdf4eb0
@ -139,10 +139,13 @@ else(FORCE_GIT_REVISION)
|
|||||||
message(FATAL_ERROR "Failed to parse git revision string '${GIT_REV}'")
|
message(FATAL_ERROR "Failed to parse git revision string '${GIT_REV}'")
|
||||||
endif(NOT GIT_PARTS)
|
endif(NOT GIT_PARTS)
|
||||||
|
|
||||||
list(GET GIT_PARTS 0 GIT_TAGNAME)
|
list(LENGTH GIT_PARTS GIT_PARTS_LENGTH)
|
||||||
list(GET GIT_PARTS 1 GIT_COMMITCOUNT)
|
if(GIT_PARTS_LENGTH EQUAL 3)
|
||||||
list(GET GIT_PARTS 2 GIT_SHA1)
|
list(GET GIT_PARTS 0 GIT_TAGNAME)
|
||||||
set(HAS_GET_REVISION ON)
|
list(GET GIT_PARTS 1 GIT_COMMITCOUNT)
|
||||||
|
list(GET GIT_PARTS 2 GIT_SHA1)
|
||||||
|
set(HAS_GET_REVISION ON)
|
||||||
|
endif(GIT_PARTS_LENGTH EQUAL 3)
|
||||||
endif(${GIT_INFO_RESULT} EQUAL 0)
|
endif(${GIT_INFO_RESULT} EQUAL 0)
|
||||||
endif(NOT GIT_EXECUTABLE-NOTFOUND)
|
endif(NOT GIT_EXECUTABLE-NOTFOUND)
|
||||||
endif(FORCE_GIT_REVISION)
|
endif(FORCE_GIT_REVISION)
|
||||||
|
Loading…
Reference in New Issue
Block a user