diff --git a/Modules/FindSWIG.cmake b/Modules/FindSWIG.cmake index 55f4c0d8b..8bd4048ee 100644 --- a/Modules/FindSWIG.cmake +++ b/Modules/FindSWIG.cmake @@ -52,8 +52,6 @@ if(SWIG_EXECUTABLE) endif() else() 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} NO_CMAKE_FIND_ROOT_PATH) if(SWIG_DIR) set(SWIG_USE_FILE ${CMAKE_CURRENT_LIST_DIR}/UseSWIG.cmake)