mirror of
https://gitee.com/houstudio/Cdroid.git
synced 2024-12-04 13:18:10 +08:00
fix get_git_version
This commit is contained in:
parent
44f3b3a560
commit
c6d998ccaf
@ -88,7 +88,7 @@ function(get_git_version VERSION MAJOR MINOR PATCH COMMITCOUNT COMMITID)
|
||||
|
||||
# Extract MAJOR, MINOR, PATCH from VERSION if MAJOR, MINOR, PATCH are provided
|
||||
if(DEFINED MAJOR AND DEFINED MINOR AND DEFINED PATCH)
|
||||
string(REGEX MATCHALL "([0-9]+)\\.([0-9]+)\\.([0-9]+)" matches ${CDVERSION})
|
||||
string(REGEX MATCHALL "([0-9]+)\\.([0-9]+)(\\.[0-9]+)?" matches ${CDVERSION})
|
||||
set(${MAJOR} ${CMAKE_MATCH_1} PARENT_SCOPE)
|
||||
set(${MINOR} ${CMAKE_MATCH_2} PARENT_SCOPE)
|
||||
if(CMAKE_MATCH_3)
|
||||
|
Loading…
Reference in New Issue
Block a user