diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index 4a9c55d81cd..24dc058c4b0 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -350,7 +350,12 @@ macro(get_blender_version) message(FATAL_ERROR "Version parsing failed for BLENDER_SUBVERSION") endif() - if(NOT ${_out_version_char} MATCHES "[a-z]+") + # clumsy regex, only single char are ok but it could be unset + + string(LENGTH "${_out_version_char}" _out_version_char_len) + if(NOT _out_version_char_len EQUAL 1) + set(_out_version_char "") + elseif(NOT ${_out_version_char} MATCHES "[a-z]+") message(FATAL_ERROR "Version parsing failed for BLENDER_VERSION_CHAR") endif()