summaryrefslogtreecommitdiff
path: root/cmake/Anope.cmake
diff options
context:
space:
mode:
authorNaram Qashat <cyberbotx@cyberbotx.com>2012-09-22 03:45:51 -0400
committerNaram Qashat <cyberbotx@cyberbotx.com>2012-09-22 03:45:51 -0400
commitd30e53ee2c87ae1fdeb276a3a79b82370e36f7b0 (patch)
treeac91b0af2a4bc98b9c83cdca3e3a57032dbcd513 /cmake/Anope.cmake
parentaa57ad608235fa86dec794beaac50fa0f78bf4cb (diff)
OK, so the FIND sub-command of string() in CMake was only added with 2.8.5, change this to use the REGEX sub-commands instead. Also while I'm at it, make -pthread only get added when not on Mac OS X, it's auto-included there.
Diffstat (limited to 'cmake/Anope.cmake')
-rw-r--r--cmake/Anope.cmake6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmake/Anope.cmake b/cmake/Anope.cmake
index fa6c133d6..252d54ca3 100644
--- a/cmake/Anope.cmake
+++ b/cmake/Anope.cmake
@@ -395,10 +395,12 @@ macro(calculate_depends SRC SKIP)
# This used to be find_in_list, but it was changed to this loop to do a find on each default include directory, this fixes Mac OS X trying to get it's framework directories in here
set(FOUND_IN_DEFAULTS -1)
foreach(DEFAULT_INCLUDE_DIR ${DEFAULT_INCLUDE_DIRS})
+ string(REGEX REPLACE "\\+" "\\\\+" DEFAULT_INCLUDE_DIR ${DEFAULT_INCLUDE_DIR})
+ string(REGEX MATCH ${DEFAULT_INCLUDE_DIR} FOUND_DEFAULT ${FOUND_${FILENAME}_INCLUDE})
string(FIND ${FOUND_${FILENAME}_INCLUDE} ${DEFAULT_INCLUDE_DIR} FOUND_DEFAULT)
- if(NOT FOUND_DEFAULT EQUAL -1)
+ if(FOUND_DEFAULT)
set(FOUND_IN_DEFAULTS 0)
- endif(NOT FOUND_DEFAULT EQUAL -1)
+ endif(FOUND_DEFAULT)
endforeach(DEFAULT_INCLUDE_DIR)
if(FOUND_IN_DEFAULTS EQUAL -1)
find_in_list(${ARGV2} "${FOUND_${FILENAME}_INCLUDE}" FOUND_IN_INCLUDES)