From 59220198022d2e081ddba164c1ec62a6e9d438eb Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Thu, 13 Mar 2014 11:19:11 -0400 Subject: FindPython*: Document suggested find_package order (#13794) Document in both FindPythonInterp.cmake and FindPythonLibs.cmake that find_package(PythonInterp) should be called before find_package(PythonLibs). --- Modules/FindPythonInterp.cmake | 4 ++++ Modules/FindPythonLibs.cmake | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Modules/FindPythonInterp.cmake b/Modules/FindPythonInterp.cmake index 780cda8..f8ff5d8 100644 --- a/Modules/FindPythonInterp.cmake +++ b/Modules/FindPythonInterp.cmake @@ -27,6 +27,10 @@ # of version numbers that should be taken into account when searching # for Python. You need to set this variable before calling # find_package(PythonInterp). +# +# If also calling find_package(PythonLibs), call find_package(PythonInterp) +# first to get the currently active Python version by default with a consistent +# version of PYTHON_LIBRARIES. #============================================================================= # Copyright 2005-2010 Kitware, Inc. diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake index 656ed7b..1f90f5b 100644 --- a/Modules/FindPythonLibs.cmake +++ b/Modules/FindPythonLibs.cmake @@ -31,6 +31,10 @@ # # PYTHON_LIBRARY - path to the python library # PYTHON_INCLUDE_DIR - path to where Python.h is found +# +# If also calling find_package(PythonInterp), call find_package(PythonInterp) +# first to get the currently active Python version by default with a consistent +# version of PYTHON_LIBRARIES. #============================================================================= # Copyright 2001-2009 Kitware, Inc. -- cgit v0.12