Project import generated by Copybara.

GitOrigin-RevId: 612e50bb8db2ec3dc1c30049372d87a80c3848db
This commit is contained in:
MediaPipe Team
2020-08-30 19:52:55 -04:00
committed by chuoling
parent a7225b938a
commit c0124fb83c
248 changed files with 5225 additions and 1914 deletions
+139 -36
View File
@@ -24,22 +24,22 @@ cc_library(
visibility = ["//visibility:public"],
deps = select({
"//mediapipe:android_x86": [
"@com_github_glog_glog_v_0_3_5//:glog",
"@com_github_glog_glog_no_gflags//:glog",
],
"//mediapipe:android_x86_64": [
"@com_github_glog_glog_v_0_3_5//:glog",
"@com_github_glog_glog_no_gflags//:glog",
],
"//mediapipe:android_armeabi": [
"@com_github_glog_glog_v_0_3_5//:glog",
"@com_github_glog_glog_no_gflags//:glog",
],
"//mediapipe:android_arm": [
"@com_github_glog_glog_v_0_3_5//:glog",
"@com_github_glog_glog_no_gflags//:glog",
],
"//mediapipe:android_arm64": [
"@com_github_glog_glog_v_0_3_5//:glog",
"@com_github_glog_glog_no_gflags//:glog",
],
"//mediapipe:ios": [
"@com_github_glog_glog_v_0_3_5//:glog",
"@com_github_glog_glog_no_gflags//:glog",
],
"//mediapipe:macos": [
"@com_github_glog_glog//:glog",
@@ -53,37 +53,140 @@ cc_library(
}),
)
cc_library(
name = "opencv",
config_setting(
name = "opencv_source_build",
define_values = {
"OPENCV": "source",
},
visibility = ["//visibility:public"],
deps = select({
"//mediapipe:android_x86": [
"@android_opencv//:libopencv_x86",
],
"//mediapipe:android_x86_64": [
"@android_opencv//:libopencv_x86_64",
],
"//mediapipe:android_armeabi": [
"@android_opencv//:libopencv_armeabi-v7a",
],
"//mediapipe:android_arm": [
"@android_opencv//:libopencv_armeabi-v7a",
],
"//mediapipe:android_arm64": [
"@android_opencv//:libopencv_arm64-v8a",
],
"//mediapipe:ios": [
"@ios_opencv//:opencv",
],
"//mediapipe:macos": [
"@macos_opencv//:opencv",
],
"//mediapipe:windows": [
"@windows_opencv//:opencv",
],
"//conditions:default": [
"@linux_opencv//:opencv",
],
)
alias(
name = "opencv",
actual = select({
":opencv_source_build": ":opencv_cmake",
"//conditions:default": ":opencv_binary",
}),
visibility = ["//visibility:public"],
)
load("@rules_foreign_cc//tools/build_defs:cmake.bzl", "cmake_external")
# Note: this determines the order in which the libraries are passed to the
# linker, so if library A depends on library B, library B must come _after_.
# Hence core is at the bottom.
OPENCV_MODULES = [
"calib3d",
"features2d",
"highgui",
"video",
"videoio",
"imgcodecs",
"imgproc",
"core",
]
# Note: passing both BUILD_SHARED_LIBS=ON and BUILD_STATIC_LIBS=ON to cmake
# still only builds the shared libraries, so we have to choose one or the
# other. We build shared libraries by default, but this variable can be used
# to switch to static libraries.
OPENCV_SHARED_LIBS = True
OPENCV_SO_VERSION = "3.4"
cmake_external(
name = "opencv_cmake",
# Values to be passed as -Dkey=value on the CMake command line;
# here are serving to provide some CMake script configuration options
cache_entries = {
"CMAKE_BUILD_TYPE": "Release",
# The module list is always sorted alphabetically so that we do not
# cause a rebuild when changing the link order.
"BUILD_LIST": ",".join(sorted(OPENCV_MODULES)),
"BUILD_TESTS": "OFF",
"BUILD_PERF_TESTS": "OFF",
"BUILD_EXAMPLES": "OFF",
"BUILD_SHARED_LIBS": "ON" if OPENCV_SHARED_LIBS else "OFF",
"WITH_ITT": "OFF",
"WITH_JASPER": "OFF",
"WITH_WEBP": "OFF",
# When building tests, by default Bazel builds them in dynamic mode.
# See https://docs.bazel.build/versions/master/be/c-cpp.html#cc_binary.linkstatic
# For example, when building //mediapipe/calculators/video:opencv_video_encoder_calculator_test,
# the dependency //mediapipe/framework/formats:image_frame_opencv will
# be built as a shared library, which depends on a cv::Mat constructor,
# and expects it to be provided by the main exacutable. The main
# executable depends on libimage_frame_opencv.so and links in
# libopencv_core.a, which contains cv::Mat. However, if
# libopencv_core.a marks its symbols as hidden, then cv::Mat is in
# opencv_video_encoder_calculator_test but it is not exported, so
# libimage_frame_opencv.so fails to find it.
"OPENCV_SKIP_VISIBILITY_HIDDEN": "ON" if not OPENCV_SHARED_LIBS else "OFF",
# The COPY actions in modules/python/python_loader.cmake have issues with symlinks.
# In any case, we don't use this.
"OPENCV_SKIP_PYTHON_LOADER": "ON",
# Need to set this too, for the same reason.
"BUILD_opencv_python": "OFF",
# Ccache causes issues in some of our CI setups. It's not clear that
# ccache would be able to work across sandboxed Bazel builds, either.
# In any case, Bazel does its own caching of the rule's outputs.
"ENABLE_CCACHE": "OFF",
},
lib_source = "@opencv//:all",
linkopts = [] if OPENCV_SHARED_LIBS else [
# When using static libraries, the binary that eventually depends on the
# libraries also needs to link in their dependencies, which therefore
# have to be listed here.
# This list depends on which dependencies CMake finds when it configures
# the build, and so depends on what is installed on the local system.
# After building, the linkopts for the current setup can be extracted
# from lib/pkgconfig/opencv.pc in bazel-out
"-ljpeg",
"-lpng",
"-lz",
"-ltiff",
"-lImath",
"-lIlmImf",
"-lIex",
"-lHalf",
"-lIlmThread",
"-ldc1394",
"-lavcodec",
"-lavformat",
"-lavutil",
"-lswscale",
"-lavresample",
"-ldl",
"-lm",
"-lpthread",
"-lrt",
],
shared_libraries = select({
"@bazel_tools//src/conditions:darwin": ["libopencv_%s.%s.dylib" % (module, OPENCV_SO_VERSION) for module in OPENCV_MODULES],
# Only the shared objects listed here will be linked in the directory
# that Bazel adds to the RUNPATH of dependent executables. You cannot
# list both the versioned and unversioned name of the .so, and the
# versioned name is the one that the executables actually reference.
"//conditions:default": ["libopencv_%s.so.%s" % (module, OPENCV_SO_VERSION) for module in OPENCV_MODULES],
}) if OPENCV_SHARED_LIBS else None,
static_libraries = [
"libopencv_%s.a" % module
for module in OPENCV_MODULES
] if not OPENCV_SHARED_LIBS else None,
)
alias(
name = "opencv_binary",
actual = select({
"//mediapipe:android_x86": "@android_opencv//:libopencv_x86",
"//mediapipe:android_x86_64": "@android_opencv//:libopencv_x86_64",
"//mediapipe:android_armeabi": "@android_opencv//:libopencv_armeabi-v7a",
"//mediapipe:android_arm": "@android_opencv//:libopencv_armeabi-v7a",
"//mediapipe:android_arm64": "@android_opencv//:libopencv_arm64-v8a",
"//mediapipe:ios": "@ios_opencv//:opencv",
"//mediapipe:macos": "@macos_opencv//:opencv",
"//mediapipe:windows": "@windows_opencv//:opencv",
"//conditions:default": "@linux_opencv//:opencv",
}),
)
+3 -3
View File
@@ -20,11 +20,11 @@ cc_library(
name = "libffmpeg",
srcs = glob(
[
"local/opt/ffmpeg/lib/libav*.dylib",
"lib/libav*.dylib",
],
),
hdrs = glob(["local/opt/ffmpeg/include/libav*/*.h"]),
includes = ["local/opt/ffmpeg/include/"],
hdrs = glob(["include/libav*/*.h"]),
includes = ["include/"],
linkopts = [
"-lavcodec",
"-lavformat",
-585
View File
@@ -1,585 +0,0 @@
# 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"])
exports_files(["LICENSE"])
config_setting(
name = "android_arm",
values = {
"cpu": "armeabi-v7a",
},
visibility = ["//visibility:private"],
)
config_setting(
name = "android_arm64",
values = {
"cpu": "arm64-v8a",
},
visibility = ["//visibility:private"],
)
config_setting(
name = "ios_armv7",
values = {
"cpu": "ios_armv7",
},
visibility = ["//visibility:private"],
)
config_setting(
name = "ios_arm64",
values = {
"cpu": "ios_arm64",
},
visibility = ["//visibility:private"],
)
config_setting(
name = "ios_arm64e",
values = {
"cpu": "ios_arm64e",
},
visibility = ["//visibility:private"],
)
config_setting(
name = "libunwind",
values = {
"define": "libunwind=true",
"cpu": "k8",
},
visibility = ["//visibility:private"],
)
cc_library(
name = "glog",
srcs = [
"config_h",
"src/base/commandlineflags.h",
"src/base/googleinit.h",
"src/base/mutex.h",
"src/demangle.cc",
"src/demangle.h",
"src/logging.cc",
"src/raw_logging.cc",
"src/signalhandler.cc",
"src/symbolize.cc",
"src/symbolize.h",
"src/utilities.cc",
"src/utilities.h",
"src/vlog_is_on.cc",
] + glob(["src/stacktrace*.h"]),
hdrs = [
"src/glog/log_severity.h",
"src/glog/logging.h",
"src/glog/raw_logging.h",
"src/glog/stl_logging.h",
"src/glog/vlog_is_on.h",
],
copts = [
"-Wno-sign-compare",
"-U_XOPEN_SOURCE",
],
includes = ["./src"],
linkopts = select({
":libunwind": ["-lunwind"],
"//conditions:default": [],
}) + select({
"//conditions:default": ["-lpthread"],
":android_arm": [],
":android_arm64": [],
":ios_armv7": [],
":ios_arm64": [],
":ios_arm64e": [],
}),
visibility = ["//visibility:public"],
deps = select({
"//conditions:default": ["@com_github_gflags_gflags//:gflags"],
":android_arm": [],
":android_arm64": [],
":ios_armv7": [],
":ios_arm64": [],
":ios_arm64e": [],
}),
)
genrule(
name = "run_configure",
srcs = [
"README",
"Makefile.in",
"config.guess",
"config.sub",
"install-sh",
"ltmain.sh",
"missing",
"libglog.pc.in",
"src/config.h.in",
"src/glog/logging.h.in",
"src/glog/raw_logging.h.in",
"src/glog/stl_logging.h.in",
"src/glog/vlog_is_on.h.in",
],
outs = [
"config.h.tmp",
"src/glog/logging.h.tmp",
"src/glog/raw_logging.h",
"src/glog/stl_logging.h",
"src/glog/vlog_is_on.h",
],
cmd = "$(location :configure)" +
"&& cp -v src/config.h $(location config.h.tmp) " +
"&& cp -v src/glog/logging.h $(location src/glog/logging.h.tmp) " +
"&& cp -v src/glog/raw_logging.h $(location src/glog/raw_logging.h) " +
"&& cp -v src/glog/stl_logging.h $(location src/glog/stl_logging.h) " +
"&& cp -v src/glog/vlog_is_on.h $(location src/glog/vlog_is_on.h) ",
tools = [
"configure",
],
)
genrule(
name = "config_h",
srcs = select({
"//conditions:default": ["config.h.tmp"],
":android_arm": ["config.h.android_arm"],
":android_arm64": ["config.h.android_arm"],
":ios_armv7": ["config.h.ios_arm"],
":ios_arm64": ["config.h.ios_arm"],
":ios_arm64e": ["config.h.ios_arm"],
}),
outs = ["config.h"],
cmd = "echo select $< to be the glog config file. && cp $< $@",
)
genrule(
name = "logging_h",
srcs = select({
"//conditions:default": ["src/glog/logging.h.tmp"],
":android_arm": ["src/glog/logging.h.arm"],
":android_arm64": ["src/glog/logging.h.arm"],
":ios_armv7": ["src/glog/logging.h.arm"],
":ios_arm64": ["src/glog/logging.h.arm"],
":ios_arm64e": ["src/glog/logging.h.arm"],
}),
outs = ["src/glog/logging.h"],
cmd = "echo select $< to be the glog logging.h file. && cp $< $@",
)
# Hardcoded android arm config header for glog library.
# TODO: This is a temporary workaround. We should generate the config
# header by running the configure script with the right target toolchain.
ANDROID_ARM_CONFIG = """
/* Define if glog does not use RTTI */
/* #undef DISABLE_RTTI */
/* Namespace for Google classes */
#define GOOGLE_NAMESPACE google
/* Define if you have the 'dladdr' function */
#define HAVE_DLADDR
/* Define if you have the 'snprintf' function */
#define HAVE_SNPRINTF
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H
/* Define to 1 if you have the <execinfo.h> header file. */
/* #undef HAVE_EXECINFO_H */
/* Define if you have the 'fcntl' function */
#define HAVE_FCNTL
/* Define to 1 if you have the <glob.h> header file. */
#define HAVE_GLOB_H
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the 'pthread' library (-lpthread). */
/* #undef HAVE_LIBPTHREAD */
/* Define to 1 if you have the <libunwind.h> header file. */
/* #undef HAVE_LIBUNWIND_H */
/* Define if you have google gflags library */
/* #undef HAVE_LIB_GFLAGS */
/* Define if you have google gmock library */
/* #undef HAVE_LIB_GMOCK */
/* Define if you have google gtest library */
/* #undef HAVE_LIB_GTEST */
/* Define if you have libunwind */
/* #undef HAVE_LIB_UNWIND */
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H
/* Define to disable multithreading support. */
/* #undef NO_THREADS */
/* Define if the compiler implements namespaces */
#define HAVE_NAMESPACES
/* Define if you have the 'pread' function */
#define HAVE_PREAD
/* Define if you have POSIX threads libraries and header files. */
#define HAVE_PTHREAD
/* Define to 1 if you have the <pwd.h> header file. */
#define HAVE_PWD_H
/* Define if you have the 'pwrite' function */
#define HAVE_PWRITE
/* Define if the compiler implements pthread_rwlock_* */
#define HAVE_RWLOCK
/* Define if you have the 'sigaction' function */
#define HAVE_SIGACTION
/* Define if you have the 'sigaltstack' function */
/* #undef HAVE_SIGALTSTACK */
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H
/* Define to 1 if you have the <syscall.h> header file. */
#define HAVE_SYSCALL_H
/* Define to 1 if you have the <syslog.h> header file. */
#define HAVE_SYSLOG_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/syscall.h> header file. */
#define HAVE_SYS_SYSCALL_H
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/ucontext.h> header file. */
/* #undef HAVE_SYS_UCONTEXT_H */
/* Define to 1 if you have the <sys/utsname.h> header file. */
#define HAVE_SYS_UTSNAME_H
/* Define to 1 if you have the <ucontext.h> header file. */
#define HAVE_UCONTEXT_H
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the <unwind.h> header file. */
#define HAVE_UNWIND_H 1
/* Define if the compiler supports using expression for operator */
#define HAVE_USING_OPERATOR
/* Define if your compiler has __attribute__ */
#define HAVE___ATTRIBUTE__
/* Define if your compiler has __builtin_expect */
#define HAVE___BUILTIN_EXPECT 1
/* Define if your compiler has __sync_val_compare_and_swap */
#define HAVE___SYNC_VAL_COMPARE_AND_SWAP
/* Define to the sub-directory in which libtool stores uninstalled libraries. */
/* #undef LT_OBJDIR */
/* Name of package */
/* #undef PACKAGE */
/* Define to the address where bug reports for this package should be sent. */
/* #undef PACKAGE_BUGREPORT */
/* Define to the full name of this package. */
/* #undef PACKAGE_NAME */
/* Define to the full name and version of this package. */
/* #undef PACKAGE_STRING */
/* Define to the one symbol short name of this package. */
/* #undef PACKAGE_TARNAME */
/* Define to the home page for this package. */
/* #undef PACKAGE_URL */
/* Define to the version of this package. */
/* #undef PACKAGE_VERSION */
/* How to access the PC from a struct ucontext */
/* #undef PC_FROM_UCONTEXT */
/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
/* #undef PTHREAD_CREATE_JOINABLE */
/* The size of , as computed by sizeof. */
#define SIZEOF_VOID_P 8
/* Define to 1 if you have the ANSI C header files. */
/* #undef STDC_HEADERS */
/* the namespace where STL code like vector<> is defined */
#define STL_NAMESPACE std
/* Version number of package */
/* #undef VERSION */
/* Stops putting the code inside the Google namespace */
#define _END_GOOGLE_NAMESPACE_ }
/* Puts following code inside the Google namespace */
#define _START_GOOGLE_NAMESPACE_ namespace google {
"""
genrule(
name = "gen_android_arm_config",
outs = ["config.h.android_arm"],
cmd = ("echo '%s' > $(location config.h.android_arm)" % ANDROID_ARM_CONFIG),
)
genrule(
name = "generate_arm_glog_logging_h",
srcs = ["src/glog/logging.h.in"],
outs = ["src/glog/logging.h.arm"],
cmd = ("sed -e 's/@ac_cv___attribute___noinline@/__attribute__((__noinline__))/g'" +
" -e 's/@ac_cv___attribute___noreturn@/__attribute__((__noreturn__))/g'" +
" -e 's/@ac_cv_have___builtin_expect@/1/g'" +
" -e 's/@ac_cv_have___uint16@/0/g'" +
" -e 's/@ac_cv_have_inttypes_h@/1/g'" +
" -e 's/@ac_cv_have_libgflags@/0/g'" +
" -e 's/@ac_cv_have_stdint_h@/1/g'" +
" -e 's/@ac_cv_have_systypes_h@/1/g'" +
" -e 's/@ac_cv_have_u_int16_t@/0/g'" +
" -e 's/@ac_cv_have_uint16_t@/1/g'" +
" -e 's/@ac_cv_have_unistd_h@/1/g'" +
" -e 's/@ac_google_end_namespace@/}/g'" +
" -e 's/@ac_google_namespace@/google/g'" +
" -e 's/@ac_google_start_namespace@/namespace google {/g'" +
" $< > $@"),
)
# Hardcoded ios arm config header for glog library.
# TODO: This is a temporary workaround. We should generate the config
# header by running the configure script with the right target toolchain.
IOS_ARM_CONFIG = """
/* define if glog doesnt use RTTI */
/* #undef DISABLE_RTTI */
/* Namespace for Google classes */
#define GOOGLE_NAMESPACE google
/* Define if you have the 'dladdr' function */
#define HAVE_DLADDR 1
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the <execinfo.h> header file. */
#define HAVE_EXECINFO_H 1
/* Define if you have the 'fcntl' function */
#define HAVE_FCNTL 1
/* Define to 1 if you have the <glob.h> header file. */
#define HAVE_GLOB_H 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the 'pthread' library (-lpthread). */
#define HAVE_LIBPTHREAD 1
/* Define to 1 if you have the <libunwind.h> header file. */
#define HAVE_LIBUNWIND_H 1
/* define if you have google gflags library */
/* #undef HAVE_LIB_GFLAGS */
/* define if you have google gmock library */
/* #undef HAVE_LIB_GMOCK */
/* define if you have google gtest library */
/* #undef HAVE_LIB_GTEST */
/* define if you have libunwind */
/* #undef HAVE_LIB_UNWIND */
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* define if the compiler implements namespaces */
#define HAVE_NAMESPACES 1
/* Define if you have the 'pread' function */
#define HAVE_PREAD 1
/* Define if you have POSIX threads libraries and header files. */
#define HAVE_PTHREAD 1
/* Define to 1 if you have the <pwd.h> header file. */
#define HAVE_PWD_H 1
/* Define if you have the 'pwrite' function */
#define HAVE_PWRITE 1
/* define if the compiler implements pthread_rwlock_* */
#define HAVE_RWLOCK 1
/* Define if you have the 'sigaction' function */
#define HAVE_SIGACTION 1
/* Define if you have the 'sigaltstack' function */
#define HAVE_SIGALTSTACK 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <syscall.h> header file. */
/* #undef HAVE_SYSCALL_H */
/* Define to 1 if you have the <syslog.h> header file. */
#define HAVE_SYSLOG_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/syscall.h> header file. */
#define HAVE_SYS_SYSCALL_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/ucontext.h> header file. */
#define HAVE_SYS_UCONTEXT_H 1
/* Define to 1 if you have the <sys/utsname.h> header file. */
#define HAVE_SYS_UTSNAME_H 1
/* Define to 1 if you have the <ucontext.h> header file. */
/* #undef HAVE_UCONTEXT_H */
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the <unwind.h> header file. */
#define HAVE_UNWIND_H 1
/* define if the compiler supports using expression for operator */
#define HAVE_USING_OPERATOR 1
/* define if your compiler has __attribute__ */
#define HAVE___ATTRIBUTE__ 1
/* define if your compiler has __builtin_expect */
#define HAVE___BUILTIN_EXPECT 1
/* define if your compiler has __sync_val_compare_and_swap */
#define HAVE___SYNC_VAL_COMPARE_AND_SWAP 1
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"
/* Name of package */
#define PACKAGE "glog"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "[email protected]"
/* Define to the full name of this package. */
#define PACKAGE_NAME "glog"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "glog 0.3.5"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "glog"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "0.3.5"
/* How to access the PC from a struct ucontext */
/* #undef PC_FROM_UCONTEXT */
/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
/* #undef PTHREAD_CREATE_JOINABLE */
/* The size of 'void *', as computed by sizeof. */
#define SIZEOF_VOID_P 8
/* Define to 1 if you have the ANSI C header files. */
/* #undef STDC_HEADERS */
/* the namespace where STL code like vector<> is defined */
#define STL_NAMESPACE std
/* location of source code */
#define TEST_SRC_DIR "external/com_google_glog"
/* Version number of package */
#define VERSION "0.3.5"
/* Stops putting the code inside the Google namespace */
#define _END_GOOGLE_NAMESPACE_ }
/* Puts following code inside the Google namespace */
#define _START_GOOGLE_NAMESPACE_ namespace google {
"""
genrule(
name = "gen_ios_arm_config",
outs = ["config.h.ios_arm"],
cmd = ("echo '%s' > $(location config.h.ios_arm)" % IOS_ARM_CONFIG),
)
+8
View File
@@ -0,0 +1,8 @@
licenses(["notice"])
load(":bazel/glog.bzl", "glog_library")
# gflags is not needed on mobile platforms, and tried to link in
# -lpthread, which breaks Android builds.
# TODO: upstream.
glog_library(with_gflags = 0)
+10 -13
View File
@@ -5,25 +5,22 @@ licenses(["notice"]) # BSD license
exports_files(["LICENSE"])
# The following build rule assumes that OpenCV is installed by
# 'brew install opencv@3' command on macos.
# If you install OpenCV separately, please modify the build rule accordingly.
cc_library(
name = "opencv",
srcs = glob(
[
"local/opt/opencv@3/lib/libopencv_core.dylib",
"local/opt/opencv@3/lib/libopencv_calib3d.dylib",
"local/opt/opencv@3/lib/libopencv_features2d.dylib",
"local/opt/opencv@3/lib/libopencv_highgui.dylib",
"local/opt/opencv@3/lib/libopencv_imgcodecs.dylib",
"local/opt/opencv@3/lib/libopencv_imgproc.dylib",
"local/opt/opencv@3/lib/libopencv_video.dylib",
"local/opt/opencv@3/lib/libopencv_videoio.dylib",
"lib/libopencv_core.dylib",
"lib/libopencv_calib3d.dylib",
"lib/libopencv_features2d.dylib",
"lib/libopencv_highgui.dylib",
"lib/libopencv_imgcodecs.dylib",
"lib/libopencv_imgproc.dylib",
"lib/libopencv_video.dylib",
"lib/libopencv_videoio.dylib",
],
),
hdrs = glob(["local/opt/opencv@3/include/opencv2/**/*.h*"]),
includes = ["local/opt/opencv@3/include/"],
hdrs = glob(["include/opencv2/**/*.h*"]),
includes = ["include/"],
linkstatic = 1,
visibility = ["//visibility:public"],
)