forked from JFreegman/toxic
-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
BUILD.bazel
113 lines (105 loc) · 2.26 KB
/
BUILD.bazel
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test")
load("//tools/project:build_defs.bzl", "project")
project(license = "gpl3-https")
AV_SRCS = [
"src/audio*.c",
"src/video*.c",
"src/x11*.c",
]
COPTS = [
"-D_DEFAULT_SOURCE",
"-DGAMES",
"-DHAVE_WIDECHAR",
"-DPACKAGE_DATADIR='\"data\"'",
"-DQRCODE",
] + select({
"//tools/config:linux-x86_64": [
"-DAUDIO",
"-DVIDEO",
"-DPYTHON",
],
"//conditions:default": [],
})
cc_library(
name = "libtoxic",
srcs = glob(
[
"src/*.c",
"src/*.h",
],
exclude = ["src/main.c"] + AV_SRCS,
) + select({
"//tools/config:linux-x86_64": glob(AV_SRCS),
"//conditions:default": [],
}),
hdrs = glob(["src/*.h"]),
copts = COPTS,
tags = ["no-windows"],
deps = [
"//c-toxcore",
"@curl",
"@libconfig",
"@libqrencode",
"@ncurses",
] + select({
"//tools/config:linux-x86_64": [
"@libvpx",
"@openal",
"@python3//:python",
"@x11",
"@xproto",
],
"//conditions:default": [],
}),
)
cc_binary(
name = "toxic",
srcs = ["src/main.c"],
copts = COPTS,
tags = ["no-windows"],
deps = [
":libtoxic",
"//c-toxcore",
"@curl",
"@libconfig",
"@libqrencode",
"@ncurses",
] + select({
"//tools/config:linux-x86_64": [
"@libvpx",
"@openal",
"@python3//:python",
"@x11",
],
"//conditions:default": [],
}),
)
sh_test(
name = "toxic_test",
size = "small",
srcs = [":toxic"],
args = ["--help"],
tags = ["no-windows"],
)
cc_test(
name = "line_info_test",
size = "small",
srcs = ["src/line_info_test.cc"],
tags = ["no-windows"],
deps = [
":libtoxic",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "misc_tools_test",
size = "small",
srcs = ["src/misc_tools_test.cc"],
tags = ["no-windows"],
deps = [
":libtoxic",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)