FindSWIG: allow to provide SWIG_DIR (#3498)

This commit is contained in:
Julien Schueller 2013-12-01 01:20:46 +01:00
parent f0b3502a65
commit 5d3b0bb501
1 changed files with 0 additions and 2 deletions

View File

@ -52,8 +52,6 @@ if(SWIG_EXECUTABLE)
endif() endif()
else() else()
string(REGEX REPLACE "[\n\r]+" ";" SWIG_swiglib_output ${SWIG_swiglib_output}) 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) find_path(SWIG_DIR swig.swg PATHS ${SWIG_swiglib_output} NO_CMAKE_FIND_ROOT_PATH)
if(SWIG_DIR) if(SWIG_DIR)
set(SWIG_USE_FILE ${CMAKE_CURRENT_LIST_DIR}/UseSWIG.cmake) set(SWIG_USE_FILE ${CMAKE_CURRENT_LIST_DIR}/UseSWIG.cmake)