File: BUILD.bazel

package info (click to toggle)
libtoxcore 0.2.22-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,992 kB
  • sloc: ansic: 70,235; cpp: 14,770; sh: 1,576; python: 649; makefile: 255; perl: 39
file content (54 lines) | stat: -rw-r--r-- 2,034 bytes parent folder | download
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
load("@rules_cc//cc:defs.bzl", "cc_library")
load("//tools/project:build_defs.bzl", "project")

project(license = "gpl3-https")

genrule(
    name = "public_headers",
    srcs = [
        "//c-toxcore/toxav:toxav.h",
        "//c-toxcore/toxcore:tox.h",
        "//c-toxcore/toxcore:tox_attributes.h",
        "//c-toxcore/toxcore:tox_dispatch.h",
        "//c-toxcore/toxcore:tox_events.h",
        "//c-toxcore/toxcore:tox_log_level.h",
        "//c-toxcore/toxcore:tox_options.h",
        "//c-toxcore/toxcore:tox_private.h",
        "//c-toxcore/toxencryptsave:toxencryptsave.h",
    ],
    outs = [
        "tox/toxav.h",
        "tox/tox.h",
        "tox/tox_attributes.h",
        "tox/tox_dispatch.h",
        "tox/tox_events.h",
        "tox/tox_log_level.h",
        "tox/tox_options.h",
        "tox/tox_private.h",
        "tox/toxencryptsave.h",
    ],
    cmd = """
        cp $(location //c-toxcore/toxav:toxav.h) $(GENDIR)/c-toxcore/tox/toxav.h
        cp $(location //c-toxcore/toxcore:tox.h) $(GENDIR)/c-toxcore/tox/tox.h
        cp $(location //c-toxcore/toxcore:tox_attributes.h) $(GENDIR)/c-toxcore/tox/tox_attributes.h
        cp $(location //c-toxcore/toxcore:tox_dispatch.h) $(GENDIR)/c-toxcore/tox/tox_dispatch.h
        cp $(location //c-toxcore/toxcore:tox_events.h) $(GENDIR)/c-toxcore/tox/tox_events.h
        cp $(location //c-toxcore/toxcore:tox_log_level.h) $(GENDIR)/c-toxcore/tox/tox_log_level.h
        cp $(location //c-toxcore/toxcore:tox_options.h) $(GENDIR)/c-toxcore/tox/tox_options.h
        cp $(location //c-toxcore/toxcore:tox_private.h) $(GENDIR)/c-toxcore/tox/tox_private.h
        cp $(location //c-toxcore/toxencryptsave:toxencryptsave.h) $(GENDIR)/c-toxcore/tox/toxencryptsave.h
    """,
    visibility = ["//visibility:public"],
)

cc_library(
    name = "c-toxcore",
    hdrs = [":public_headers"],
    includes = ["."],
    visibility = ["//visibility:public"],
    deps = [
        "//c-toxcore/toxav",
        "//c-toxcore/toxcore",
        "//c-toxcore/toxencryptsave",
    ],
)