aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/systemlibs
diff options
context:
space:
mode:
authorGravatar Jason Zaman <jason@perfinion.com>2018-06-26 19:44:49 +0800
committerGravatar Jason Zaman <jason@perfinion.com>2018-07-13 11:25:51 +0800
commit209e4d12a2f0237768d1306a5be411479a8d4b12 (patch)
tree915f8ef1f47d612b419d19d3865d55df351e5bfa /third_party/systemlibs
parent9cfb09e670557cb9f92a72295c0f1974f6e00108 (diff)
third_party: unbundle jsoncpp dep
The jsoncpp headers are included with a different path so we have to symlink them so the are in the dir structure that is expected. Signed-off-by: Jason Zaman <jason@perfinion.com>
Diffstat (limited to 'third_party/systemlibs')
-rw-r--r--third_party/systemlibs/jsoncpp.BUILD37
-rw-r--r--third_party/systemlibs/syslibs_configure.bzl1
2 files changed, 38 insertions, 0 deletions
diff --git a/third_party/systemlibs/jsoncpp.BUILD b/third_party/systemlibs/jsoncpp.BUILD
new file mode 100644
index 0000000000..cf91917cfb
--- /dev/null
+++ b/third_party/systemlibs/jsoncpp.BUILD
@@ -0,0 +1,37 @@
+licenses(["unencumbered"]) # Public Domain or MIT
+
+filegroup(
+ name = "LICENSE",
+ visibility = ["//visibility:public"],
+)
+
+HEADERS = [
+ "include/json/autolink.h",
+ "include/json/config.h",
+ "include/json/features.h",
+ "include/json/forwards.h",
+ "include/json/json.h",
+ "include/json/reader.h",
+ "include/json/value.h",
+ "include/json/version.h",
+ "include/json/writer.h",
+]
+
+genrule(
+ name = "link_headers",
+ outs = HEADERS,
+ cmd = """
+ for i in $(OUTS); do
+ i=$${i##*/}
+ ln -vsf /usr/include/jsoncpp/json/$$i $(@D)/include/json/$$i
+ done
+ """,
+)
+
+cc_library(
+ name = "jsoncpp",
+ hdrs = HEADERS,
+ includes = ["."],
+ linkopts = ["-ljsoncpp"],
+ visibility = ["//visibility:public"],
+)
diff --git a/third_party/systemlibs/syslibs_configure.bzl b/third_party/systemlibs/syslibs_configure.bzl
index d2da333e60..2188ffce66 100644
--- a/third_party/systemlibs/syslibs_configure.bzl
+++ b/third_party/systemlibs/syslibs_configure.bzl
@@ -19,6 +19,7 @@ VALID_LIBS=[
"grpc",
"jemalloc",
"jpeg",
+ "jsoncpp_git",
"lmdb",
"nasm",
"org_sqlite",