From 72e78d093b69a6e46b60f2fa763eec658356bbf7 Mon Sep 17 00:00:00 2001 From: homuler Date: Sun, 28 Feb 2021 18:51:18 +0900 Subject: [PATCH] fix: build objectron calculators for iOS --- mediapipe/modules/objectron/calculators/BUILD | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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",