Add json external dependency for OSS Bazel Build.

PiperOrigin-RevId: 523234242
This commit is contained in:
Suet-Fei Li
2023-04-10 15:57:18 -07:00
committed by Copybara-Service
parent a8bb29e1bf
commit 893da899a0
2 changed files with 20 additions and 2 deletions
+18
View File
@@ -80,6 +80,24 @@ cc_library(
urls = ["https://github.com/aappleby/smhasher/archive/master.zip"],
)
http_archive(
name = "nlohmann_json",
strip_prefix = "json-3.10.5",
build_file_content = """
cc_library(
name = "json",
hdrs = glob([
"include/nlohmann/**/*.hpp",
]),
includes = ["include"],
visibility = ["//visibility:public"],
alwayslink = True,
)""",
urls = [
"https://github.com/nlohmann/json/archive/refs/tags/v3.10.5.tar.gz",
],
)
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
# Load common dependencies.
protobuf_deps()
@@ -192,7 +192,6 @@ cc_library(
"//internal/platform/implementation/shared:count_down_latch",
"//internal/platform/implementation/shared:file",
"//internal/platform/implementation/windows/generated:types",
"//third_party/json",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/status",
@@ -201,6 +200,7 @@ cc_library(
"@com_google_absl//absl/strings:str_format",
"@com_google_absl//absl/synchronization",
"@com_google_absl//absl/time",
"@nlohmann_json//:json",
],
)
@@ -218,7 +218,7 @@ cc_library(
],
deps = [
"//internal/platform:base",
"//third_party/json",
"@nlohmann_json//:json",
],
)