浏览代码

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).
Matt McCormick 11 年之前
父节点
当前提交
5922019802
共有 2 个文件被更改,包括 8 次插入0 次删除
  1. 4 0
      Modules/FindPythonInterp.cmake
  2. 4 0
      Modules/FindPythonLibs.cmake

+ 4 - 0
Modules/FindPythonInterp.cmake

@@ -27,6 +27,10 @@
 # of version numbers that should be taken into account when searching
 # of version numbers that should be taken into account when searching
 # for Python.  You need to set this variable before calling
 # for Python.  You need to set this variable before calling
 # find_package(PythonInterp).
 # 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.
 # Copyright 2005-2010 Kitware, Inc.

+ 4 - 0
Modules/FindPythonLibs.cmake

@@ -31,6 +31,10 @@
 #
 #
 #   PYTHON_LIBRARY             - path to the python library
 #   PYTHON_LIBRARY             - path to the python library
 #   PYTHON_INCLUDE_DIR         - path to where Python.h is found
 #   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.
 # Copyright 2001-2009 Kitware, Inc.