Make the port build with CMake < 3.1.0 after r375840.

Of course the part of the patch I wrote myself had to be wrong. Adjust the
regexp to make it look like the others and work with all CMake versions.
This commit is contained in:
Raphael Kubo da Costa 2014-12-31 11:29:58 +00:00
parent 768a0013b1
commit 6fc6ad078d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=375876

View file

@ -63,8 +63,8 @@ Tested with 3.1.0-rc3
foreach(FILEPATH ${FILEPATHS})
- if(${FILEPATH} MATCHES "^([^/]*)//${FILENAME}")
- string(REGEX REPLACE "^([^/]*)//${FILENAME}" "\\1" ${MODULE_PREFIX}_SUBMODULE ${FILEPATH})
+ if(${FILEPATH} MATCHES "^([^/]*)/${FILENAME}")
+ string(REGEX REPLACE "^([^/]*)/${FILENAME}" "\\1" ${MODULE_PREFIX}_SUBMODULE ${FILEPATH})
+ if(${FILEPATH} MATCHES "^([^/]*)/+${FILENAME}")
+ string(REGEX REPLACE "^([^/]*)/+${FILENAME}" "\\1" ${MODULE_PREFIX}_SUBMODULE ${FILEPATH})
set(${MODULE_PREFIX}_SUBMODULES ${${MODULE_PREFIX}_SUBMODULES} ${${MODULE_PREFIX}_SUBMODULE})
endif()
endforeach(FILEPATH)