Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-04-03 11:48:33 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-04-03 11:48:33 +0400
commit744a3b9cb26a734487264eec3e9e6dacb28daa73 (patch)
treeaa3f1bf27ad45027c1a5ac3473ce8af1959c76a9 /build_files
parent5c8234c81caf72b4424571e958be3337a6900fc7 (diff)
fix cmake for when BLENDER_VERSION_CHAR is not set.
Diffstat (limited to 'build_files')
-rw-r--r--build_files/cmake/macros.cmake7
1 files changed, 6 insertions, 1 deletions
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()