diff --git a/source/D2CommonDefinitions/CMakeLists.txt b/source/D2CommonDefinitions/CMakeLists.txt index 7358c8a7..8a4dbb86 100644 --- a/source/D2CommonDefinitions/CMakeLists.txt +++ b/source/D2CommonDefinitions/CMakeLists.txt @@ -38,11 +38,12 @@ if(D2MOO_ORDINALS_VERSION) cmake_print_variables(D2MOO_ORDINAL_VERSION_MAJOR D2MOO_ORDINAL_VERSION_MINOR D2MOO_ORDINAL_VERSION_PATCH D2MOO_ORDINAL_VERSION_SPECIAL D2MOO_ORDINAL_VERSION_DEFINE_NAME) + string(REGEX REPLACE "^0+" "" D2MOO_ORDINAL_VERSION_MINOR_NO_LEADING_ZEROS ${D2MOO_ORDINAL_VERSION_MINOR}) target_compile_definitions(D2CommonDefinitions INTERFACE ${D2MOO_ORDINAL_VERSION_DEFINE_NAME} D2_VERSION_MAJOR=${D2MOO_ORDINAL_VERSION_MAJOR} - D2_VERSION_MINOR=${D2MOO_ORDINAL_VERSION_MINOR} + D2_VERSION_MINOR=${D2MOO_ORDINAL_VERSION_MINOR_NO_LEADING_ZEROS} D2_VERSION_PATCH='${D2MOO_ORDINAL_VERSION_PATCH}' # Allow only single character $<$>:D2_VERSION_SPECIAL="${D2MOO_ORDINAL_VERSION_SPECIAL}"> )