diff options
author | Marc Chevrier <marc.chevrier@sap.com> | 2018-03-05 15:27:26 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@sap.com> | 2018-03-20 08:29:55 (GMT) |
commit | 50b5e9ed1316f82976a45c5fb2b00d0d3a3e4438 (patch) | |
tree | c09daa8de0a151b6e79c44608365de413b7bad25 /Tests/RunCMake/UseSWIG | |
parent | 352baee2074d12637c65e3113f560bbf98d0640a (diff) | |
download | CMake-50b5e9ed1316f82976a45c5fb2b00d0d3a3e4438.zip CMake-50b5e9ed1316f82976a45c5fb2b00d0d3a3e4438.tar.gz CMake-50b5e9ed1316f82976a45c5fb2b00d0d3a3e4438.tar.bz2 |
CMake build: Use new FindPython module
Diffstat (limited to 'Tests/RunCMake/UseSWIG')
-rw-r--r-- | Tests/RunCMake/UseSWIG/BasicConfiguration.cmake | 7 | ||||
-rw-r--r-- | Tests/RunCMake/UseSWIG/BasicPython.cmake | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/Tests/RunCMake/UseSWIG/BasicConfiguration.cmake b/Tests/RunCMake/UseSWIG/BasicConfiguration.cmake index 94d8dd3..2f46d63 100644 --- a/Tests/RunCMake/UseSWIG/BasicConfiguration.cmake +++ b/Tests/RunCMake/UseSWIG/BasicConfiguration.cmake @@ -9,10 +9,9 @@ unset(SWIG_LANG_OPTIONS) unset(SWIG_LANG_LIBRARIES) if(${language} MATCHES python) - find_package(PythonInterp REQUIRED) - find_package(PythonLibs REQUIRED) - set(SWIG_LANG_INCLUDE_DIRECTORIES ${PYTHON_INCLUDE_PATH}) - set(SWIG_LANG_LIBRARIES ${PYTHON_LIBRARIES}) + find_package(Python REQUIRED COMPONENTS Interpreter Development) + set(SWIG_LANG_INCLUDE_DIRECTORIES ${Python_INCLUDE_DIRS}) + set(SWIG_LANG_LIBRARIES ${Python_LIBRARIES}) endif() if(${language} MATCHES perl) find_package(Perl REQUIRED) diff --git a/Tests/RunCMake/UseSWIG/BasicPython.cmake b/Tests/RunCMake/UseSWIG/BasicPython.cmake index 0d8c824..873dbe9 100644 --- a/Tests/RunCMake/UseSWIG/BasicPython.cmake +++ b/Tests/RunCMake/UseSWIG/BasicPython.cmake @@ -5,5 +5,5 @@ include (BasicConfiguration.cmake) add_custom_target (RunTest COMMAND "${CMAKE_COMMAND}" -E env "PYTHONPATH=$<TARGET_FILE_DIR:example>" - "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/runme.py" + "${Python_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/runme.py" DEPENDS example) |