From 5e768200c234bde37846ddcb6e77578c750b926b Mon Sep 17 00:00:00 2001 From: mano-wii Date: Mon, 17 Jun 2019 23:55:01 -0300 Subject: Fix T65852: Cmake fails with paths containing special characters. MATHES performs a regular expression which in this case is unnecessary. --- build_files/cmake/macros.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '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}) -- cgit v1.2.3