]> granicus.if.org Git - icinga2/commitdiff
cmake: Improve ICINGA2_VERSION_SAFE for pre-releases
authorMarkus Frosch <markus.frosch@icinga.com>
Thu, 25 Jul 2019 08:49:11 +0000 (10:49 +0200)
committerMarkus Frosch <markus.frosch@icinga.com>
Fri, 26 Jul 2019 07:34:53 +0000 (09:34 +0200)
CMakeLists.txt

index 29bc81838d59831585685de856b5c9336a2d2a09..735e553f7bb5802d4a501d6f17d19eae48f33e78 100644 (file)
@@ -111,6 +111,8 @@ endif()
 
 # NuGet on Windows requires a semantic versioning, example: 2.10.4.123 (only 4 element, only numeric)
 string(REGEX REPLACE "-([0-9]+).*$" ".\\1" ICINGA2_VERSION_SAFE "${ICINGA2_VERSION}")
+string(REGEX REPLACE "-[^\\.]*(.*)$" "\\1" ICINGA2_VERSION_SAFE "${ICINGA2_VERSION_SAFE}")
+message(STATUS "ICINGA2_VERSION_SAFE=${ICINGA2_VERSION_SAFE}")
 
 if(WIN32)
   set(Boost_USE_STATIC_LIBS ON)