2023-07-25 11:53:09 +02:00
|
|
|
load("@rules_cc//cc:defs.bzl", "cc_library")
|
|
|
|
load("//tools/project:build_defs.bzl", "project")
|
|
|
|
|
|
|
|
project()
|
|
|
|
|
|
|
|
genrule(
|
|
|
|
name = "public_headers",
|
|
|
|
srcs = [
|
|
|
|
"//c-toxcore/toxav:toxav.h",
|
|
|
|
"//c-toxcore/toxcore:tox.h",
|
2023-12-15 15:21:40 +01:00
|
|
|
"//c-toxcore/toxcore:tox_private.h",
|
2023-07-25 11:53:09 +02:00
|
|
|
"//c-toxcore/toxencryptsave:toxencryptsave.h",
|
|
|
|
],
|
|
|
|
outs = [
|
|
|
|
"tox/toxav.h",
|
|
|
|
"tox/tox.h",
|
2023-12-15 15:21:40 +01:00
|
|
|
"tox/tox_private.h",
|
2023-07-25 11:53:09 +02:00
|
|
|
"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
|
2023-12-15 15:21:40 +01:00
|
|
|
cp $(location //c-toxcore/toxcore:tox_private.h) $(GENDIR)/c-toxcore/tox/tox_private.h
|
2023-07-25 11:53:09 +02:00
|
|
|
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",
|
|
|
|
],
|
|
|
|
)
|