Added flow limiter calculator and conditionally selected xcframework in iOS framework targets

This commit is contained in:
Prianka Liz Kariat 2023-05-06 04:23:49 +05:30
parent f6d0a5e03a
commit 2fa03a3699

View File

@ -46,6 +46,7 @@ OBJC_COMMON_DEPS = [
"//mediapipe/tasks/cc/vision/object_detector:object_detector_graph", "//mediapipe/tasks/cc/vision/object_detector:object_detector_graph",
"//mediapipe/tasks/cc/text/text_classifier:text_classifier_graph", "//mediapipe/tasks/cc/text/text_classifier:text_classifier_graph",
"//mediapipe/tasks/cc/text/text_embedder:text_embedder_graph", "//mediapipe/tasks/cc/text/text_embedder:text_embedder_graph",
"//mediapipe/calculators/core:flow_limiter_calculator",
"//mediapipe/gpu:metal_shared_resources", "//mediapipe/gpu:metal_shared_resources",
] ]
@ -124,9 +125,7 @@ apple_static_xcframework(
# when the frameworks are imported in iOS projects. # when the frameworks are imported in iOS projects.
# Also avoids opencv since it will be built with # Also avoids opencv since it will be built with
# ":MediaPipeTaskGraphs_library". # ":MediaPipeTaskGraphs_library".
avoid_deps = OBJC_COMMON_DEPS + [ avoid_deps = OBJC_COMMON_DEPS,
"@ios_opencv//:OpencvFramework",
],
bundle_name = "MediaPipeTasksVision", bundle_name = "MediaPipeTasksVision",
ios = { ios = {
"simulator": [ "simulator": [
@ -176,9 +175,15 @@ apple_static_library(
"//mediapipe/tasks/cc/text/text_embedder:text_embedder_graph", "//mediapipe/tasks/cc/text/text_embedder:text_embedder_graph",
"//mediapipe/tasks/cc/vision/image_classifier:image_classifier_graph", "//mediapipe/tasks/cc/vision/image_classifier:image_classifier_graph",
"//mediapipe/tasks/cc/vision/object_detector:object_detector_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", "@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( apple_static_xcframework(