Browse Source

Use FIND_PACKAGE_HANDLE_STANDARD_ARGS second mode

Using the second mode of FIND_PACKAGE_HANDLE_STANDARD_ARGS allows for
checking the version number. Now a user can require a minimum version of
the python interpreter with find_package(PythonInterp VERSION)
Björn Ricks 14 years ago
parent
commit
1c2508a569
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Modules/FindPythonInterp.cmake

+ 1 - 1
Modules/FindPythonInterp.cmake

@@ -61,6 +61,6 @@ endif()
 # handle the QUIETLY and REQUIRED arguments and set PYTHONINTERP_FOUND to TRUE if
 # all listed variables are TRUE
 include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonInterp DEFAULT_MSG PYTHON_EXECUTABLE)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonInterp REQUIRED_VARS PYTHON_EXECUTABLE VERSION_VAR PYTHON_VERSION_STRING)
 
 mark_as_advanced(PYTHON_EXECUTABLE)