[cmake-developers] Fix for re-running FindPythonLibs with multiple configurations
Brad King
brad.king at kitware.com
Fri Apr 1 13:20:35 EDT 2016
On 03/31/2016 10:31 PM, Richard Christie wrote:
> So I've attached an improved fix, which is much simpler:
> it determines whether PYTHON_LIBRARY is a list and extracts
> the optimized library out of it.
Thanks. Please try this code instead:
# If we ran before and reported multiple configurations then PYTHON_LIBRARY
# is a list "optimized;PYTHON_LIBRARY;debug;PYTHON_LIBRARY_DEBUG". Extract
# the original value so we can re-construct the list properly later.
if(";${PYTHON_LIBRARY};" MATCHES ";optimized;([^;]+);")
set(PYTHON_LIBRARY "${CMAKE_MATCH_1}")
endif()
Thanks,
-Brad
More information about the cmake-developers
mailing list