File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -208,7 +208,9 @@ string(REGEX REPLACE "\\\\" "/" PYTHON_PREFIX "${PYTHON_PREFIX}")
208208string (REGEX REPLACE "\\\\ " "/" PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_DIR} " )
209209string (REGEX REPLACE "\\\\ " "/" PYTHON_SITE_PACKAGES "${PYTHON_SITE_PACKAGES} " )
210210
211- if (CMAKE_HOST_WIN32 )
211+ if (DEFINED PYTHON_LIBRARY)
212+ # Don't write to PYTHON_LIBRARY if it's already set
213+ elseif (CMAKE_HOST_WIN32 )
212214 set (PYTHON_LIBRARY "${PYTHON_PREFIX} /libs/python${PYTHON_LIBRARY_SUFFIX} .lib" )
213215
214216 # when run in a venv, PYTHON_PREFIX points to it. But the libraries remain in the
@@ -274,7 +276,7 @@ if(NOT PYTHON_DEBUG_LIBRARY)
274276endif ()
275277set (PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY} " )
276278
277- find_package_message(PYTHON "Found PythonLibs: ${PYTHON_LIBRARY } "
279+ find_package_message(PYTHON "Found PythonLibs: ${PYTHON_LIBRARIES } "
278280 "${PYTHON_EXECUTABLE}${PYTHON_VERSION_STRING} " )
279281
280282set (PYTHONLIBS_FOUND TRUE )
You can’t perform that action at this time.
0 commit comments