2019-06-17 01:03:25 +02:00
|
|
|
workspace(name = "mediapipe")
|
|
|
|
|
|
|
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
|
|
|
|
2019-08-17 03:49:25 +02:00
|
|
|
skylib_version = "0.8.0"
|
2019-06-17 01:03:25 +02:00
|
|
|
http_archive(
|
|
|
|
name = "bazel_skylib",
|
2019-08-17 03:49:25 +02:00
|
|
|
type = "tar.gz",
|
|
|
|
url = "https://github.com/bazelbuild/bazel-skylib/releases/download/{}/bazel-skylib.{}.tar.gz".format (skylib_version, skylib_version),
|
|
|
|
sha256 = "2ef429f5d7ce7111263289644d233707dba35e39696377ebab8b0bc701f7818e",
|
2019-06-17 01:03:25 +02:00
|
|
|
)
|
|
|
|
load("@bazel_skylib//lib:versions.bzl", "versions")
|
2019-11-15 20:38:21 +01:00
|
|
|
versions.check(minimum_bazel_version = "0.24.1")
|
2019-06-17 01:03:25 +02:00
|
|
|
|
|
|
|
# ABSL cpp library.
|
|
|
|
http_archive(
|
|
|
|
name = "com_google_absl",
|
|
|
|
# Head commit on 2019-04-12.
|
|
|
|
# TODO: Switch to the latest absl version when the problem gets
|
|
|
|
# fixed.
|
|
|
|
urls = [
|
|
|
|
"https://github.com/abseil/abseil-cpp/archive/a02f62f456f2c4a7ecf2be3104fe0c6e16fbad9a.tar.gz",
|
|
|
|
],
|
|
|
|
sha256 = "d437920d1434c766d22e85773b899c77c672b8b4865d5dc2cd61a29fdff3cf03",
|
|
|
|
strip_prefix = "abseil-cpp-a02f62f456f2c4a7ecf2be3104fe0c6e16fbad9a",
|
|
|
|
)
|
|
|
|
|
2019-08-19 23:15:40 +02:00
|
|
|
http_archive(
|
|
|
|
name = "rules_cc",
|
|
|
|
strip_prefix = "rules_cc-master",
|
|
|
|
urls = ["https://github.com/bazelbuild/rules_cc/archive/master.zip"],
|
|
|
|
)
|
|
|
|
|
2019-06-17 01:03:25 +02:00
|
|
|
# GoogleTest/GoogleMock framework. Used by most unit-tests.
|
|
|
|
http_archive(
|
|
|
|
name = "com_google_googletest",
|
|
|
|
urls = ["https://github.com/google/googletest/archive/master.zip"],
|
|
|
|
strip_prefix = "googletest-master",
|
|
|
|
)
|
|
|
|
|
|
|
|
# Google Benchmark library.
|
|
|
|
http_archive(
|
|
|
|
name = "com_google_benchmark",
|
|
|
|
urls = ["https://github.com/google/benchmark/archive/master.zip"],
|
|
|
|
strip_prefix = "benchmark-master",
|
|
|
|
build_file = "@//third_party:benchmark.BUILD",
|
|
|
|
)
|
|
|
|
|
|
|
|
# gflags needed by glog
|
|
|
|
http_archive(
|
|
|
|
name = "com_github_gflags_gflags",
|
|
|
|
sha256 = "6e16c8bc91b1310a44f3965e616383dbda48f83e8c1eaa2370a215057b00cabe",
|
|
|
|
strip_prefix = "gflags-77592648e3f3be87d6c7123eb81cbad75f9aef5a",
|
|
|
|
urls = [
|
|
|
|
"https://mirror.bazel.build/github.com/gflags/gflags/archive/77592648e3f3be87d6c7123eb81cbad75f9aef5a.tar.gz",
|
|
|
|
"https://github.com/gflags/gflags/archive/77592648e3f3be87d6c7123eb81cbad75f9aef5a.tar.gz",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
# glog
|
|
|
|
http_archive(
|
2019-08-17 03:49:25 +02:00
|
|
|
name = "com_github_glog_glog",
|
2019-06-17 01:03:25 +02:00
|
|
|
url = "https://github.com/google/glog/archive/v0.3.5.zip",
|
|
|
|
sha256 = "267103f8a1e9578978aa1dc256001e6529ef593e5aea38193d31c2872ee025e8",
|
|
|
|
strip_prefix = "glog-0.3.5",
|
|
|
|
build_file = "@//third_party:glog.BUILD",
|
2019-09-30 19:18:09 +02:00
|
|
|
patches = [
|
|
|
|
"@//third_party:com_github_glog_glog_9779e5ea6ef59562b030248947f787d1256132ae.diff"
|
|
|
|
],
|
|
|
|
patch_args = [
|
|
|
|
"-p1",
|
|
|
|
],
|
2019-06-17 01:03:25 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
# libyuv
|
|
|
|
http_archive(
|
|
|
|
name = "libyuv",
|
|
|
|
urls = ["https://chromium.googlesource.com/libyuv/libyuv/+archive/refs/heads/master.tar.gz"],
|
|
|
|
build_file = "@//third_party:libyuv.BUILD",
|
|
|
|
)
|
|
|
|
|
|
|
|
http_archive(
|
|
|
|
name = "com_google_protobuf_javalite",
|
|
|
|
sha256 = "79d102c61e2a479a0b7e5fc167bcfaa4832a0c6aad4a75fa7da0480564931bcc",
|
|
|
|
strip_prefix = "protobuf-384989534b2246d413dbcd750744faab2607b516",
|
|
|
|
urls = ["https://github.com/google/protobuf/archive/384989534b2246d413dbcd750744faab2607b516.zip"],
|
|
|
|
)
|
|
|
|
|
2019-08-17 03:49:25 +02:00
|
|
|
http_archive(
|
|
|
|
name = "com_google_audio_tools",
|
|
|
|
strip_prefix = "multichannel-audio-tools-master",
|
|
|
|
urls = ["https://github.com/google/multichannel-audio-tools/archive/master.zip"],
|
|
|
|
)
|
|
|
|
|
2019-06-17 01:03:25 +02:00
|
|
|
# Needed by TensorFlow
|
|
|
|
http_archive(
|
|
|
|
name = "io_bazel_rules_closure",
|
|
|
|
sha256 = "e0a111000aeed2051f29fcc7a3f83be3ad8c6c93c186e64beb1ad313f0c7f9f9",
|
|
|
|
strip_prefix = "rules_closure-cf1e44edb908e9616030cc83d085989b8e6cd6df",
|
|
|
|
urls = [
|
|
|
|
"http://mirror.tensorflow.org/github.com/bazelbuild/rules_closure/archive/cf1e44edb908e9616030cc83d085989b8e6cd6df.tar.gz",
|
|
|
|
"https://github.com/bazelbuild/rules_closure/archive/cf1e44edb908e9616030cc83d085989b8e6cd6df.tar.gz", # 2019-04-04
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-11-15 20:38:21 +01:00
|
|
|
# 2019-11-12
|
|
|
|
_TENSORFLOW_GIT_COMMIT = "a5f9bcd64453ff3d1f64cb4da4786db3d2da7f82"
|
|
|
|
_TENSORFLOW_SHA256= "f2b6f2ab2ffe63e86eccd3ce4bea6b7197383d726638dfeeebcdc1e7de73f075"
|
2019-06-17 01:03:25 +02:00
|
|
|
http_archive(
|
|
|
|
name = "org_tensorflow",
|
2019-08-17 03:49:25 +02:00
|
|
|
urls = [
|
|
|
|
"https://mirror.bazel.build/github.com/tensorflow/tensorflow/archive/%s.tar.gz" % _TENSORFLOW_GIT_COMMIT,
|
|
|
|
"https://github.com/tensorflow/tensorflow/archive/%s.tar.gz" % _TENSORFLOW_GIT_COMMIT,
|
|
|
|
],
|
|
|
|
strip_prefix = "tensorflow-%s" % _TENSORFLOW_GIT_COMMIT,
|
|
|
|
sha256 = _TENSORFLOW_SHA256,
|
2019-06-17 01:03:25 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
load("@org_tensorflow//tensorflow:workspace.bzl", "tf_workspace")
|
|
|
|
tf_workspace(tf_repo_name = "org_tensorflow")
|
|
|
|
|
2019-09-05 23:51:00 +02:00
|
|
|
# Please run
|
|
|
|
# $ sudo apt-get install libopencv-core-dev libopencv-highgui-dev \
|
|
|
|
# libopencv-imgproc-dev libopencv-video-dev
|
2019-06-17 01:03:25 +02:00
|
|
|
new_local_repository(
|
|
|
|
name = "linux_opencv",
|
|
|
|
build_file = "@//third_party:opencv_linux.BUILD",
|
|
|
|
path = "/usr",
|
|
|
|
)
|
|
|
|
|
2019-08-17 03:49:25 +02:00
|
|
|
new_local_repository(
|
|
|
|
name = "linux_ffmpeg",
|
|
|
|
build_file = "@//third_party:ffmpeg_linux.BUILD",
|
|
|
|
path = "/usr"
|
|
|
|
)
|
|
|
|
|
2019-09-05 23:51:00 +02:00
|
|
|
# Please run $ brew install opencv@3
|
2019-06-17 01:03:25 +02:00
|
|
|
new_local_repository(
|
|
|
|
name = "macos_opencv",
|
|
|
|
build_file = "@//third_party:opencv_macos.BUILD",
|
|
|
|
path = "/usr",
|
|
|
|
)
|
|
|
|
|
2019-08-17 03:49:25 +02:00
|
|
|
new_local_repository(
|
|
|
|
name = "macos_ffmpeg",
|
|
|
|
build_file = "@//third_party:ffmpeg_macos.BUILD",
|
|
|
|
path = "/usr",
|
|
|
|
)
|
|
|
|
|
2019-06-17 01:03:25 +02:00
|
|
|
http_archive(
|
|
|
|
name = "android_opencv",
|
|
|
|
build_file = "@//third_party:opencv_android.BUILD",
|
|
|
|
strip_prefix = "OpenCV-android-sdk",
|
|
|
|
type = "zip",
|
2019-11-21 21:01:51 +01:00
|
|
|
url = "https://github.com/opencv/opencv/releases/download/3.4.3/opencv-3.4.3-android-sdk.zip",
|
2019-06-17 01:03:25 +02:00
|
|
|
)
|
|
|
|
|
2019-08-17 03:49:25 +02:00
|
|
|
# After OpenCV 3.2.0, the pre-compiled opencv2.framework has google protobuf symbols, which will
|
|
|
|
# trigger duplicate symbol errors in the linking stage of building a mediapipe ios app.
|
|
|
|
# To get a higher version of OpenCV for iOS, opencv2.framework needs to be built from source with
|
|
|
|
# '-DBUILD_PROTOBUF=OFF -DBUILD_opencv_dnn=OFF'.
|
|
|
|
http_archive(
|
|
|
|
name = "ios_opencv",
|
|
|
|
sha256 = "7dd536d06f59e6e1156b546bd581523d8df92ce83440002885ec5abc06558de2",
|
|
|
|
build_file = "@//third_party:opencv_ios.BUILD",
|
|
|
|
type = "zip",
|
|
|
|
url = "https://github.com/opencv/opencv/releases/download/3.2.0/opencv-3.2.0-ios-framework.zip",
|
|
|
|
)
|
|
|
|
|
2019-06-28 01:19:43 +02:00
|
|
|
RULES_JVM_EXTERNAL_TAG = "2.2"
|
|
|
|
RULES_JVM_EXTERNAL_SHA = "f1203ce04e232ab6fdd81897cf0ff76f2c04c0741424d192f28e65ae752ce2d6"
|
2019-06-17 01:03:25 +02:00
|
|
|
|
|
|
|
http_archive(
|
2019-06-28 01:19:43 +02:00
|
|
|
name = "rules_jvm_external",
|
|
|
|
strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG,
|
|
|
|
sha256 = RULES_JVM_EXTERNAL_SHA,
|
|
|
|
url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG,
|
2019-06-17 01:03:25 +02:00
|
|
|
)
|
|
|
|
|
2019-06-28 01:19:43 +02:00
|
|
|
load("@rules_jvm_external//:defs.bzl", "maven_install")
|
2019-06-17 01:03:25 +02:00
|
|
|
|
2019-06-28 01:19:43 +02:00
|
|
|
maven_install(
|
|
|
|
artifacts = [
|
2019-08-17 03:49:25 +02:00
|
|
|
"androidx.annotation:annotation:aar:1.1.0",
|
|
|
|
"androidx.appcompat:appcompat:aar:1.1.0-rc01",
|
2019-11-21 21:01:51 +01:00
|
|
|
"androidx.camera:camera-core:aar:1.0.0-alpha06",
|
|
|
|
"androidx.camera:camera-camera2:aar:1.0.0-alpha06",
|
2019-08-17 03:49:25 +02:00
|
|
|
"androidx.constraintlayout:constraintlayout:aar:1.1.3",
|
|
|
|
"androidx.core:core:aar:1.1.0-rc03",
|
|
|
|
"androidx.legacy:legacy-support-v4:aar:1.0.0",
|
|
|
|
"androidx.recyclerview:recyclerview:aar:1.1.0-beta02",
|
|
|
|
"com.google.android.material:material:aar:1.0.0-rc01",
|
2019-06-28 01:19:43 +02:00
|
|
|
],
|
2019-11-21 23:05:20 +01:00
|
|
|
repositories = [
|
2019-11-21 21:01:51 +01:00
|
|
|
"https://dl.google.com/dl/android/maven2",
|
|
|
|
"https://repo1.maven.org/maven2",
|
|
|
|
],
|
2019-06-28 01:19:43 +02:00
|
|
|
)
|
2019-06-17 01:03:25 +02:00
|
|
|
|
|
|
|
maven_server(
|
|
|
|
name = "google_server",
|
2019-06-28 01:19:43 +02:00
|
|
|
url = "https://dl.google.com/dl/android/maven2",
|
2019-06-17 01:03:25 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
maven_jar(
|
|
|
|
name = "androidx_lifecycle",
|
|
|
|
artifact = "androidx.lifecycle:lifecycle-common:2.0.0",
|
2019-06-28 01:19:43 +02:00
|
|
|
sha1 = "e070ffae07452331bc5684734fce6831d531785c",
|
2019-06-17 01:03:25 +02:00
|
|
|
server = "google_server",
|
|
|
|
)
|
|
|
|
|
|
|
|
maven_jar(
|
2019-11-21 23:05:20 +01:00
|
|
|
name = "androidx_concurrent_futures",
|
|
|
|
artifact = "androidx.concurrent:concurrent-futures:1.0.0-alpha03",
|
|
|
|
sha1 = "b528df95c7e2fefa2210c0c742bf3e491c1818ae",
|
|
|
|
server = "google_server",
|
2019-06-17 01:03:25 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
maven_jar(
|
|
|
|
name = "com_google_guava_android",
|
|
|
|
artifact = "com.google.guava:guava:27.0.1-android",
|
|
|
|
sha1 = "b7e1c37f66ef193796ccd7ea6e80c2b05426182d",
|
|
|
|
)
|
|
|
|
|
|
|
|
maven_jar(
|
|
|
|
name = "com_google_common_flogger",
|
|
|
|
artifact = "com.google.flogger:flogger:0.3.1",
|
|
|
|
sha1 = "585030fe1ec709760cbef997a459729fb965df0e",
|
|
|
|
)
|
|
|
|
|
|
|
|
maven_jar(
|
|
|
|
name = "com_google_common_flogger_system_backend",
|
|
|
|
artifact = "com.google.flogger:flogger-system-backend:0.3.1",
|
|
|
|
sha1 = "287b569d76abcd82f9de87fe41829fbc7ebd8ac9",
|
|
|
|
)
|
|
|
|
|
|
|
|
maven_jar(
|
|
|
|
name = "com_google_code_findbugs",
|
|
|
|
artifact = "com.google.code.findbugs:jsr305:3.0.2",
|
2019-06-28 01:19:43 +02:00
|
|
|
sha1 = "25ea2e8b0c338a877313bd4672d3fe056ea78f0d",
|
2019-06-17 01:03:25 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
# You may run setup_android.sh to install Android SDK and NDK.
|
|
|
|
android_ndk_repository(
|
|
|
|
name = "androidndk",
|
|
|
|
)
|
|
|
|
|
|
|
|
android_sdk_repository(
|
|
|
|
name = "androidsdk",
|
|
|
|
)
|
2019-08-17 03:49:25 +02:00
|
|
|
|
|
|
|
# iOS basic build deps.
|
|
|
|
|
2019-11-15 20:38:21 +01:00
|
|
|
http_archive(
|
2019-08-17 03:49:25 +02:00
|
|
|
name = "build_bazel_rules_apple",
|
2019-11-15 20:38:21 +01:00
|
|
|
sha256 = "bdc8e66e70b8a75da23b79f1f8c6207356df07d041d96d2189add7ee0780cf4e",
|
|
|
|
strip_prefix = "rules_apple-b869b0d3868d78a1d4ffd866ccb304fb68aa12c3",
|
|
|
|
url = "https://github.com/bazelbuild/rules_apple/archive/b869b0d3868d78a1d4ffd866ccb304fb68aa12c3.tar.gz",
|
2019-08-17 03:49:25 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
load(
|
|
|
|
"@build_bazel_rules_apple//apple:repositories.bzl",
|
|
|
|
"apple_rules_dependencies",
|
|
|
|
)
|
|
|
|
|
|
|
|
apple_rules_dependencies()
|
|
|
|
|
|
|
|
load(
|
|
|
|
"@build_bazel_rules_swift//swift:repositories.bzl",
|
|
|
|
"swift_rules_dependencies",
|
|
|
|
)
|
|
|
|
|
|
|
|
swift_rules_dependencies()
|
|
|
|
|
|
|
|
load(
|
|
|
|
"@build_bazel_apple_support//lib:repositories.bzl",
|
|
|
|
"apple_support_dependencies",
|
|
|
|
)
|
|
|
|
|
|
|
|
apple_support_dependencies()
|
|
|
|
|
|
|
|
# More iOS deps.
|
|
|
|
|
|
|
|
http_archive(
|
|
|
|
name = "google_toolbox_for_mac",
|
|
|
|
url = "https://github.com/google/google-toolbox-for-mac/archive/v2.2.1.zip",
|
|
|
|
sha256 = "e3ac053813c989a88703556df4dc4466e424e30d32108433ed6beaec76ba4fdc",
|
|
|
|
strip_prefix = "google-toolbox-for-mac-2.2.1",
|
|
|
|
build_file = "@//third_party:google_toolbox_for_mac.BUILD",
|
|
|
|
)
|