From 1c2508a569da51041db7345e0c9eb41aa6aaefd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ricks?= Date: Tue, 23 Aug 2011 09:36:17 +0200 Subject: 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) --- Modules/FindPythonInterp.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/FindPythonInterp.cmake b/Modules/FindPythonInterp.cmake index 7acf7be..a10ec23 100644 --- a/Modules/FindPythonInterp.cmake +++ b/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) -- cgit v0.12