Patchup pybin11 FindPythonLibsNew for MSVC

This commit is contained in:
Seth Hillbrand 2021-04-23 16:00:44 -07:00
parent c0bc6b1107
commit d585b6580d
1 changed files with 2 additions and 0 deletions

View File

@ -188,6 +188,8 @@ if(CMAKE_HOST_WIN32)
if(NOT EXISTS "${PYTHON_LIBRARY}")
get_filename_component(_PYTHON_ROOT ${PYTHON_INCLUDE_DIR} DIRECTORY)
set(PYTHON_LIBRARY "${_PYTHON_ROOT}/libs/python${PYTHON_LIBRARY_SUFFIX}.lib")
elseif(DEFINED VCPKG_TOOLCHAIN AND NOT EXISTS "${PYTHON_LIBRARY}")
set(PYTHON_LIBRARY "${PYTHON_PREFIX}/../../lib/python${PYTHON_LIBRARY_SUFFIX}.lib")
endif()
# if we are in MSYS & MINGW, and we didn't find windows python lib, look for system python lib