From cb7aedcadd973380ca6132f87c571db68aee33dc Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Fri, 9 Dec 2022 08:07:32 -0800 Subject: [PATCH] Try replacing `-undefined dynamic_lookup` with `-framework,CoreServices -framework,IOKit` --- tools/pybind11Common.cmake | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tools/pybind11Common.cmake b/tools/pybind11Common.cmake index e1fb601acc..94395c6635 100644 --- a/tools/pybind11Common.cmake +++ b/tools/pybind11Common.cmake @@ -75,7 +75,11 @@ if(CMAKE_VERSION VERSION_LESS 3.13) set_property( TARGET pybind11::python_link_helper APPEND - PROPERTY INTERFACE_LINK_LIBRARIES "$<$:-undefined dynamic_lookup>") + PROPERTY INTERFACE_LINK_LIBRARIES "$<$:-framework CoreServices>") + set_property( + TARGET pybind11::python_link_helper + APPEND + PROPERTY INTERFACE_LINK_LIBRARIES "$<$:-framework IOKit>") else() # link_options was added in 3.13+ # This is safer, because you are ensured the deduplication pass in CMake will not consider @@ -83,7 +87,11 @@ else() set_property( TARGET pybind11::python_link_helper APPEND - PROPERTY INTERFACE_LINK_OPTIONS "$<$:LINKER:-undefined,dynamic_lookup>") + PROPERTY INTERFACE_LINK_OPTIONS "$<$:LINKER:-framework,CoreServices>") + set_property( + TARGET pybind11::python_link_helper + APPEND + PROPERTY INTERFACE_LINK_OPTIONS "$<$:LINKER:-framework,IOKit>") endif() # ------------------------ Windows extras -------------------------