Skip to content

Commit c27d54e

Browse files
committed
Use PYTHON3_LIBRARIES if PYTHON3_LINK_LIBRARIES is empty.
This is a fix for SmuView issue pybind#14.
1 parent d379812 commit c27d54e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tools/pybind11Tools.cmake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@ if (PkgConfig_FOUND)
2424
pkg_check_modules(PYTHON3 python3)
2525
if (PYTHON3_FOUND)
2626
set(PYTHON_INCLUDE_DIRS ${PYTHON3_INCLUDE_DIRS})
27-
set(PYTHON_LIBRARIES ${PYTHON3_LINK_LIBRARIES})
27+
if (PYTHON3_LINK_LIBRARIES)
28+
# Try to use the fully qualified name for cross compiling
29+
set(PYTHON_LIBRARIES ${PYTHON3_LINK_LIBRARIES})
30+
else()
31+
set(PYTHON_LIBRARIES ${PYTHON3_LIBRARIES})
32+
endif()
2833
set(PYTHON_MODULE_PREFIX "")
2934
set(PYTHON_MODULE_EXTENSION "")
3035
set(PYTHON_VERSION_MAJOR "") # TODO

0 commit comments

Comments
 (0)