aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/systemlibs/jsoncpp.BUILD
blob: 526fd0c418cd23d922232d43a0d1362634f1d556 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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 -sf $(INCLUDEDIR)/jsoncpp/json/$$i $(@D)/include/json/$$i
      done
    """,
)

cc_library(
    name = "jsoncpp",
    hdrs = HEADERS,
    includes = ["."],
    linkopts = ["-ljsoncpp"],
    visibility = ["//visibility:public"],
)