pass patch number to the engine

This commit is contained in:
MihailRis 2026-11-01 17:30:34 +03:00
parent e370ec6495
commit 3e22dd6329
7 changed files with 48 additions and 7 deletions

View file

@ -12,6 +12,14 @@ option(VOXELENGINE_BUILD_TESTS "Build tests" OFF)
add_compile_definitions(VC_BUILD_NAME="${VC_BUILD_NAME}")
set(VC_VERSION_PATCH "" CACHE STRING "Engine version patch number")
if(NOT VC_VERSION_PATCH STREQUAL "")
if(NOT VC_VERSION_PATCH MATCHES "^[0-9]+$")
message(FATAL_ERROR "invalid VC_VERSION_PATCH: '${VC_VERSION_PATCH}'")
endif()
add_compile_definitions(VC_VERSION_PATCH=${VC_VERSION_PATCH})
endif()
# Need for static compilation on Windows with MSVC clang TODO: Make single build
# on Windows to avoid dependence on combinations of platforms and compilers and
# make it independent