Skip to content

Commit 6ae0815

Browse files
committed
Use PYTHON3_LIBRARIES if PYTHON3_LINK_LIBRARIES is empty.
This is a fix for SmuView issue pybind#14.
1 parent 263a03d commit 6ae0815

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
@@ -21,7 +21,12 @@ if (PkgConfig_FOUND)
2121
pkg_check_modules(PYTHON3 python3) # TODO PYBIND11_PYTHON_VERSION
2222
if (PYTHON3_FOUND)
2323
set(PYTHON_INCLUDE_DIRS ${PYTHON3_INCLUDE_DIRS})
24-
set(PYTHON_LIBRARIES ${PYTHON3_LINK_LIBRARIES})
24+
if (PYTHON3_LINK_LIBRARIES)
25+
# Try to use the fully qualified name for cross compiling
26+
set(PYTHON_LIBRARIES ${PYTHON3_LINK_LIBRARIES})
27+
else()
28+
set(PYTHON_LIBRARIES ${PYTHON3_LIBRARIES})
29+
endif()
2530
set(PYTHON_MODULE_PREFIX "")
2631
set(PYTHON_MODULE_EXTENSION "")
2732
set(PYTHON_VERSION_MAJOR "") # TODO

0 commit comments

Comments
 (0)