diff --git a/patch/ros-jazzy-rosidl-generator-py.osx.patch b/patch/ros-jazzy-rosidl-generator-py.osx.patch index cde64b21b..62da58cee 100644 --- a/patch/ros-jazzy-rosidl-generator-py.osx.patch +++ b/patch/ros-jazzy-rosidl-generator-py.osx.patch @@ -28,8 +28,8 @@ index cfc424a..cddd23d 100644 endif() +if(APPLE) -+ set_target_properties(${_target_name_lib} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup") -+ target_include_directories(${_target_name_lib} PUBLIC ${Python3_INCLUDE_DIRS} ${Python3_NumPy_INCLUDE_DIRS}) ++ target_link_libraries(${_target_name_lib} PRIVATE Python3::NumPy Python3::Module) ++ target_include_directories(${_target_name_lib} PRIVATE ${Python3_INCLUDE_DIRS} ${Python3_NumPy_INCLUDE_DIRS}) +else() + target_link_libraries(${_target_name_lib} PUBLIC Python3::NumPy Python3::Python) +endif() @@ -66,4 +66,4 @@ index cfc424a..cddd23d 100644 + target_link_libraries(${_target_name_lib} PUBLIC ${${_pkg_name}_TARGETS${rosidl_generator_py_suffix}}) endforeach() - set_target_properties(${_target_name_lib} PROPERTIES COMPILE_OPTIONS "${_extension_compile_flags}") + set_target_properties(${_target_name_lib} PROPERTIES COMPILE_OPTIONS "${_extension_compile_flags}") \ No newline at end of file