Internal change

PiperOrigin-RevId: 251624033
Change-Id: I9b2ab423082be3bfdb6da66ab7a8e77e5673789b
This commit is contained in:
Christian Blichmann 2019-06-05 05:28:34 -07:00 committed by Copybara-Service
parent ffd4e1270a
commit e09bda2628
3 changed files with 30 additions and 3 deletions

View File

@ -26,6 +26,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
list(APPEND CMAKE_PREFIX_PATH
"${PROJECT_BINARY_DIR}/Dependencies/Build/gflags"
"${PROJECT_BINARY_DIR}/Dependencies/Build/glog"
"${PROJECT_BINARY_DIR}/Dependencies/Build/protobuf"
)
include(SapiCompilerOptions)
@ -85,6 +86,7 @@ add_library(sapi::base ALIAS sapi_base)
target_include_directories(sapi_base INTERFACE
${PROJECT_BINARY_DIR}
${PROJECT_SOURCE_DIR}
${Protobuf_INCLUDE_DIR}
# Need to reach into Abseil internal headers from a few targets.
${PROJECT_BINARY_DIR}/Dependencies/Source/absl
)

View File

@ -17,6 +17,13 @@ workspace(name = "com_google_sandboxed_api")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("//sandboxed_api/bazel:repositories.bzl", "autotools_repository")
# Bazel Skylib, needed by newer Protobuf builds
http_archive(
name = "bazel_skylib",
sha256 = "2ef429f5d7ce7111263289644d233707dba35e39696377ebab8b0bc701f7818e",
url = "https://github.com/bazelbuild/bazel-skylib/releases/download/0.8.0/bazel-skylib.0.8.0.tar.gz", # 2019-03-20
)
# Abseil
http_archive(
name = "com_google_absl",
@ -106,11 +113,15 @@ http_archive(
# Protobuf
http_archive(
name = "com_google_protobuf",
sha256 = "9510dd2afc29e7245e9e884336f848c8a6600a14ae726adb6befdb4f786f0be2",
strip_prefix = "protobuf-3.6.1.3",
urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.6.1.3.zip"],
sha256 = "1e622ce4b84b88b6d2cdf1db38d1a634fe2392d74f0b7b74ff98f3a51838ee53",
strip_prefix = "protobuf-3.8.0",
urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.8.0.zip"],
)
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
protobuf_deps()
# libcap
http_archive(
name = "org_kernel_libcap",

View File

@ -61,6 +61,20 @@ ExternalProject_Add(libunwind
)
list(APPEND DEPENDENCIES libunwind)
ExternalProject_Add(protobuf
GIT_REPOSITORY https://github.com/protocolbuffers/protobuf.git
GIT_TAG e08f01ce6a78a6cf2834dfa37281eb366eb0c5c3 # 2019-06-05
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/Dependencies/Build/protobuf
SOURCE_SUBDIR cmake
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
-DCMAKE_BUILD_TYPE=@CMAKE_BUILD_TYPE@
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-Dprotobuf_BUILD_TESTS=OFF
-Dprotobuf_BUILD_SHARED_LIBS=OFF
-Dprotobuf_WITH_ZLIB=OFF
)
list(APPEND DEPENDENCIES protobuf)
ExternalProject_Add(sandboxed_api
DEPENDS ${DEPENDENCIES}
SOURCE_DIR ${PROJECT_SOURCE_DIR}