2020-03-12 20:20:54 +08:00
|
|
|
load("@rules_cc//cc:defs.bzl", "cc_library")
|
2018-08-18 07:48:33 +08:00
|
|
|
load("//tools/project:build_defs.bzl", "project")
|
2018-02-19 06:26:26 +08:00
|
|
|
|
2022-01-12 05:28:53 +08:00
|
|
|
package(features = ["layering_check"])
|
|
|
|
|
2018-08-18 07:48:33 +08:00
|
|
|
project()
|
2018-02-19 06:26:26 +08:00
|
|
|
|
2018-01-18 23:14:50 +08:00
|
|
|
genrule(
|
|
|
|
name = "copy_headers",
|
|
|
|
srcs = [
|
2022-01-13 20:31:14 +08:00
|
|
|
"//c-toxcore/toxav:toxav.h",
|
|
|
|
"//c-toxcore/toxcore:tox.h",
|
|
|
|
"//c-toxcore/toxencryptsave:toxencryptsave.h",
|
2018-01-18 23:14:50 +08:00
|
|
|
],
|
|
|
|
outs = [
|
|
|
|
"tox/toxav.h",
|
|
|
|
"tox/tox.h",
|
|
|
|
"tox/toxencryptsave.h",
|
|
|
|
],
|
|
|
|
cmd = """
|
2022-01-13 20:31:14 +08:00
|
|
|
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/toxencryptsave:toxencryptsave.h) $(GENDIR)/c-toxcore/tox/toxencryptsave.h
|
2018-01-18 23:14:50 +08:00
|
|
|
""",
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
2018-01-23 03:34:52 +08:00
|
|
|
name = "c-toxcore",
|
2022-01-13 20:31:14 +08:00
|
|
|
hdrs = [":copy_headers"],
|
2018-01-18 23:14:50 +08:00
|
|
|
includes = ["."],
|
|
|
|
visibility = ["//visibility:public"],
|
2018-01-23 03:34:52 +08:00
|
|
|
deps = [
|
|
|
|
"//c-toxcore/toxav",
|
|
|
|
"//c-toxcore/toxcore",
|
|
|
|
"//c-toxcore/toxencryptsave",
|
|
|
|
],
|
2018-01-18 23:14:50 +08:00
|
|
|
)
|