FindPythonLibs: Modernize debug and release variant handling
FindPythonLibs
uses PYTHON_LIBRARY
and PYTHON_DEBUG_LIBRARY
as cache entries and then maps them to PYTHON_LIBRARY_{DEBUG,RELEASE}
for select_library_configurations
.
The name PYTHON_DEBUG_LIBRARY
is documented as deprecated because it shouldn't be used by project code, but it is still a user-facing cache entry that can be set. Also, it only exists on Windows.
The logic should be modernized to use PYTHON_LIBRARY_{DEBUG,RELEASE}
cache entries, or perhaps PYTHON_LIBRARY{,_DEBUG}
, and the multiple variants made to work on all platforms. Compatibility with scripts that set the old cache entry names must be maintained. One should also ensure interaction with FindPythonInterp
is unchanged.