diff options
Diffstat (limited to 'Tests/RunCMake')
-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) |