cmake: strip prefixed versions when passed in

This commit is contained in:
2 * r + 2 * t 2025-08-28 20:58:42 +10:00
parent 8e37337c4c
commit f39bcb0cd0

View file

@ -10,9 +10,9 @@ if(NOT DEFINED VERSION)
if("${VERSION}" STREQUAL "") if("${VERSION}" STREQUAL "")
message(FATAL_ERROR "VERSION is not set and failed to get from git") message(FATAL_ERROR "VERSION is not set and failed to get from git")
endif() endif()
endif()
string(REGEX REPLACE "^v" "" VERSION "${VERSION}") string(REGEX REPLACE "^v" "" VERSION "${VERSION}")
endif()
project(caelestia-shell VERSION ${VERSION} LANGUAGES CXX) project(caelestia-shell VERSION ${VERSION} LANGUAGES CXX)