Repository navigation
Expand file tree
/
Copy pathBUILD.gn
More file actions
166 lines (152 loc) · 4.19 KB
/
Copy pathBUILD.gn
File metadata and controls
166 lines (152 loc) · 4.19 KB
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# Copyright 2018 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build_overrides/build.gni")
import("./build_overrides/data_headers_template.gni")
import("./gni/openscreen.gni")
import("cast/streaming/external_libraries.gni")
declare_args() {
build_python_bindings =
!build_with_chromium && have_ffmpeg && have_libopus && have_libvpx
}
# Used to ensure that relative includes still work while built with an embedder.
config("include_dirs") {
root = rebase_path("./", "//")
include_dirs = [
"//$root",
"$root_gen_dir/$root",
]
}
config("public_features") {
if (build_with_chromium) {
defines = [ "BUILD_WITH_CHROMIUM" ]
}
}
# Put defines here that are only used in our internal files and NEVER in
# external headers that embedders (such as chromium and node) might include.
config("features") {
# Only targets in this file and its subdirs can depend on this.
visibility = [ "./*" ]
root = rebase_path("./", "//")
defines = [ "OPENSCREEN_TEST_DATA_DIR=\"$root/test/data/\"" ]
if (is_clang) {
cflags = [ "-Werror=exit-time-destructors" ]
}
}
# All compilable non-test targets in the repository (both executables and
# source_sets)
group("gn_all") {
testonly = true
deps = [
"cast/common:certificate",
"cast/common:channel",
"cast/common:public",
"cast/receiver:channel",
"cast/sender:channel",
"osp/msgs",
"third_party/abseil",
"third_party/boringssl",
"third_party/googleurl",
"third_party/jsoncpp",
"third_party/tinycbor",
"tools/cddl($host_toolchain)",
"util",
]
# TODO(issuetracker.google.com/236163082): implement support on Windows.
if (!is_win) {
deps += [
"cast/streaming:receiver",
"cast/streaming:sender",
"discovery:dnssd",
"discovery:public",
"platform",
]
if (!build_with_chromium) {
deps += [
"cast/standalone_sender:cast_sender",
"osp",
"osp:osp_demo",
"third_party/protobuf:protoc($host_toolchain)",
# Quiche currently has an issue around logging macros on Windows.
"third_party/quiche",
"third_party/zlib",
]
if (build_python_bindings) {
deps += [
"cast/standalone_sender/bindings/python:cast_sender_python_bindings",
]
}
}
}
# The cast_receiver depends on the standalone implementation which is only
# implemented for certain operating systems.
if (is_linux || is_mac || is_chromeos || is_android) {
deps += [ "cast/standalone_receiver:cast_receiver" ]
}
visibility = []
}
openscreen_source_set("openscreen_unittests_all") {
testonly = true
public_deps = [
"cast/common:unittests",
"cast/receiver:unittests",
"cast/sender:unittests",
"cast/streaming:unittests",
"cast/test:unittests",
"discovery:unittests",
"platform:unittests",
"util:unittests",
]
if (!build_with_chromium && is_posix) {
public_deps += [ "cast/test:make_crl_tests($host_toolchain)" ]
}
if (!build_with_chromium) {
public_deps += [
"cast/standalone_sender:unittests",
"osp/msgs:unittests",
]
if (!is_win) {
public_deps += [ "osp:unittests" ]
}
}
if (build_python_bindings) {
public_deps += [ "cast/standalone_sender/bindings/python:unittests" ]
}
}
if (!build_with_chromium) {
openscreen_executable("openscreen_unittests") {
testonly = true
deps = [
":openscreen_unittests_all",
"cast/common:certificate_boringssl",
"test:test_main",
]
}
}
if (!build_with_chromium && is_posix) {
openscreen_source_set("e2e_tests_all") {
testonly = true
public_deps = [
"cast/test:e2e_tests",
"cast/test:make_crl_tests($host_toolchain)",
]
}
openscreen_executable("e2e_tests") {
testonly = true
deps = [
":e2e_tests_all",
"test:test_main",
]
}
}
if (!build_with_chromium) {
openscreen_source_set("fuzzer_tests_all") {
testonly = true
deps = [
"//cast/common:message_framer_fuzzer",
"//cast/streaming:compound_rtcp_parser_fuzzer",
"//cast/streaming:rtp_packet_parser_fuzzer",
"//cast/streaming:sender_report_parser_fuzzer",
]
}
}