diff --git a/mediapipe/tasks/ios/test/vision/image_classifier/BUILD b/mediapipe/tasks/ios/test/vision/image_classifier/BUILD index b84fb6a7e..6b038b453 100644 --- a/mediapipe/tasks/ios/test/vision/image_classifier/BUILD +++ b/mediapipe/tasks/ios/test/vision/image_classifier/BUILD @@ -41,7 +41,12 @@ objc_library( "//mediapipe/tasks/ios/common:MPPCommon", "//mediapipe/tasks/ios/test/vision/utils:MPPImageTestUtils", "//mediapipe/tasks/ios/vision/image_classifier:MPPImageClassifier", - ], + ] + select({ + ":opencv_ios_sim_arm64_source_build" : ["@ios_opencv_source//:opencv_xcframework"], + ":opencv_ios_arm64_source_build" : ["@ios_opencv_source//:opencv_xcframework"], + ":opencv_ios_x86_64_source_build" : ["@ios_opencv_source//:opencv_xcframework"], + "//conditions:default": ["@ios_opencv//:OpencvFramework"], + }), ) ios_unit_test( diff --git a/mediapipe/tasks/ios/test/vision/object_detector/BUILD b/mediapipe/tasks/ios/test/vision/object_detector/BUILD index 569fab4de..700deb560 100644 --- a/mediapipe/tasks/ios/test/vision/object_detector/BUILD +++ b/mediapipe/tasks/ios/test/vision/object_detector/BUILD @@ -41,7 +41,12 @@ objc_library( "//mediapipe/tasks/ios/common:MPPCommon", "//mediapipe/tasks/ios/test/vision/utils:MPPImageTestUtils", "//mediapipe/tasks/ios/vision/object_detector:MPPObjectDetector", - ], + ] + select({ + ":opencv_ios_sim_arm64_source_build" : ["@ios_opencv_source//:opencv_xcframework"], + ":opencv_ios_arm64_source_build" : ["@ios_opencv_source//:opencv_xcframework"], + ":opencv_ios_x86_64_source_build" : ["@ios_opencv_source//:opencv_xcframework"], + "//conditions:default": ["@ios_opencv//:OpencvFramework"], + }), ) ios_unit_test(