cmake - strip version string

This commit is contained in:
mhochsteger@cerbsim.com 2021-11-08 11:02:12 +01:00
parent dc2eb66d43
commit 0d4028ea7a

View File

@ -28,6 +28,7 @@ if(status AND NOT status EQUAL 0)
set(git_version_string "v6.2.0.0")
endif()
endif()
string(STRIP ${git_version_string} git_version_string)
string(REGEX REPLACE "^v([0-9]+)\\..*" "\\1" NETGEN_VERSION_MAJOR "${git_version_string}")
string(REGEX REPLACE "^v[0-9]+\\.([0-9]+).*" "\\1" NETGEN_VERSION_MINOR "${git_version_string}")