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:
parent
d179500295
commit
1c2508a569
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue