Skip to content

Commit 8cd3a9b

Browse files
Do not link with pybind11 embed for libSofaPython on macOS
1 parent 28b539b commit 8cd3a9b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Plugin/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ target_link_libraries(${PROJECT_NAME} PUBLIC Sofa.Simulation.Graph)
3939
# The public linking with pybind lead to have a link with libpython which
4040
# propagates in the python module .so. On macOS, this extra link with libpython
4141
# lead to segv when importing the python module in versions of python that don't
42-
# have a dynamic link with libpython (such as the one provided by conda), but works
43-
# fine with versions that have such link.
42+
# have a dynamic link with libpython (such as the one provided by conda which is linked
43+
# statically), but works fine with versions that have such link.
4444
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
45-
target_link_libraries(${PROJECT_NAME} PRIVATE pybind11::embed)
45+
target_link_libraries(${PROJECT_NAME} PRIVATE pybind11::pybind11 pybind11::python_link_helper)
4646
else()
4747
target_link_libraries(${PROJECT_NAME} PUBLIC pybind11::embed)
4848
endif()

0 commit comments

Comments
 (0)