FindSWIG: Use CMAKE_CURRENT_LIST_DIR instead of CMAKE_ROOT (#13771)
This is a simpler way to reference the location of UseSWIG.cmake.
This commit is contained in:
parent
75bfe4cbd0
commit
8c127c9e33
|
@ -56,7 +56,7 @@ if(SWIG_EXECUTABLE)
|
|||
set(SWIG_DIR SWIG_DIR-NOTFOUND)
|
||||
find_path(SWIG_DIR swig.swg PATHS ${SWIG_swiglib_output})
|
||||
if(SWIG_DIR)
|
||||
set(SWIG_USE_FILE ${CMAKE_ROOT}/Modules/UseSWIG.cmake)
|
||||
set(SWIG_USE_FILE ${CMAKE_CURRENT_LIST_DIR}/UseSWIG.cmake)
|
||||
execute_process(COMMAND ${SWIG_EXECUTABLE} -version
|
||||
OUTPUT_VARIABLE SWIG_version_output
|
||||
ERROR_VARIABLE SWIG_version_output
|
||||
|
|
Loading…
Reference in New Issue