summaryrefslogtreecommitdiffstats
path: root/Modules/FindSWIG.cmake
diff options
context:
space:
mode:
authorJulien Schueller <schueller@phimeca.com>2013-11-21 13:50:21 (GMT)
committerBrad King <brad.king@kitware.com>2013-11-22 14:10:51 (GMT)
commit8c127c9e33f051f4bf7389c3627a0978135e99fe (patch)
treebb2081b300e33c50ae3726ecacf75eae959194fa /Modules/FindSWIG.cmake
parent75bfe4cbd0a3d534d902a991558073ecf06c54e9 (diff)
downloadCMake-8c127c9e33f051f4bf7389c3627a0978135e99fe.zip
CMake-8c127c9e33f051f4bf7389c3627a0978135e99fe.tar.gz
CMake-8c127c9e33f051f4bf7389c3627a0978135e99fe.tar.bz2
FindSWIG: Use CMAKE_CURRENT_LIST_DIR instead of CMAKE_ROOT (#13771)
This is a simpler way to reference the location of UseSWIG.cmake.
Diffstat (limited to 'Modules/FindSWIG.cmake')
-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..724ddcc 100644
--- a/Modules/FindSWIG.cmake
+++ b/Modules/FindSWIG.cmake
@@ -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