Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Side by Side Diff: webrtc/tools/BUILD.gn

Issue 2301053002: GN: Introduce templates. (Closed)
Patch Set: Rebase. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
2 # 2 #
3 # Use of this source code is governed by a BSD-style license 3 # Use of this source code is governed by a BSD-style license
4 # that can be found in the LICENSE file in the root of the source 4 # that can be found in the LICENSE file in the root of the source
5 # tree. An additional intellectual property rights grant can be found 5 # tree. An additional intellectual property rights grant can be found
6 # in the file PATENTS. All contributing project authors may 6 # in the file PATENTS. All contributing project authors may
7 # be found in the AUTHORS file in the root of the source tree. 7 # be found in the AUTHORS file in the root of the source tree.
8 8
9 import("//testing/test.gni")
10 import("//third_party/protobuf/proto_library.gni") 9 import("//third_party/protobuf/proto_library.gni")
11 import("../build/webrtc.gni") 10 import("../build/webrtc.gni")
12 11
13 source_set("tools") { 12 rtc_source_set("tools") {
14 deps = [ 13 deps = [
15 ":command_line_parser", 14 ":command_line_parser",
16 ] 15 ]
17 16
18 if (!build_with_chromium) { 17 if (!build_with_chromium) {
19 # TODO(kjellander): Enable these when webrtc:5970 is fixed. 18 # TODO(kjellander): Enable these when webrtc:5970 is fixed.
20 deps += [ 19 deps += [
21 ":frame_analyzer", 20 ":frame_analyzer",
22 ":rgba_to_i420_converter", 21 ":rgba_to_i420_converter",
23 ] 22 ]
24 } 23 }
25 } 24 }
26 25
27 source_set("command_line_parser") { 26 rtc_source_set("command_line_parser") {
28 sources = [ 27 sources = [
29 "simple_command_line_parser.cc", 28 "simple_command_line_parser.cc",
30 "simple_command_line_parser.h", 29 "simple_command_line_parser.h",
31 ] 30 ]
32 deps = [ 31 deps = [
33 "../base:gtest_prod", 32 "../base:gtest_prod",
34 ] 33 ]
35 configs += [ "..:common_config" ] 34 configs += [ "..:common_config" ]
36 public_configs = [ "..:common_inherited_config" ] 35 public_configs = [ "..:common_inherited_config" ]
37 } 36 }
38 37
39 source_set("video_quality_analysis") { 38 rtc_source_set("video_quality_analysis") {
40 sources = [ 39 sources = [
41 "frame_analyzer/video_quality_analysis.cc", 40 "frame_analyzer/video_quality_analysis.cc",
42 "frame_analyzer/video_quality_analysis.h", 41 "frame_analyzer/video_quality_analysis.h",
43 ] 42 ]
44 43
45 configs += [ "..:common_config" ] 44 configs += [ "..:common_config" ]
46 public_configs = [ "..:common_inherited_config" ] 45 public_configs = [ "..:common_inherited_config" ]
47 46
48 deps = [ 47 deps = [
49 "../common_video", 48 "../common_video",
50 ] 49 ]
51 public_deps = [ 50 public_deps = [
52 "../common_video", 51 "../common_video",
53 ] 52 ]
54 } 53 }
55 54
56 executable("frame_analyzer") { 55 rtc_executable("frame_analyzer") {
57 sources = [ 56 sources = [
58 "frame_analyzer/frame_analyzer.cc", 57 "frame_analyzer/frame_analyzer.cc",
59 ] 58 ]
60 59
61 configs += [ "..:common_config" ] 60 configs += [ "..:common_config" ]
62 public_configs = [ "..:common_inherited_config" ] 61 public_configs = [ "..:common_inherited_config" ]
63 62
64 deps = [ 63 deps = [
65 ":command_line_parser", 64 ":command_line_parser",
66 ":video_quality_analysis", 65 ":video_quality_analysis",
67 "//build/config/sanitizers:deps", 66 "//build/config/sanitizers:deps",
68 "//build/win:default_exe_manifest", 67 "//build/win:default_exe_manifest",
69 ] 68 ]
70 } 69 }
71 70
72 executable("psnr_ssim_analyzer") { 71 rtc_executable("psnr_ssim_analyzer") {
73 sources = [ 72 sources = [
74 "psnr_ssim_analyzer/psnr_ssim_analyzer.cc", 73 "psnr_ssim_analyzer/psnr_ssim_analyzer.cc",
75 ] 74 ]
76 75
77 configs += [ "..:common_config" ] 76 configs += [ "..:common_config" ]
78 public_configs = [ "..:common_inherited_config" ] 77 public_configs = [ "..:common_inherited_config" ]
79 78
80 deps = [ 79 deps = [
81 ":command_line_parser", 80 ":command_line_parser",
82 ":video_quality_analysis", 81 ":video_quality_analysis",
83 "//build/config/sanitizers:deps", 82 "//build/config/sanitizers:deps",
84 "//build/win:default_exe_manifest", 83 "//build/win:default_exe_manifest",
85 ] 84 ]
86 } 85 }
87 86
88 executable("rgba_to_i420_converter") { 87 rtc_executable("rgba_to_i420_converter") {
89 sources = [ 88 sources = [
90 "converter/converter.cc", 89 "converter/converter.cc",
91 "converter/converter.h", 90 "converter/converter.h",
92 "converter/rgba_to_i420_converter.cc", 91 "converter/rgba_to_i420_converter.cc",
93 ] 92 ]
94 93
95 configs += [ "..:common_config" ] 94 configs += [ "..:common_config" ]
96 public_configs = [ "..:common_inherited_config" ] 95 public_configs = [ "..:common_inherited_config" ]
97 96
98 deps = [ 97 deps = [
99 ":command_line_parser", 98 ":command_line_parser",
100 "../common_video", 99 "../common_video",
101 "//build/config/sanitizers:deps", 100 "//build/config/sanitizers:deps",
102 "//build/win:default_exe_manifest", 101 "//build/win:default_exe_manifest",
103 ] 102 ]
104 } 103 }
105 104
106 source_set("frame_editing_lib") { 105 rtc_source_set("frame_editing_lib") {
107 sources = [ 106 sources = [
108 "frame_editing/frame_editing_lib.cc", 107 "frame_editing/frame_editing_lib.cc",
109 "frame_editing/frame_editing_lib.h", 108 "frame_editing/frame_editing_lib.h",
110 ] 109 ]
111 110
112 configs += [ "..:common_config" ] 111 configs += [ "..:common_config" ]
113 public_configs = [ "..:common_inherited_config" ] 112 public_configs = [ "..:common_inherited_config" ]
114 113
115 # TODO(jschuh): Bug 1348: fix this warning. 114 # TODO(jschuh): Bug 1348: fix this warning.
116 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] 115 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
117 116
118 if (is_clang) { 117 if (is_clang) {
119 # Suppress warnings from the Chromium Clang plugin. 118 # Suppress warnings from the Chromium Clang plugin.
120 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. 119 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
121 configs -= [ "//build/config/clang:find_bad_constructs" ] 120 configs_suppressions += [ "//build/config/clang:find_bad_constructs" ]
122 } 121 }
123 122
124 deps = [ 123 deps = [
125 "../common_video", 124 "../common_video",
126 ] 125 ]
127 } 126 }
128 127
129 executable("frame_editor") { 128 rtc_executable("frame_editor") {
130 sources = [ 129 sources = [
131 "frame_editing/frame_editing.cc", 130 "frame_editing/frame_editing.cc",
132 ] 131 ]
133 132
134 configs += [ "..:common_config" ] 133 configs += [ "..:common_config" ]
135 public_configs = [ "..:common_inherited_config" ] 134 public_configs = [ "..:common_inherited_config" ]
136 135
137 deps = [ 136 deps = [
138 ":command_line_parser", 137 ":command_line_parser",
139 ":frame_editing_lib", 138 ":frame_editing_lib",
140 "//build/config/sanitizers:deps", 139 "//build/config/sanitizers:deps",
141 "//build/win:default_exe_manifest", 140 "//build/win:default_exe_manifest",
142 ] 141 ]
143 } 142 }
144 143
145 executable("force_mic_volume_max") { 144 rtc_executable("force_mic_volume_max") {
146 sources = [ 145 sources = [
147 "force_mic_volume_max/force_mic_volume_max.cc", 146 "force_mic_volume_max/force_mic_volume_max.cc",
148 ] 147 ]
149 148
150 configs += [ "..:common_config" ] 149 configs += [ "..:common_config" ]
151 public_configs = [ "..:common_inherited_config" ] 150 public_configs = [ "..:common_inherited_config" ]
152 151
153 if (is_clang) { 152 if (is_clang) {
154 # Suppress warnings from the Chromium Clang plugin. 153 # Suppress warnings from the Chromium Clang plugin.
155 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. 154 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
156 configs -= [ "//build/config/clang:find_bad_constructs" ] 155 configs_suppressions += [ "//build/config/clang:find_bad_constructs" ]
157 } 156 }
158 157
159 deps = [ 158 deps = [
160 "../system_wrappers:system_wrappers_default", 159 "../system_wrappers:system_wrappers_default",
161 "../voice_engine", 160 "../voice_engine",
162 "//build/config/sanitizers:deps", 161 "//build/config/sanitizers:deps",
163 "//build/win:default_exe_manifest", 162 "//build/win:default_exe_manifest",
164 ] 163 ]
165 } 164 }
166 165
167 source_set("agc_test_utils") { 166 rtc_source_set("agc_test_utils") {
168 testonly = true 167 testonly = true
169 sources = [ 168 sources = [
170 "agc/test_utils.cc", 169 "agc/test_utils.cc",
171 "agc/test_utils.h", 170 "agc/test_utils.h",
172 ] 171 ]
173 172
174 configs += [ "..:common_config" ] 173 configs += [ "..:common_config" ]
175 public_configs = [ "..:common_inherited_config" ] 174 public_configs = [ "..:common_inherited_config" ]
176 } 175 }
177 176
178 if (rtc_enable_protobuf) { 177 if (rtc_enable_protobuf) {
179 proto_library("graph_proto") { 178 proto_library("graph_proto") {
180 sources = [ 179 sources = [
181 "event_log_visualizer/graph.proto", 180 "event_log_visualizer/graph.proto",
182 ] 181 ]
183 proto_out_dir = "webrtc/tools/event_log_visualizer" 182 proto_out_dir = "webrtc/tools/event_log_visualizer"
184 } 183 }
185 184
186 source_set("event_log_visualizer_utils") { 185 rtc_source_set("event_log_visualizer_utils") {
187 sources = [ 186 sources = [
188 "event_log_visualizer/analyzer.cc", 187 "event_log_visualizer/analyzer.cc",
189 "event_log_visualizer/analyzer.h", 188 "event_log_visualizer/analyzer.h",
190 "event_log_visualizer/plot_base.cc", 189 "event_log_visualizer/plot_base.cc",
191 "event_log_visualizer/plot_base.h", 190 "event_log_visualizer/plot_base.h",
192 "event_log_visualizer/plot_protobuf.cc", 191 "event_log_visualizer/plot_protobuf.cc",
193 "event_log_visualizer/plot_protobuf.h", 192 "event_log_visualizer/plot_protobuf.h",
194 "event_log_visualizer/plot_python.cc", 193 "event_log_visualizer/plot_python.cc",
195 "event_log_visualizer/plot_python.h", 194 "event_log_visualizer/plot_python.h",
196 ] 195 ]
197 configs += [ "..:common_config" ] 196 configs += [ "..:common_config" ]
198 public_configs = [ "..:common_inherited_config" ] 197 public_configs = [ "..:common_inherited_config" ]
199 if (is_clang && !is_nacl) { 198 if (is_clang && !is_nacl) {
200 # Suppress warnings from the Chromium Clang plugin. 199 # Suppress warnings from the Chromium Clang plugin.
201 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. 200 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
202 configs -= [ "//build/config/clang:find_bad_constructs" ] 201 configs_suppressions += [ "//build/config/clang:find_bad_constructs" ]
203 } 202 }
204 defines = [ "ENABLE_RTC_EVENT_LOG" ] 203 defines = [ "ENABLE_RTC_EVENT_LOG" ]
205 deps = [ 204 deps = [
206 "../:rtc_event_log", 205 "../:rtc_event_log",
207 "../:rtc_event_log_parser", 206 "../:rtc_event_log_parser",
208 "../modules/congestion_controller:congestion_controller", 207 "../modules/congestion_controller:congestion_controller",
209 "../modules/rtp_rtcp:rtp_rtcp", 208 "../modules/rtp_rtcp:rtp_rtcp",
210 "../system_wrappers:system_wrappers_default", 209 "../system_wrappers:system_wrappers_default",
211 "//build/config/sanitizers:deps", 210 "//build/config/sanitizers:deps",
212 ] 211 ]
213 public_deps = [ 212 public_deps = [
214 ":graph_proto", 213 ":graph_proto",
215 "../:rtc_event_log_parser", 214 "../:rtc_event_log_parser",
216 ] 215 ]
217 } 216 }
218 } 217 }
219 218
220 # Exclude tools depending on gflags since that's not available in Chromium. 219 # Exclude tools depending on gflags since that's not available in Chromium.
221 if (rtc_include_tests) { 220 if (rtc_include_tests) {
222 if (rtc_enable_protobuf) { 221 if (rtc_enable_protobuf) {
223 executable("event_log_visualizer") { 222 rtc_executable("event_log_visualizer") {
224 testonly = true 223 testonly = true
225 sources = [ 224 sources = [
226 "event_log_visualizer/main.cc", 225 "event_log_visualizer/main.cc",
227 ] 226 ]
228 227
229 configs += [ "..:common_config" ] 228 configs += [ "..:common_config" ]
230 public_configs = [ "..:common_inherited_config" ] 229 public_configs = [ "..:common_inherited_config" ]
231 230
232 if (is_clang && !is_nacl) { 231 if (is_clang && !is_nacl) {
233 # Suppress warnings from the Chromium Clang plugin. 232 # Suppress warnings from the Chromium Clang plugin.
234 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. 233 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
235 configs -= [ "//build/config/clang:find_bad_constructs" ] 234 configs_suppressions += [ "//build/config/clang:find_bad_constructs" ]
236 } 235 }
237 236
238 defines = [ "ENABLE_RTC_EVENT_LOG" ] 237 defines = [ "ENABLE_RTC_EVENT_LOG" ]
239 deps = [ 238 deps = [
240 ":event_log_visualizer_utils", 239 ":event_log_visualizer_utils",
241 "//build/config/sanitizers:deps", 240 "//build/config/sanitizers:deps",
242 "//third_party/gflags", 241 "//third_party/gflags",
243 ] 242 ]
244 } 243 }
245 } 244 }
246 245
247 executable("agc_harness") { 246 rtc_executable("agc_harness") {
248 testonly = true 247 testonly = true
249 sources = [ 248 sources = [
250 "agc/agc_harness.cc", 249 "agc/agc_harness.cc",
251 ] 250 ]
252 251
253 configs += [ "..:common_config" ] 252 configs += [ "..:common_config" ]
254 public_configs = [ "..:common_inherited_config" ] 253 public_configs = [ "..:common_inherited_config" ]
255 254
256 if (is_clang) { 255 if (is_clang) {
257 # Suppress warnings from the Chromium Clang plugin. 256 # Suppress warnings from the Chromium Clang plugin.
258 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. 257 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
259 configs -= [ "//build/config/clang:find_bad_constructs" ] 258 configs_suppressions += [ "//build/config/clang:find_bad_constructs" ]
260 } 259 }
261 260
262 deps = [ 261 deps = [
263 "../system_wrappers:system_wrappers_default", 262 "../system_wrappers:system_wrappers_default",
264 "../test:channel_transport", 263 "../test:channel_transport",
265 "../test:test_support", 264 "../test:test_support",
266 "../voice_engine", 265 "../voice_engine",
267 "//build/config/sanitizers:deps", 266 "//build/config/sanitizers:deps",
268 "//build/win:default_exe_manifest", 267 "//build/win:default_exe_manifest",
269 "//testing/gtest", 268 "//testing/gtest",
270 "//third_party/gflags", 269 "//third_party/gflags",
271 ] 270 ]
272 } 271 }
273 272
274 executable("activity_metric") { 273 rtc_executable("activity_metric") {
275 testonly = true 274 testonly = true
276 sources = [ 275 sources = [
277 "agc/activity_metric.cc", 276 "agc/activity_metric.cc",
278 ] 277 ]
279 278
280 configs += [ "..:common_config" ] 279 configs += [ "..:common_config" ]
281 public_configs = [ "..:common_inherited_config" ] 280 public_configs = [ "..:common_inherited_config" ]
282 281
283 if (is_clang) { 282 if (is_clang) {
284 # Suppress warnings from the Chromium Clang plugin. 283 # Suppress warnings from the Chromium Clang plugin.
285 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. 284 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
286 configs -= [ "//build/config/clang:find_bad_constructs" ] 285 configs_suppressions += [ "//build/config/clang:find_bad_constructs" ]
287 } 286 }
288 287
289 deps = [ 288 deps = [
290 "../modules/audio_processing", 289 "../modules/audio_processing",
291 "../system_wrappers:metrics_default", 290 "../system_wrappers:metrics_default",
292 "//build/config/sanitizers:deps", 291 "//build/config/sanitizers:deps",
293 "//build/win:default_exe_manifest", 292 "//build/win:default_exe_manifest",
294 "//testing/gtest", 293 "//testing/gtest",
295 "//third_party/gflags", 294 "//third_party/gflags",
296 ] 295 ]
297 } 296 }
298 297
299 executable("audio_e2e_harness") { 298 rtc_executable("audio_e2e_harness") {
300 testonly = true 299 testonly = true
301 sources = [ 300 sources = [
302 "e2e_quality/audio/audio_e2e_harness.cc", 301 "e2e_quality/audio/audio_e2e_harness.cc",
303 ] 302 ]
304 303
305 configs += [ "..:common_config" ] 304 configs += [ "..:common_config" ]
306 public_configs = [ "..:common_inherited_config" ] 305 public_configs = [ "..:common_inherited_config" ]
307 306
308 if (is_clang) { 307 if (is_clang) {
309 # Suppress warnings from the Chromium Clang plugin. 308 # Suppress warnings from the Chromium Clang plugin.
310 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. 309 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
311 configs -= [ "//build/config/clang:find_bad_constructs" ] 310 configs_suppressions += [ "//build/config/clang:find_bad_constructs" ]
312 } 311 }
313 312
314 deps = [ 313 deps = [
315 "../system_wrappers:system_wrappers_default", 314 "../system_wrappers:system_wrappers_default",
316 "../test:channel_transport", 315 "../test:channel_transport",
317 "../voice_engine", 316 "../voice_engine",
318 "//build/config/sanitizers:deps", 317 "//build/config/sanitizers:deps",
319 "//build/win:default_exe_manifest", 318 "//build/win:default_exe_manifest",
320 "//testing/gtest", 319 "//testing/gtest",
321 "//third_party/gflags", 320 "//third_party/gflags",
322 ] 321 ]
323 } 322 }
324 323
325 if (is_android || is_ios) { 324 if (is_android || is_ios) {
326 tools_unittests_resources = [ "//resources/foreman_cif.yuv" ] 325 tools_unittests_resources = [ "//resources/foreman_cif.yuv" ]
327 } 326 }
328 327
329 if (is_ios) { 328 if (is_ios) {
330 bundle_data("tools_unittests_bundle_data") { 329 bundle_data("tools_unittests_bundle_data") {
331 testonly = true 330 testonly = true
332 sources = tools_unittests_resources 331 sources = tools_unittests_resources
333 outputs = [ 332 outputs = [
334 "{{bundle_resources_dir}}/{{source_file_part}}", 333 "{{bundle_resources_dir}}/{{source_file_part}}",
335 ] 334 ]
336 } 335 }
337 } 336 }
338 337
339 test("tools_unittests") { 338 rtc_test("tools_unittests") {
340 testonly = true 339 testonly = true
341 340
342 sources = [ 341 sources = [
343 "frame_analyzer/video_quality_analysis_unittest.cc", 342 "frame_analyzer/video_quality_analysis_unittest.cc",
344 "frame_editing/frame_editing_unittest.cc", 343 "frame_editing/frame_editing_unittest.cc",
345 "simple_command_line_parser_unittest.cc", 344 "simple_command_line_parser_unittest.cc",
346 ] 345 ]
347 346
348 configs += [ "..:common_config" ] 347 configs += [ "..:common_config" ]
349 public_configs = [ "..:common_inherited_config" ] 348 public_configs = [ "..:common_inherited_config" ]
350 349
351 # TODO(jschuh): Bug 1348: fix this warning. 350 # TODO(jschuh): Bug 1348: fix this warning.
352 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] 351 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
353 352
354 if (is_clang) { 353 if (is_clang) {
355 # Suppress warnings from the Chromium Clang plugin. 354 # Suppress warnings from the Chromium Clang plugin.
356 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. 355 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
357 configs -= [ "//build/config/clang:find_bad_constructs" ] 356 configs_suppressions += [ "//build/config/clang:find_bad_constructs" ]
358 } 357 }
359 358
360 deps = [ 359 deps = [
361 ":command_line_parser", 360 ":command_line_parser",
362 ":frame_editing_lib", 361 ":frame_editing_lib",
363 ":video_quality_analysis", 362 ":video_quality_analysis",
364 "../test:test_support_main", 363 "../test:test_support_main",
365 "//testing/gtest", 364 "//testing/gtest",
366 ] 365 ]
367 366
(...skipping 17 matching lines...) Expand all
385 ] 384 ]
386 outputs = [ 385 outputs = [
387 "$root_build_dir/{{source_file_part}}", 386 "$root_build_dir/{{source_file_part}}",
388 ] 387 ]
389 deps = [ 388 deps = [
390 "..:rtc_event_log_proto", 389 "..:rtc_event_log_proto",
391 ] 390 ]
392 } 391 }
393 } 392 }
394 } 393 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698