Skip to content

Commit f6b5ec0

Browse files
authored
fix(cmake): support Windows ARM cross-compilation
1 parent 89c3561 commit f6b5ec0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/FindPythonLibsNew.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,13 +268,15 @@ mark_as_advanced(PYTHON_LIBRARY PYTHON_INCLUDE_DIR)
268268
# library. We now set the variables listed by the documentation for this
269269
# module.
270270
set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
271-
set(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
271+
if(NOT DEFINED PYTHON_LIBRARIES)
272+
set(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
273+
endif()
272274
if(NOT PYTHON_DEBUG_LIBRARY)
273275
set(PYTHON_DEBUG_LIBRARY "")
274276
endif()
275277
set(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

280282
set(PYTHONLIBS_FOUND TRUE)

0 commit comments

Comments
 (0)