From 2fa03a3699874944ba2d211b88576ddfb449b71d Mon Sep 17 00:00:00 2001 From: Prianka Liz Kariat Date: Sat, 6 May 2023 04:23:49 +0530 Subject: [PATCH] Added flow limiter calculator and conditionally selected xcframework in iOS framework targets --- mediapipe/tasks/ios/BUILD | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/mediapipe/tasks/ios/BUILD b/mediapipe/tasks/ios/BUILD index c839acd84..5f1d9d6e4 100644 --- a/mediapipe/tasks/ios/BUILD +++ b/mediapipe/tasks/ios/BUILD @@ -46,6 +46,7 @@ OBJC_COMMON_DEPS = [ "//mediapipe/tasks/cc/vision/object_detector:object_detector_graph", "//mediapipe/tasks/cc/text/text_classifier:text_classifier_graph", "//mediapipe/tasks/cc/text/text_embedder:text_embedder_graph", + "//mediapipe/calculators/core:flow_limiter_calculator", "//mediapipe/gpu:metal_shared_resources", ] @@ -124,9 +125,7 @@ apple_static_xcframework( # when the frameworks are imported in iOS projects. # Also avoids opencv since it will be built with # ":MediaPipeTaskGraphs_library". - avoid_deps = OBJC_COMMON_DEPS + [ - "@ios_opencv//:OpencvFramework", - ], + avoid_deps = OBJC_COMMON_DEPS, bundle_name = "MediaPipeTasksVision", ios = { "simulator": [ @@ -176,9 +175,15 @@ apple_static_library( "//mediapipe/tasks/cc/text/text_embedder:text_embedder_graph", "//mediapipe/tasks/cc/vision/image_classifier:image_classifier_graph", "//mediapipe/tasks/cc/vision/object_detector:object_detector_graph", - "@ios_opencv//:OpencvFramework", + "//mediapipe/calculators/core:flow_limiter_calculator", "@org_tensorflow//third_party/icu/data:conversion_data", - ], + ] + select({ + "//third_party:opencv_ios_sim_arm64_source_build" : ["@ios_opencv_source//:opencv_xcframework"], + "//third_party:opencv_ios_arm64_source_build" : ["@ios_opencv_source//:opencv_xcframework"], + "//third_party:opencv_ios_x86_64_source_build" : ["@ios_opencv_source//:opencv_xcframework"], + "//third_party:opencv_ios_sim_fat_source_build" : ["@ios_opencv_source//:opencv_xcframework"], + "//conditions:default": ["@ios_opencv//:OpencvFramework"], + }), ) apple_static_xcframework(