This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, next has been updated via ba41887aaf0d36f696c67b06ff9965b74728ff30 (commit) via a12d8a03af8430d0a570c97deb200e16830568eb (commit) from da7df841c1bfd82d9b21592f708ce4a090cf7d75 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ba41887aaf0d36f696c67b06ff9965b74728ff30 commit ba41887aaf0d36f696c67b06ff9965b74728ff30 Merge: da7df84 a12d8a0 Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Dec 15 09:35:51 2016 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Thu Dec 15 09:35:51 2016 -0500 Merge topic 'FindPythonLibs-tolerate-components' into next a12d8a03 FindPythonLibs: Tolerate call with PYTHON_LIBRARY already a list https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a12d8a03af8430d0a570c97deb200e16830568eb commit a12d8a03af8430d0a570c97deb200e16830568eb Author: Francois Budin <francois.bu...@gmail.com> AuthorDate: Tue Dec 13 22:29:46 2016 -0500 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Dec 15 09:34:48 2016 -0500 FindPythonLibs: Tolerate call with PYTHON_LIBRARY already a list `PYTHON_LIBRARY` may contain a list because of `SelectLibraryConfigurations`. If it is the case, the list can be: optimized;<FILEPATH_TO_RELEASE_LIBRARY>;debug;<FILEPATH_TO_DEBUG_LIBRARY> Instead of directly using the value of `PYTHON_LIBRARY` in the CMake function `get_filename_component()`, we loop over the content of the relevant parts of `PYTHON_LIBRARY` and `PYTHON_DEBUG_LIBRARY` whether they are lists or not. Suggested-by: Brad King <brad.k...@kitware.com> diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake index cd623cf..63ec9a8 100644 --- a/Modules/FindPythonLibs.cmake +++ b/Modules/FindPythonLibs.cmake @@ -168,12 +168,19 @@ foreach(_CURRENT_VERSION ${_Python_VERSIONS}) # Use the library's install prefix as a hint set(_Python_INCLUDE_PATH_HINT) - get_filename_component(_Python_PREFIX ${PYTHON_LIBRARY} PATH) - get_filename_component(_Python_PREFIX ${_Python_PREFIX} PATH) - if(_Python_PREFIX) - set(_Python_INCLUDE_PATH_HINT ${_Python_PREFIX}/include) - endif() - unset(_Python_PREFIX) + # PYTHON_LIBRARY may contain a list because of SelectLibraryConfigurations + # which may have been run previously. If it is the case, the list can be: + # optimized;<FILEPATH_TO_RELEASE_LIBRARY>;debug;<FILEPATH_TO_DEBUG_LIBRARY> + foreach(lib ${PYTHON_LIBRARY} ${PYTHON_DEBUG_LIBRARY}) + if(IS_ABSOLUTE "${lib}") + get_filename_component(_Python_PREFIX "${lib}" PATH) + get_filename_component(_Python_PREFIX "${_Python_PREFIX}" PATH) + if(_Python_PREFIX) + list(APPEND _Python_INCLUDE_PATH_HINT ${_Python_PREFIX}/include) + endif() + unset(_Python_PREFIX) + endif() + endforeach() # Add framework directories to the search paths set(PYTHON_FRAMEWORK_INCLUDES) ----------------------------------------------------------------------- Summary of changes: Modules/FindPythonLibs.cmake | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits