Added conditional building of opencv xc framework to test targets

This commit is contained in:
Prianka Liz Kariat 2023-05-06 04:58:59 +05:30
parent 4349ac48b0
commit 648a24a97b
2 changed files with 12 additions and 2 deletions

View File

@ -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(

View File

@ -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(