2019-06-17 01:03:25 +02:00
|
|
|
# Copyright 2019 The MediaPipe Authors.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
licenses(["notice"]) # Apache 2.0
|
|
|
|
|
2020-04-07 04:10:12 +02:00
|
|
|
# Note: yes, these need to use "//external:android/crosstool", not
|
|
|
|
# @androidndk//:default_crosstool.
|
|
|
|
|
2019-06-17 01:03:25 +02:00
|
|
|
config_setting(
|
|
|
|
name = "android",
|
|
|
|
values = {"crosstool_top": "//external:android/crosstool"},
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "android_x86",
|
|
|
|
values = {
|
|
|
|
"crosstool_top": "//external:android/crosstool",
|
|
|
|
"cpu": "x86",
|
|
|
|
},
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "android_x86_64",
|
|
|
|
values = {
|
|
|
|
"crosstool_top": "//external:android/crosstool",
|
|
|
|
"cpu": "x86_64",
|
|
|
|
},
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "android_armeabi",
|
|
|
|
values = {
|
|
|
|
"crosstool_top": "//external:android/crosstool",
|
|
|
|
"cpu": "armeabi",
|
|
|
|
},
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "android_arm",
|
|
|
|
values = {
|
|
|
|
"crosstool_top": "//external:android/crosstool",
|
|
|
|
"cpu": "armeabi-v7a",
|
|
|
|
},
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "android_arm64",
|
|
|
|
values = {
|
|
|
|
"crosstool_top": "//external:android/crosstool",
|
|
|
|
"cpu": "arm64-v8a",
|
|
|
|
},
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
2019-08-17 03:49:25 +02:00
|
|
|
# Note: this cannot just match "apple_platform_type": "macos" because that option
|
|
|
|
# defaults to "macos" even when building on Linux!
|
|
|
|
alias(
|
2019-06-17 01:03:25 +02:00
|
|
|
name = "macos",
|
2019-08-17 03:49:25 +02:00
|
|
|
actual = select({
|
|
|
|
":macos_i386": ":macos_i386",
|
|
|
|
":macos_x86_64": ":macos_x86_64",
|
2022-05-04 00:29:57 +02:00
|
|
|
":macos_arm64": ":macos_arm64",
|
2019-08-17 03:49:25 +02:00
|
|
|
"//conditions:default": ":macos_i386", # Arbitrarily chosen from above.
|
|
|
|
}),
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
|
|
|
# Note: this also matches on crosstool_top so that it does not produce ambiguous
|
|
|
|
# selectors when used together with "android".
|
|
|
|
config_setting(
|
|
|
|
name = "ios",
|
|
|
|
values = {
|
|
|
|
"crosstool_top": "@bazel_tools//tools/cpp:toolchain",
|
|
|
|
"apple_platform_type": "ios",
|
|
|
|
},
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
|
|
|
alias(
|
|
|
|
name = "apple",
|
|
|
|
actual = select({
|
|
|
|
":macos": ":macos",
|
|
|
|
":ios": ":ios",
|
|
|
|
"//conditions:default": ":ios", # Arbitrarily chosen from above.
|
|
|
|
}),
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "macos_i386",
|
2019-06-17 01:03:25 +02:00
|
|
|
values = {
|
|
|
|
"apple_platform_type": "macos",
|
|
|
|
"cpu": "darwin",
|
|
|
|
},
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
2019-08-17 03:49:25 +02:00
|
|
|
|
|
|
|
config_setting(
|
|
|
|
name = "macos_x86_64",
|
|
|
|
values = {
|
|
|
|
"apple_platform_type": "macos",
|
|
|
|
"cpu": "darwin_x86_64",
|
|
|
|
},
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
2022-05-04 00:29:57 +02:00
|
|
|
config_setting(
|
|
|
|
name = "macos_arm64",
|
|
|
|
values = {
|
|
|
|
"apple_platform_type": "macos",
|
|
|
|
"cpu": "darwin_arm64",
|
|
|
|
},
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
2019-08-17 03:49:25 +02:00
|
|
|
[
|
|
|
|
config_setting(
|
|
|
|
name = arch,
|
|
|
|
values = {"cpu": arch},
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
for arch in [
|
|
|
|
"ios_i386",
|
|
|
|
"ios_x86_64",
|
|
|
|
"ios_armv7",
|
|
|
|
"ios_arm64",
|
|
|
|
"ios_arm64e",
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
2020-05-21 18:46:31 +02:00
|
|
|
config_setting(
|
|
|
|
name = "windows",
|
|
|
|
values = {"cpu": "x64_windows"},
|
|
|
|
)
|
|
|
|
|
2019-08-17 03:49:25 +02:00
|
|
|
exports_files(
|
|
|
|
["provisioning_profile.mobileprovision"],
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|