diff --git a/cmake/Pcsx2Utils.cmake b/cmake/Pcsx2Utils.cmake index fc3eada5b2..6a70b906af 100644 --- a/cmake/Pcsx2Utils.cmake +++ b/cmake/Pcsx2Utils.cmake @@ -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()