Updated select conditions

This commit is contained in:
Prianka Liz Kariat 2023-04-28 03:26:29 +05:30
parent aafb0162f4
commit bdede4f94e
3 changed files with 21 additions and 6 deletions

View File

@ -141,6 +141,7 @@ config_setting(
"ios_armv7", "ios_armv7",
"ios_arm64", "ios_arm64",
"ios_arm64e", "ios_arm64e",
"ios_sim_arm64",
] ]
] ]

View File

@ -61,6 +61,19 @@ objc_library(
"//mediapipe/tasks/ios/core:MPPTaskRunner", "//mediapipe/tasks/ios/core:MPPTaskRunner",
"//third_party/apple_frameworks:UIKit", "//third_party/apple_frameworks:UIKit",
"@com_google_absl//absl/status:statusor", "@com_google_absl//absl/status:statusor",
"@ios_opencv//:OpencvFramework", ] + select({
], "@//third_party:opencv_ios_sim_arm64_source_build" : [
"@ios_opencv_source//:opencv_xcframework"
],
"@//third_party:opencv_ios_sim_fat_source_build" : [
"@ios_opencv_source//:opencv_xcframework"
],
"@//third_party:opencv_ios_arm64_source_build" : [
"@ios_opencv_source//:opencv_xcframework"
],
"//conditions:default": [
"@ios_opencv//:OpencvFramework"
],
})
) )

9
third_party/BUILD vendored
View File

@ -65,7 +65,7 @@ config_setting(
name = "opencv_ios_arm64_source_build", name = "opencv_ios_arm64_source_build",
values = { values = {
"apple_platform_type": "ios", "apple_platform_type": "ios",
"cpu": "ios_arm64" "cpu": "ios_arm64",
}, },
define_values = { define_values = {
"OPENCV": "source", "OPENCV": "source",
@ -75,7 +75,8 @@ config_setting(
config_setting( config_setting(
name = "opencv_ios_sim_arm64_source_build", name = "opencv_ios_sim_arm64_source_build",
values = { values = {
"config": "ios_sim_arm64", "apple_platform_type": "ios",
"cpu": "ios_sim_arm64",
}, },
define_values = { define_values = {
"OPENCV": "source", "OPENCV": "source",
@ -96,7 +97,8 @@ config_setting(
config_setting( config_setting(
name = "opencv_ios_sim_fat_source_build", name = "opencv_ios_sim_fat_source_build",
values = { values = {
"config": "ios_sim_fat", "apple_platform_type": "ios",
"ios_multi_cpus": "sim_arm64, x86_64"
}, },
define_values = { define_values = {
"OPENCV": "source", "OPENCV": "source",
@ -109,7 +111,6 @@ alias(
":opencv_source_build": ":opencv_cmake", ":opencv_source_build": ":opencv_cmake",
":opencv_ios_sim_arm64_source_build" : "@ios_opencv_source//:opencv", ":opencv_ios_sim_arm64_source_build" : "@ios_opencv_source//:opencv",
":opencv_ios_sim_fat_source_build" : "@ios_opencv_source//:opencv", ":opencv_ios_sim_fat_source_build" : "@ios_opencv_source//:opencv",
":opencv_ios_sim_arm64_source_build" : "@ios_opencv_source//:opencv",
":opencv_ios_arm64_source_build" : "@ios_opencv_source//:opencv", ":opencv_ios_arm64_source_build" : "@ios_opencv_source//:opencv",
"//conditions:default": ":opencv_binary", "//conditions:default": ":opencv_binary",
}), }),