diff --git a/Sources/Plasma/Apps/plClient/CMakeLists.txt b/Sources/Plasma/Apps/plClient/CMakeLists.txt index 4ddd933197..024da1f1df 100644 --- a/Sources/Plasma/Apps/plClient/CMakeLists.txt +++ b/Sources/Plasma/Apps/plClient/CMakeLists.txt @@ -18,15 +18,15 @@ if(MOVIE_AVAILABLE) endif() # Test for Python Interpreter, which will be used for extra build scripts if available -find_package(PythonInterp) -set_package_properties(PythonInterp PROPERTIES +find_package(Python2) +set_package_properties(Python2 PROPERTIES URL "http://www.python.org" DESCRIPTION "Python Scripting language interpreter" TYPE OPTIONAL PURPOSE "Used to (re-)build some client resource files" ) -if(PYTHONINTERP_FOUND) +if(Python2_Interpreter_FOUND) include(FindPythonModule) # Test for Python modules needed to build resource.dat find_python_module(rsvg) diff --git a/cmake/FindPythonModule.cmake b/cmake/FindPythonModule.cmake index d17cefb1fb..e74520979d 100644 --- a/cmake/FindPythonModule.cmake +++ b/cmake/FindPythonModule.cmake @@ -3,7 +3,7 @@ # From http://ompl.hg.sourceforge.net/hgweb/ompl/ompl/file/tip/CMakeModules/FindPython.cmake -if(DEFINED PYTHON_EXECUTABLE) +if(Python2_Interpreter_FOUND) function(find_python_module module) string(TOUPPER ${module} module_upper) @@ -13,7 +13,7 @@ function(find_python_module module) endif() # A module's location is usually a directory, but for binary modules # it's a .so file. - execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" + execute_process(COMMAND "${Python2_EXECUTABLE}" "-c" "import re, ${module}; print re.compile('/__init__.py.*').sub('',${module}.__file__)" RESULT_VARIABLE _${module}_status OUTPUT_VARIABLE _${module}_location @@ -26,4 +26,4 @@ function(find_python_module module) find_package_handle_standard_args(PY_${module} DEFAULT_MSG PY_${module_upper}) endfunction(find_python_module) -endif(DEFINED PYTHON_EXECUTABLE) +endif()