mirror of https://github.com/PCSX2/pcsx2.git
CMake: Set version based on git tag
This commit is contained in:
parent
be05c95026
commit
e1a6304e32
|
@ -57,7 +57,10 @@ function(get_git_version_info)
|
|||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET)
|
||||
endif()
|
||||
if(PCSX2_GIT_REV)
|
||||
if ("${PCSX2_GIT_TAG}" MATCHES "^v([0-9]+)\\.([0-9]+)\\.([0-9]+)$")
|
||||
string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" PCSX2_VERSION_LONG "${PCSX2_GIT_TAG}")
|
||||
string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" PCSX2_VERSION_SHORT "${PCSX2_GIT_TAG}")
|
||||
elseif(PCSX2_GIT_REV)
|
||||
set(PCSX2_VERSION_LONG "${PCSX2_GIT_REV}")
|
||||
string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?(-[a-z][a-z0-9]+)?" PCSX2_VERSION_SHORT "${PCSX2_VERSION_LONG}")
|
||||
else()
|
||||
|
|
Loading…
Reference in New Issue