Fix T65852: Cmake fails with paths containing special characters.
MATHES performs a regular expression which in this case is unnecessary.
This commit is contained in:
@@ -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})
|
||||
|
Reference in New Issue
Block a user