cmake: Improve ICINGA2_VERSION_SAFE for pre-releases

This commit is contained in:
Markus Frosch 2019-07-25 10:49:11 +02:00
parent bb2ad99cf3
commit 2b891fd1eb
1 changed files with 2 additions and 0 deletions

View 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)