Dear CMake developers! I have had to modify Module FindPythonLibs.cmake to correctly find the Python debug and release libraries on Windows (for Python 3.5).
A problem with the current version is that it always copies the current
PYTHON_LIBRARY to PYTHON_LIBRARY_RELEASE:
set(PYTHON_LIBRARY_RELEASE "${PYTHON_LIBRARY}")
this means when find_package(PythonLibs) is called multiple times when both
release and debug python libraries are present, it nests the full
multi-configuration library list within a new multi-configuration library list,
so after getting the expected multi-configuration result:
optimized;RELEASE_LIBRARY;debug;DEBUG_LIBRARY
you get after a second call:
optimised;optimized;RELEASE_LIBRARY;debug;DEBUG_LIBRARY;debug;DEBUG_LIBRARY
and so on.
The attached patch fixes this nesting issue. It is slightly more symmetric in
its treatment of DEBUG and RELEASE, however it relies on a RELEASE library
variable existing from the last run to avoid copying a list into the
PYTHON_RELEASE_LIBRARY variable, and allows only a single library to be
pre-specified. These issues are somewhat unsatisfactory to me and there may be
a better idiom for dealing with pre-specified multi-configuration libraries.
Regards,
Richard
0001-Fix-FindPythonLibs-for-multiple-configurations.patch
Description: 0001-Fix-FindPythonLibs-for-multiple-configurations.patch
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
