From 19b7a54d351f41a9e92d46a9e13911a0b0b223bb Mon Sep 17 00:00:00 2001 From: Julien Schueller Date: Thu, 21 Nov 2013 14:00:11 +0100 Subject: [PATCH] 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. --- Modules/FindSWIG.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/FindSWIG.cmake b/Modules/FindSWIG.cmake index bb78bc2302..f7ad2f53be 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