Browse Source

cmake: Fix parsing of OBS_VERSION_OVERRIDE cache variable

PatTheMav 2 years ago
parent
commit
3bfaf6661b
1 changed files with 2 additions and 1 deletions
  1. 2 1
      cmake/common/versionconfig.cmake

+ 2 - 1
cmake/common/versionconfig.cmake

@@ -46,7 +46,8 @@ if(NOT DEFINED OBS_VERSION_OVERRIDE)
   endif()
 else()
   if(OBS_VERSION_OVERRIDE MATCHES "([0-9]+)\\.([0-9]+)\\.([0-9]+).*")
-    string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+).*" "\\1;\\2;\\3" _obs_version_canonical ${_obs_version})
+    string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+).*" "\\1;\\2;\\3" _obs_version_canonical
+                         ${OBS_VERSION_OVERRIDE})
     set(_obs_version ${OBS_VERSION_OVERRIDE})
   else()
     message(FATAL_ERROR "Invalid version supplied - must be <MAJOR>.<MINOR>.<PATCH>.")