aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authortadly <git@tadly.de>2017-08-18 19:07:29 +0200
committertadly <git@tadly.de>2017-09-12 09:16:35 +0200
commit7186f1233826cb8468d6f0bcae78b13bbb5e89d5 (patch)
treede452052d472ad4e9580fb80074a18b4ce87c168 /cmake
parent4c43b6a414458648b24a960ae35448388f131570 (diff)
don't use regex matching
If the path within `${PROJECT_SOURCE_DIR}`contains special characters (e.g. `+`), the build will fail as they get interpreted by regex
Diffstat (limited to 'cmake')
-rw-r--r--cmake/scripts/common/AddonHelpers.cmake6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmake/scripts/common/AddonHelpers.cmake b/cmake/scripts/common/AddonHelpers.cmake
index 92cd0b1389..0a879d6bf1 100644
--- a/cmake/scripts/common/AddonHelpers.cmake
+++ b/cmake/scripts/common/AddonHelpers.cmake
@@ -52,7 +52,8 @@ macro (build_addon target prefix libs)
# Read used headers from addon, needed to identitfy used kodi addon interface headers
if(${prefix}_HEADERS)
# Add the used header files defined with CMakeLists.txt from addon itself
- if(${prefix}_HEADERS MATCHES ${PROJECT_SOURCE_DIR})
+ string(FIND "${${prefix}_HEADERS}" "${PROJECT_SOURCE_DIR}" position)
+ if(position GREATER -1)
# include path name already complete
list(APPEND USED_SOURCES ${${prefix}_HEADERS})
else()
@@ -75,7 +76,8 @@ macro (build_addon target prefix libs)
endif()
# Add the used source files defined with CMakeLists.txt from addon itself
- if(${prefix}_SOURCES MATCHES ${PROJECT_SOURCE_DIR})
+ string(FIND "${${prefix}_SOURCES}" "${PROJECT_SOURCE_DIR}" position)
+ if(position GREATER -1)
# include path name already complete
list(APPEND USED_SOURCES ${${prefix}_SOURCES})
else()