summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorJulien Schueller <schueller@phimeca.com>2013-11-21 13:00:11 (GMT)
committerBrad King <brad.king@kitware.com>2013-11-22 14:09:43 (GMT)
commit19b7a54d351f41a9e92d46a9e13911a0b0b223bb (patch)
tree1d0c72394444b8d38fed332894c20cbcd5882f34 /Modules
parent75bfe4cbd0a3d534d902a991558073ecf06c54e9 (diff)
downloadCMake-19b7a54d351f41a9e92d46a9e13911a0b0b223bb.zip
CMake-19b7a54d351f41a9e92d46a9e13911a0b0b223bb.tar.gz
CMake-19b7a54d351f41a9e92d46a9e13911a0b0b223bb.tar.bz2
FindSWIG: Search for swig.swg only on host (#13449)
Use NO_CMAKE_FIND_ROOT_PATH to ensure swig.swg can be found on the host even when cross-compiling.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindSWIG.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindSWIG.cmake b/Modules/FindSWIG.cmake
index bb78bc2..f7ad2f5 100644
--- a/Modules/FindSWIG.cmake
+++ b/Modules/FindSWIG.cmake
@@ -54,7 +54,7 @@ if(SWIG_EXECUTABLE)
string(REGEX REPLACE "[\n\r]+" ";" SWIG_swiglib_output ${SWIG_swiglib_output})
# force the path to be computed each time in case SWIG_EXECUTABLE has changed.
set(SWIG_DIR SWIG_DIR-NOTFOUND)
- find_path(SWIG_DIR swig.swg PATHS ${SWIG_swiglib_output})
+ find_path(SWIG_DIR swig.swg PATHS ${SWIG_swiglib_output} NO_CMAKE_FIND_ROOT_PATH)
if(SWIG_DIR)
set(SWIG_USE_FILE ${CMAKE_ROOT}/Modules/UseSWIG.cmake)
execute_process(COMMAND ${SWIG_EXECUTABLE} -version