summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Schueller <schueller@phimeca.com>2013-11-21 14:50:21 +0100
committerBrad King <brad.king@kitware.com>2013-11-22 09:10:51 -0500
commit8c127c9e33f051f4bf7389c3627a0978135e99fe (patch)
treebb2081b300e33c50ae3726ecacf75eae959194fa
parent75bfe4cbd0a3d534d902a991558073ecf06c54e9 (diff)
downloadcmake-8c127c9e33f051f4bf7389c3627a0978135e99fe.tar.gz
FindSWIG: Use CMAKE_CURRENT_LIST_DIR instead of CMAKE_ROOT (#13771)
This is a simpler way to reference the location of UseSWIG.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 bb78bc2302..724ddcc1db 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