diff --git a/mediapipe/modules/objectron/calculators/BUILD b/mediapipe/modules/objectron/calculators/BUILD index eb985d04d..4cba91b03 100644 --- a/mediapipe/modules/objectron/calculators/BUILD +++ b/mediapipe/modules/objectron/calculators/BUILD @@ -181,6 +181,15 @@ cc_library( hdrs = [ "tensor_util.h", ], + copts = select({ + # Needed for "//mediapipe/framework/formats:tensor" compatibility on Apple + # platforms for Metal pulled in via the tensor.h header. + "//mediapipe:apple": [ + "-x objective-c++", + "-fobjc-arc", # enable reference-counting + ], + "//conditions:default": [], + }), deps = [ "//mediapipe/framework/formats:tensor", "//mediapipe/framework/port:logging", @@ -296,6 +305,15 @@ cc_library( name = "lift_2d_frame_annotation_to_3d_calculator", srcs = ["lift_2d_frame_annotation_to_3d_calculator.cc"], visibility = ["//visibility:public"], + copts = select({ + # Needed for "//mediapipe/framework/formats:tensor" compatibility on Apple + # platforms for Metal pulled in via the tensor.h header. + "//mediapipe:apple": [ + "-x objective-c++", + "-fobjc-arc", # enable reference-counting + ], + "//conditions:default": [], + }), deps = [ ":annotation_cc_proto", ":belief_decoder_config_cc_proto",