toxcore/toxav/BUILD.bazel
iphydf c1b32bd7a1
chore: Enable compiler layering check.
This ensures that we're explicit about what we depend on and avoids
transitive dependencies.
2022-01-11 15:26:32 +00:00

162 lines
3.2 KiB
Python

load("@rules_cc//cc:defs.bzl", "cc_test")
load("//tools:no_undefined.bzl", "cc_library")
package(features = ["layering_check"])
filegroup(
name = "public_headers",
srcs = ["toxav.h"],
visibility = ["//c-toxcore:__pkg__"],
)
cc_library(
name = "public",
hdrs = [":public_headers"],
)
cc_library(
name = "ring_buffer",
srcs = ["ring_buffer.c"],
hdrs = ["ring_buffer.h"],
deps = ["//c-toxcore/toxcore:ccompat"],
)
cc_test(
name = "ring_buffer_test",
size = "small",
srcs = ["ring_buffer_test.cc"],
deps = [
":ring_buffer",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
cc_library(
name = "ring_buffer_srcs",
hdrs = [
"ring_buffer.c",
"ring_buffer.h",
],
visibility = ["//c-toxcore/testing:__pkg__"],
deps = ["//c-toxcore/toxcore:ccompat"],
)
cc_library(
name = "bwcontroller",
srcs = ["bwcontroller.c"],
hdrs = ["bwcontroller.h"],
deps = [
":ring_buffer",
"//c-toxcore/toxcore",
"//c-toxcore/toxcore:Messenger",
"//c-toxcore/toxcore:logger",
"//c-toxcore/toxcore:mono_time",
"//c-toxcore/toxcore:network",
],
)
cc_library(
name = "rtp",
srcs = ["rtp.c"],
hdrs = ["rtp.h"],
deps = [
":bwcontroller",
"//c-toxcore/toxcore:Messenger",
"//c-toxcore/toxcore:logger",
"//c-toxcore/toxcore:mono_time",
"//c-toxcore/toxcore:network",
],
)
cc_test(
name = "rtp_test",
size = "small",
srcs = ["rtp_test.cc"],
deps = [
":rtp",
"//c-toxcore/toxcore:crypto_core",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
cc_library(
name = "audio",
srcs = ["audio.c"],
hdrs = ["audio.h"],
deps = [
":public",
":rtp",
"//c-toxcore/toxcore:logger",
"//c-toxcore/toxcore:mono_time",
"//c-toxcore/toxcore:network",
"@opus",
],
)
cc_library(
name = "video",
srcs = [
"msi.c",
"video.c",
],
hdrs = [
"msi.h",
"video.h",
],
deps = [
":audio",
":public",
":ring_buffer",
":rtp",
"//c-toxcore/toxcore:logger",
"//c-toxcore/toxcore:mono_time",
"//c-toxcore/toxcore:network",
"@libvpx",
],
)
cc_library(
name = "groupav",
srcs = ["groupav.c"],
hdrs = ["groupav.h"],
deps = [
"//c-toxcore/toxcore",
"//c-toxcore/toxcore:logger",
"//c-toxcore/toxcore:mono_time",
"//c-toxcore/toxcore:network",
"@opus",
],
)
cc_library(
name = "toxav",
srcs = [
"toxav.c",
"toxav_old.c",
],
hdrs = [
"toxav.h",
],
visibility = ["//c-toxcore:__subpackages__"],
deps = [
":groupav",
":rtp",
":video",
"//c-toxcore/toxcore:Messenger",
"//c-toxcore/toxcore:logger",
"//c-toxcore/toxcore:mono_time",
"//c-toxcore/toxcore:network",
],
)
sh_library(
name = "cimple_files",
srcs = glob([
"*.c",
"*.h",
]),
visibility = ["//c-toxcore/testing:__pkg__"],
)