[Bf-blender-cvs] [5e768200c23] master: Fix T65852: Cmake fails with paths containing special characters.

mano-wii noreply at git.blender.org
Tue Jun 18 05:16:54 CEST 2019


Commit: 5e768200c234bde37846ddcb6e77578c750b926b
Author: mano-wii
Date:   Mon Jun 17 23:55:01 2019 -0300
Branches: master
https://developer.blender.org/rB5e768200c234bde37846ddcb6e77578c750b926b

Fix T65852: Cmake fails with paths containing special characters.

MATHES performs a regular expression which in this case is unnecessary.

===================================================================

M	build_files/cmake/macros.cmake

===================================================================

diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 5b995763111..f65dd174486 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -179,7 +179,8 @@ function(blender_source_group
       # remove ../'s
       get_filename_component(_SRC_DIR ${_SRC} REALPATH)
       get_filename_component(_SRC_DIR ${_SRC_DIR} DIRECTORY)
-      if(${_SRC_DIR} MATCHES "${CMAKE_CURRENT_SOURCE_DIR}/")
+      string(FIND ${_SRC_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/" _POS)
+      if(NOT _POS EQUAL -1)
         string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" GROUP_ID ${_SRC_DIR})
         string(REPLACE "/" "\\" GROUP_ID ${GROUP_ID})
         source_group("${GROUP_ID}" FILES ${_SRC})



More information about the Bf-blender-cvs mailing list