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)
This commit is contained in:
Björn Ricks 2011-08-23 09:36:17 +02:00
parent d179500295
commit 1c2508a569
1 changed files with 1 additions and 1 deletions

View File

@ -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)