blob: d5fcd2c65c6faf9ca5dc97ac3f3e0954838f616b [file] [log] [blame]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
Henrik Kjellander73e21802017-06-20 08:38:58 +02002#
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
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
Henrik Kjellanderc0362762017-06-29 08:03:04 +02009import("//build/config/crypto.gni")
10import("//build/config/ui.gni")
Henrik Kjellander73e21802017-06-20 08:38:58 +020011import("../webrtc.gni")
12
13if (is_android) {
14 import("//build/config/android/config.gni")
15 import("//build/config/android/rules.gni")
16}
17
Henrik Kjellanderc0362762017-06-29 08:03:04 +020018config("rtc_base_chromium_config") {
19 defines = [ "NO_MAIN_THREAD_WRAPPING" ]
20}
21
22config("rtc_base_all_dependent_config") {
23 if (is_ios) {
24 libs = [
25 "CFNetwork.framework",
Jiawei Ouc0216b82018-02-03 12:24:24 -080026 "Foundation.framework",
Henrik Kjellanderc0362762017-06-29 08:03:04 +020027 "Security.framework",
28 "SystemConfiguration.framework",
29 "UIKit.framework",
30 ]
31 }
32 if (is_mac) {
33 libs = [
34 "Cocoa.framework",
35 "Foundation.framework",
36 "IOKit.framework",
37 "Security.framework",
38 "SystemConfiguration.framework",
39 ]
40 }
41}
42
Dan Minor9cdd8762018-01-16 10:40:39 -050043if (!rtc_build_ssl) {
Henrik Kjellanderc0362762017-06-29 08:03:04 +020044 config("external_ssl_library") {
45 assert(rtc_ssl_root != "",
46 "You must specify rtc_ssl_root when rtc_build_ssl==0.")
47 include_dirs = [ rtc_ssl_root ]
48 }
49}
50
Oleh Prypindd214742018-07-17 13:49:46 +020051rtc_source_set("protobuf_utils") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000052 visibility = [ "*" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +020053 sources = [
54 "protobuf_utils.h",
55 ]
56 if (rtc_enable_protobuf) {
Mirko Bonadeid8661a02018-08-13 15:04:25 +020057 public_configs = [ "//third_party/protobuf:protobuf_config" ]
58 deps = [
Henrik Kjellanderc0362762017-06-29 08:03:04 +020059 "//third_party/protobuf:protobuf_lite",
60 ]
61 }
62}
63
Oleh Prypindd214742018-07-17 13:49:46 +020064rtc_source_set("compile_assert_c") {
Henrik Kjellanderc0362762017-06-29 08:03:04 +020065 sources = [
66 "compile_assert_c.h",
67 ]
68}
69
Mirko Bonadeica270912018-10-10 15:51:03 +020070# The subset of rtc_base approved for use outside of libjingle.
Ilya Nikolaevskiy26341992018-11-05 12:55:18 +010071# TODO(bugs.webrtc.org/9838): Create small and focused build targets and remove
Mirko Bonadeica270912018-10-10 15:51:03 +020072# the old concept of rtc_base and rtc_base_approved.
mbonadeibc378472017-09-11 03:43:34 -070073rtc_source_set("rtc_base_approved") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000074 visibility = [ "*" ]
Mirko Bonadeica270912018-10-10 15:51:03 +020075 deps = [
76 ":checks",
77 ":rtc_task_queue",
78 ":safe_compare",
Sebastian Janssond28efe52018-10-18 12:26:46 +020079 ":safe_minmax",
Mirko Bonadeica270912018-10-10 15:51:03 +020080 ":type_traits",
Mirko Bonadeica270912018-10-10 15:51:03 +020081 "../api:array_view",
Sebastian Janssond28efe52018-10-18 12:26:46 +020082 "../system_wrappers:field_trial",
83 "experiments:field_trial_parser",
Mirko Bonadeica270912018-10-10 15:51:03 +020084 "system:arch",
85 "system:unused",
86 "third_party/base64",
Yves Gerey3e707812018-11-28 16:47:49 +010087 "//third_party/abseil-cpp/absl/memory",
Mirko Bonadeica270912018-10-10 15:51:03 +020088 "//third_party/abseil-cpp/absl/types:optional",
89 ]
90
91 sources = [
92 "bind.h",
Steve Anton10542f22019-01-11 09:11:00 -080093 "bit_buffer.cc",
94 "bit_buffer.h",
Steve Antonaec15aa2019-01-11 09:13:07 -080095 "bitbuffer.h",
Steve Anton10542f22019-01-11 09:11:00 -080096 "bitrate_allocation_strategy.cc",
97 "bitrate_allocation_strategy.h",
Steve Antonaec15aa2019-01-11 09:13:07 -080098 "bitrateallocationstrategy.h",
Mirko Bonadeica270912018-10-10 15:51:03 +020099 "buffer.h",
Steve Anton10542f22019-01-11 09:11:00 -0800100 "buffer_queue.cc",
101 "buffer_queue.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800102 "bufferqueue.h",
Steve Anton10542f22019-01-11 09:11:00 -0800103 "byte_buffer.cc",
104 "byte_buffer.h",
105 "byte_order.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800106 "bytebuffer.h",
107 "byteorder.h",
Steve Anton10542f22019-01-11 09:11:00 -0800108 "copy_on_write_buffer.cc",
109 "copy_on_write_buffer.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800110 "copyonwritebuffer.h",
Mirko Bonadeica270912018-10-10 15:51:03 +0200111 "event_tracer.cc",
112 "event_tracer.h",
113 "file.cc",
114 "file.h",
115 "flags.cc",
116 "flags.h",
117 "function_view.h",
118 "ignore_wundef.h",
119 "location.cc",
120 "location.h",
121 "message_buffer_reader.h",
122 "numerics/histogram_percentile_counter.cc",
123 "numerics/histogram_percentile_counter.h",
124 "numerics/mod_ops.h",
125 "numerics/moving_max_counter.h",
126 "numerics/sample_counter.cc",
127 "numerics/sample_counter.h",
Steve Anton10542f22019-01-11 09:11:00 -0800128 "one_time_event.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800129 "onetimeevent.h",
Mirko Bonadeica270912018-10-10 15:51:03 +0200130 "platform_file.cc",
131 "platform_file.h",
132 "race_checker.cc",
133 "race_checker.h",
134 "random.cc",
135 "random.h",
136 "rate_statistics.cc",
137 "rate_statistics.h",
Steve Anton10542f22019-01-11 09:11:00 -0800138 "rate_tracker.cc",
139 "rate_tracker.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800140 "ratetracker.h",
Mirko Bonadeica270912018-10-10 15:51:03 +0200141 "swap_queue.h",
142 "template_util.h",
Steve Anton10542f22019-01-11 09:11:00 -0800143 "timestamp_aligner.cc",
144 "timestamp_aligner.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800145 "timestampaligner.h",
Mirko Bonadeica270912018-10-10 15:51:03 +0200146 "trace_event.h",
147 "zero_memory.cc",
148 "zero_memory.h",
149 ]
150
151 if (is_posix || is_fuchsia) {
152 sources += [ "file_posix.cc" ]
153 }
154
155 if (is_win) {
156 sources += [
157 "file_win.cc",
158 "win/windows_version.cc",
159 "win/windows_version.h",
160 ]
161 data_deps = [
162 "//build/win:runtime_libs",
163 ]
164 }
165
166 if (is_nacl) {
167 deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
168 }
169
170 if (is_android) {
171 libs = [ "log" ]
172 }
173
174 public_deps = [ # no-presubmit-check TODO(webrtc:8603)
Tommi8d2c5a82018-03-19 11:12:48 +0100175 ":atomicops",
176 ":criticalsection",
177 ":logging",
178 ":macromagic",
179 ":platform_thread",
180 ":platform_thread_types",
181 ":ptr_util",
182 ":refcount",
Tommi8d2c5a82018-03-19 11:12:48 +0100183 ":rtc_event",
184 ":safe_conversions",
185 ":stringutils",
186 ":thread_checker",
187 ":timeutils",
mbonadeibc378472017-09-11 03:43:34 -0700188 ]
mbonadeibc378472017-09-11 03:43:34 -0700189}
190
Tommi8d2c5a82018-03-19 11:12:48 +0100191rtc_source_set("macromagic") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +0200192 # TODO(bugs.webrtc.org/9606): This should not be public.
193 visibility = [ "*" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100194 sources = [
195 "arraysize.h",
Steve Anton10542f22019-01-11 09:11:00 -0800196 "constructor_magic.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800197 "constructormagic.h",
Tommi8d2c5a82018-03-19 11:12:48 +0100198 "format_macros.h",
199 "stringize_macros.h",
200 "thread_annotations.h",
201 ]
Niels Möllera12c42a2018-07-25 16:05:48 +0200202 deps = [
203 "system:arch",
204 ]
Tommi8d2c5a82018-03-19 11:12:48 +0100205}
206
207rtc_source_set("platform_thread_types") {
208 sources = [
209 "platform_thread_types.cc",
210 "platform_thread_types.h",
211 ]
212}
213
214rtc_source_set("ptr_util") {
Mirko Bonadeica14a3a2018-08-09 09:47:12 +0200215 visibility = [ "*" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100216 sources = [
Tommi8d2c5a82018-03-19 11:12:48 +0100217 "scoped_ref_ptr.h",
218 ]
Mirko Bonadei85340ce2018-11-19 15:51:39 +0100219 deps = [
220 "../api:scoped_refptr",
221 ]
Tommi8d2c5a82018-03-19 11:12:48 +0100222}
223
224rtc_source_set("refcount") {
Mirko Bonadeica14a3a2018-08-09 09:47:12 +0200225 visibility = [ "*" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100226 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800227 "ref_count.h",
228 "ref_counted_object.h",
229 "ref_counter.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800230 "refcount.h",
231 "refcountedobject.h",
232 "refcounter.h",
Tommi8d2c5a82018-03-19 11:12:48 +0100233 ]
234 deps = [
235 ":atomicops",
236 ":macromagic",
237 ]
238}
239
240rtc_source_set("criticalsection") {
241 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800242 "critical_section.cc",
243 "critical_section.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800244 "criticalsection.h",
Tommi8d2c5a82018-03-19 11:12:48 +0100245 ]
246 deps = [
247 ":atomicops",
248 ":checks",
249 ":macromagic",
250 ":platform_thread_types",
Niels Möllera12c42a2018-07-25 16:05:48 +0200251 "system:unused",
Tommi8d2c5a82018-03-19 11:12:48 +0100252 ]
253}
254
255rtc_source_set("platform_thread") {
256 visibility = [
257 ":rtc_base_approved",
Tommi8d2c5a82018-03-19 11:12:48 +0100258 ":rtc_task_queue_libevent",
259 ":rtc_task_queue_win",
Robin Raymond22027b92018-11-23 09:07:50 -0500260 ":rtc_task_queue_stdlib",
Tommi8d2c5a82018-03-19 11:12:48 +0100261 ":sequenced_task_checker",
262 ]
263 sources = [
264 "platform_thread.cc",
265 "platform_thread.h",
266 ]
267 deps = [
268 ":atomicops",
269 ":checks",
270 ":macromagic",
271 ":platform_thread_types",
272 ":rtc_event",
273 ":thread_checker",
274 ":timeutils",
Tommi8d2c5a82018-03-19 11:12:48 +0100275 ]
276}
277
278rtc_source_set("rtc_event") {
John Budorick6c9a7862018-03-26 06:23:34 -0700279 deps = [
280 ":checks",
John Budorick6c9a7862018-03-26 06:23:34 -0700281 ]
282
Tommi8d2c5a82018-03-19 11:12:48 +0100283 if (build_with_chromium) {
John Budorick6c9a7862018-03-26 06:23:34 -0700284 # Dependency on chromium's waitable_event (in //base).
285 deps += [ "//base:base" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100286 sources = [
287 "../../webrtc_overrides/rtc_base/event.cc",
288 "../../webrtc_overrides/rtc_base/event.h",
289 ]
290 } else {
291 sources = [
292 "event.cc",
293 "event.h",
294 ]
295 }
Tommi8d2c5a82018-03-19 11:12:48 +0100296}
297
298rtc_source_set("logging") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +0200299 visibility = [ "*" ]
Patrik Höglund77301932018-10-09 15:09:51 +0200300 libs = []
Tommi8d2c5a82018-03-19 11:12:48 +0100301 deps = [
Yves Gerey988cc082018-10-23 12:03:01 +0200302 ":checks",
Tommi8d2c5a82018-03-19 11:12:48 +0100303 ":criticalsection",
304 ":macromagic",
305 ":platform_thread_types",
306 ":stringutils",
307 ":timeutils",
Jonas Olssonf2ce37c2018-09-12 15:32:47 +0200308 "//third_party/abseil-cpp/absl/strings",
Tommi8d2c5a82018-03-19 11:12:48 +0100309 ]
310
311 if (build_with_chromium) {
312 # Dependency on chromium's logging (in //base).
313 deps += [ "//base:base" ]
314 sources = [
315 "../../webrtc_overrides/rtc_base/logging.cc",
316 "../../webrtc_overrides/rtc_base/logging.h",
317 ]
318 } else {
Mirko Bonadei96ede162018-09-06 13:45:44 +0200319 configs += [
320 "..:no_exit_time_destructors",
321 "..:no_global_constructors",
322 ]
Tommi8d2c5a82018-03-19 11:12:48 +0100323 sources = [
324 "logging.cc",
325 "logging.h",
326 ]
Karl Wibergcefc4652018-05-23 23:20:38 +0200327 deps += [ "system:inline" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100328
Mirko Bonadei99a70a22018-10-09 16:45:14 +0200329 if (is_mac) {
330 deps += [ ":logging_mac" ]
331 }
332
Tommi8d2c5a82018-03-19 11:12:48 +0100333 # logging.h needs the deprecation header while downstream projects are
334 # removing code that depends on logging implementation details.
335 deps += [ ":deprecation" ]
Patrik Höglund77301932018-10-09 15:09:51 +0200336
337 if (is_android) {
338 libs += [ "log" ]
339 }
Tommi8d2c5a82018-03-19 11:12:48 +0100340 }
341}
342
343rtc_source_set("thread_checker") {
344 sources = [
345 "thread_checker.h",
346 "thread_checker_impl.cc",
347 "thread_checker_impl.h",
348 ]
349 deps = [
350 ":checks",
351 ":criticalsection",
352 ":macromagic",
353 ":platform_thread_types",
Tommi8d2c5a82018-03-19 11:12:48 +0100354 ]
355}
356
357rtc_source_set("atomicops") {
358 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800359 "atomic_ops.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800360 "atomicops.h",
Tommi8d2c5a82018-03-19 11:12:48 +0100361 ]
362}
363
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100364rtc_source_set("checks") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +0200365 # TODO(bugs.webrtc.org/9607): This should not be public.
366 visibility = [ "*" ]
Patrik Höglund77301932018-10-09 15:09:51 +0200367 libs = []
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100368 sources = [
369 "checks.cc",
370 "checks.h",
371 ]
372 deps = [
373 ":safe_compare",
Jonas Olssonf8e5c112018-06-14 13:14:22 +0200374 "system:inline",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100375 ]
Patrik Höglund77301932018-10-09 15:09:51 +0200376 if (is_android) {
377 libs += [ "log" ]
378 }
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100379}
380
Patrik Höglund3e113432017-12-15 14:40:10 +0100381rtc_source_set("rate_limiter") {
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100382 sources = [
Patrik Höglund3e113432017-12-15 14:40:10 +0100383 "rate_limiter.cc",
384 "rate_limiter.h",
385 ]
386 deps = [
387 ":rtc_base_approved",
388 "../system_wrappers",
Yves Gerey988cc082018-10-23 12:03:01 +0200389 "//third_party/abseil-cpp/absl/types:optional",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100390 ]
391}
392
393rtc_source_set("sanitizer") {
394 sources = [
395 "sanitizer.h",
396 ]
Jiawei Oua6e034a2018-11-24 20:59:41 -0800397 deps = [
398 "//third_party/abseil-cpp/absl/meta:type_traits",
399 ]
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100400}
401
402rtc_source_set("safe_compare") {
403 sources = [
404 "numerics/safe_compare.h",
405 ]
406 deps = [
407 ":type_traits",
408 ]
409}
410
Karl Wiberg12edf4c2018-03-07 14:18:56 +0100411rtc_source_set("safe_minmax") {
412 sources = [
413 "numerics/safe_minmax.h",
414 ]
415 deps = [
416 ":checks",
417 ":safe_compare",
418 ":type_traits",
419 ]
420}
421
Tommi8d2c5a82018-03-19 11:12:48 +0100422rtc_source_set("safe_conversions") {
423 sources = [
424 "numerics/safe_conversions.h",
425 "numerics/safe_conversions_impl.h",
426 ]
427 deps = [
428 ":checks",
429 ]
430}
431
432rtc_source_set("timeutils") {
Mirko Bonadei2ad8c432018-08-09 10:54:40 +0200433 visibility = [ "*" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100434 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800435 "time_utils.cc",
436 "time_utils.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800437 "timeutils.h",
Tommi8d2c5a82018-03-19 11:12:48 +0100438 ]
439 deps = [
440 ":checks",
441 ":safe_conversions",
Jonas Olsson366a50c2018-09-06 13:41:30 +0200442 ":stringutils",
Tommi8d2c5a82018-03-19 11:12:48 +0100443 ]
444}
445
Patrik Höglund3e113432017-12-15 14:40:10 +0100446rtc_source_set("stringutils") {
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100447 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800448 "string_encode.cc",
449 "string_encode.h",
Jonas Olsson6b1985d2018-07-05 11:59:48 +0200450 "string_to_number.cc",
451 "string_to_number.h",
Steve Anton10542f22019-01-11 09:11:00 -0800452 "string_utils.cc",
453 "string_utils.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800454 "stringencode.h",
Karl Wiberg881f1682018-03-08 15:03:23 +0100455 "strings/string_builder.cc",
Tommifef05002018-02-27 13:51:08 +0100456 "strings/string_builder.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800457 "stringutils.h",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100458 ]
459 deps = [
Patrik Höglund3e113432017-12-15 14:40:10 +0100460 ":checks",
Jonas Olsson6b1985d2018-07-05 11:59:48 +0200461 ":macromagic",
Karl Wiberg881f1682018-03-08 15:03:23 +0100462 ":safe_minmax",
463 "../api:array_view",
Jonas Olsson88e18482018-09-03 10:15:08 +0200464 "//third_party/abseil-cpp/absl/strings:strings",
Jonas Olsson6b1985d2018-07-05 11:59:48 +0200465 "//third_party/abseil-cpp/absl/types:optional",
Patrik Höglund3e113432017-12-15 14:40:10 +0100466 ]
467}
468
Jonas Olsson74395342018-04-03 12:22:07 +0200469rtc_source_set("audio_format_to_string") {
470 sources = [
471 "strings/audio_format_to_string.cc",
472 "strings/audio_format_to_string.h",
473 ]
474 deps = [
475 ":stringutils",
476 "../api/audio_codecs:audio_codecs_api",
477 ]
478}
479
Patrik Höglund3e113432017-12-15 14:40:10 +0100480rtc_source_set("type_traits") {
481 sources = [
482 "type_traits.h",
483 ]
484}
485
486rtc_source_set("deprecation") {
487 sources = [
488 "deprecation.h",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100489 ]
490}
491
mbonadeibc378472017-09-11 03:43:34 -0700492if (is_mac && !build_with_chromium) {
Mirko Bonadei99a70a22018-10-09 16:45:14 +0200493 rtc_source_set("logging_mac") {
494 visibility = [ ":logging" ]
495 libs = [ "Foundation.framework" ]
mbonadeibc378472017-09-11 03:43:34 -0700496 sources = [
Mirko Bonadei99a70a22018-10-09 16:45:14 +0200497 "logging_mac.h",
mbonadeibc378472017-09-11 03:43:34 -0700498 "logging_mac.mm",
499 ]
mbonadeibc378472017-09-11 03:43:34 -0700500 }
501}
502
perkj650fdae2017-08-25 05:00:11 -0700503rtc_source_set("rtc_task_queue") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000504 visibility = [ "*" ]
Tommi8d2c5a82018-03-19 11:12:48 +0100505 deps = []
mbonadei95c8f652017-08-27 23:40:10 -0700506 public_deps = [
perkj650fdae2017-08-25 05:00:11 -0700507 ":rtc_task_queue_api",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200508 ]
509
perkj650fdae2017-08-25 05:00:11 -0700510 if (rtc_link_task_queue_impl) {
mbonadei95c8f652017-08-27 23:40:10 -0700511 deps += [ ":rtc_task_queue_impl" ]
perkj650fdae2017-08-25 05:00:11 -0700512 }
513}
514
515# WebRTC targets must not directly depend on rtc_task_queue_api or
516# rtc_task_queue_impl. Instead, depend on rtc_task_queue.
517# The build flag |rtc_link_task_queue_impl| decides if WebRTC targets will link
518# to the default implemenation in rtc_task_queue_impl or if an externally
519# provided implementation should be used. An external implementation should
520# depend on rtc_task_queue_api.
521rtc_source_set("rtc_task_queue_api") {
Tommi8d2c5a82018-03-19 11:12:48 +0100522 # The visibility list is commented out so that we won't break external
523 # implementations, but left here to manually test as well as for sake of what
524 # targets we expect to depend on rtc_task_queue_api.
525 # visibility = [
526 # ":rtc_task_queue",
527 # ":rtc_task_queue_impl",
528 # ":sequenced_task_checker",
529 # ]
nisse75dd6d42017-09-19 08:28:00 -0700530 sources = [
531 "task_queue.h",
532 ]
perkj650fdae2017-08-25 05:00:11 -0700533 deps = [
Tommi8d2c5a82018-03-19 11:12:48 +0100534 ":macromagic",
535 ":ptr_util",
Danil Chapovalov959e9b62019-01-14 14:29:18 +0100536 "../api/task_queue",
Mirko Bonadei3d255302018-10-11 10:50:45 +0200537 "system:rtc_export",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200538 "//third_party/abseil-cpp/absl/memory",
perkj650fdae2017-08-25 05:00:11 -0700539 ]
540}
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200541
Tommi8d2c5a82018-03-19 11:12:48 +0100542if (rtc_enable_libevent) {
543 rtc_source_set("rtc_task_queue_libevent") {
544 visibility = [ ":rtc_task_queue_impl" ]
perkj650fdae2017-08-25 05:00:11 -0700545 sources = [
Niels Möller15c9cf72017-10-19 12:38:09 +0200546 "task_queue_libevent.cc",
547 "task_queue_posix.cc",
548 "task_queue_posix.h",
perkj650fdae2017-08-25 05:00:11 -0700549 ]
Tommi8d2c5a82018-03-19 11:12:48 +0100550 deps = [
551 ":checks",
552 ":criticalsection",
553 ":logging",
Yves Gerey2e00abc2018-10-05 15:39:24 +0200554 ":macromagic",
Tommi8d2c5a82018-03-19 11:12:48 +0100555 ":platform_thread",
Yves Gerey2e00abc2018-10-05 15:39:24 +0200556 ":platform_thread_types",
Tommi8d2c5a82018-03-19 11:12:48 +0100557 ":ptr_util",
558 ":refcount",
559 ":rtc_task_queue_api",
560 ":safe_conversions",
561 ":timeutils",
Niels Möllera12c42a2018-07-25 16:05:48 +0200562 "system:unused",
Tommi8d2c5a82018-03-19 11:12:48 +0100563 ]
564 if (rtc_build_libevent) {
565 deps += [ "//base/third_party/libevent" ]
566 }
567 }
568}
569
570if (is_mac || is_ios) {
571 rtc_source_set("rtc_task_queue_gcd") {
572 visibility = [ ":rtc_task_queue_impl" ]
573 sources = [
574 "task_queue_gcd.cc",
575 "task_queue_posix.cc",
576 "task_queue_posix.h",
577 ]
578 deps = [
579 ":checks",
580 ":logging",
581 ":ptr_util",
582 ":refcount",
583 ":rtc_task_queue_api",
584 ]
585 }
586}
587
588if (is_win) {
589 rtc_source_set("rtc_task_queue_win") {
590 visibility = [ ":rtc_task_queue_impl" ]
591 sources = [
592 "task_queue_win.cc",
593 ]
594 deps = [
595 ":checks",
596 ":criticalsection",
597 ":logging",
598 ":macromagic",
599 ":platform_thread",
600 ":ptr_util",
601 ":refcount",
602 ":rtc_event",
603 ":rtc_task_queue_api",
604 ":safe_conversions",
605 ":timeutils",
606 ]
607 }
608}
609
Robin Raymond22027b92018-11-23 09:07:50 -0500610rtc_source_set("rtc_task_queue_stdlib") {
611 visibility = [ ":rtc_task_queue_impl" ]
612 sources = [
613 "task_queue_stdlib.cc",
614 ]
615 deps = [
616 ":checks",
617 ":criticalsection",
618 ":logging",
619 ":macromagic",
620 ":platform_thread",
621 ":ptr_util",
622 ":refcount",
623 ":rtc_event",
624 ":rtc_task_queue_api",
625 ":safe_conversions",
626 ":timeutils",
627 ]
628}
629
Tommi8d2c5a82018-03-19 11:12:48 +0100630rtc_source_set("rtc_task_queue_impl") {
631 visibility = [ "*" ]
632 if (rtc_enable_libevent) {
633 deps = [
634 ":rtc_task_queue_libevent",
635 ]
perkj650fdae2017-08-25 05:00:11 -0700636 } else {
Niels Möller15c9cf72017-10-19 12:38:09 +0200637 if (is_mac || is_ios) {
Tommi8d2c5a82018-03-19 11:12:48 +0100638 deps = [
639 ":rtc_task_queue_gcd",
Niels Möller17a04742017-09-27 10:53:21 +0200640 ]
Niels Möller15c9cf72017-10-19 12:38:09 +0200641 }
642 if (is_win) {
Robin Raymond22027b92018-11-23 09:07:50 -0500643 if (current_os == "winuwp") {
644 deps = [
645 ":rtc_task_queue_stdlib",
646 ]
647 } else {
648 deps = [
649 ":rtc_task_queue_win",
650 ]
651 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200652 }
653 }
654}
655
Tommi8d2c5a82018-03-19 11:12:48 +0100656rtc_source_set("sequenced_task_checker") {
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200657 sources = [
658 "sequenced_task_checker.h",
659 "sequenced_task_checker_impl.cc",
660 "sequenced_task_checker_impl.h",
661 ]
662 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100663 ":checks",
Tommi8d2c5a82018-03-19 11:12:48 +0100664 ":criticalsection",
665 ":macromagic",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200666 ":rtc_task_queue",
Tommi8d2c5a82018-03-19 11:12:48 +0100667 ":thread_checker",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200668 ]
669}
670
671rtc_static_library("weak_ptr") {
672 sources = [
673 "weak_ptr.cc",
674 "weak_ptr.h",
675 ]
676 deps = [
Tommi8d2c5a82018-03-19 11:12:48 +0100677 ":ptr_util",
678 ":refcount",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200679 ":sequenced_task_checker",
680 ]
681}
682
683rtc_static_library("rtc_numerics") {
684 sources = [
685 "numerics/exp_filter.cc",
686 "numerics/exp_filter.h",
Ilya Nikolaevskiy26341992018-11-05 12:55:18 +0100687 "numerics/moving_average.cc",
688 "numerics/moving_average.h",
Ilya Nikolaevskiyb9685752017-11-01 14:01:00 +0100689 "numerics/moving_median_filter.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200690 "numerics/percentile_filter.h",
Artem Titove4ed6ea2019-01-11 11:02:19 +0100691 "numerics/samples_stats_counter.cc",
692 "numerics/samples_stats_counter.h",
Bjorn Tereliusa194e582017-10-25 13:07:09 +0200693 "numerics/sequence_number_util.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200694 ]
695 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100696 ":checks",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200697 ":rtc_base_approved",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100698 ":safe_compare",
Danil Chapovalov0a1d1892018-06-21 11:48:25 +0200699 "//third_party/abseil-cpp/absl/types:optional",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200700 ]
701}
702
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200703rtc_source_set("rtc_json") {
704 defines = []
705 sources = [
Sam Zackrissonb45bdb52018-10-02 16:25:59 +0200706 "strings/json.cc",
707 "strings/json.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200708 ]
Jonas Olsson941a07c2018-09-13 10:07:07 +0200709 deps = [
710 ":stringutils",
711 ]
Mirko Bonadeia0e29fc2018-01-26 16:50:02 +0100712 all_dependent_configs = [ "//third_party/jsoncpp:jsoncpp_config" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200713 if (rtc_build_json) {
714 public_deps = [
715 "//third_party/jsoncpp",
716 ]
717 } else {
718 include_dirs = [ "$rtc_jsoncpp_root" ]
719
720 # When defined changes the include path for json.h to where it is
721 # expected to be when building json outside of the standalone build.
722 defines += [ "WEBRTC_EXTERNAL_JSON" ]
723 }
724}
725
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100726rtc_source_set("nethelpers") {
727 # TODO(bugs.webrtc.org/9987): This build target will soon contain
728 # the following files:
729 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800730 # "net_helpers.cc",
731 # "net_helpers.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100732 # ]
733}
734
735rtc_source_set("asyncresolverinterface") {
736 # TODO(bugs.webrtc.org/9987): This build target will soon contain
737 # the following files:
738 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800739 # "async_resolver_interface.cc",
740 # "async_resolver_interface.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100741 # ]
742}
743
744rtc_source_set("ipaddress") {
745 # TODO(bugs.webrtc.org/9987): This build target will soon contain
746 # the following files:
747 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800748 # "ip_address.cc",
749 # "ip_address.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100750 # ]
751}
752
753rtc_source_set("socketaddress") {
754 # TODO(bugs.webrtc.org/9987): This build target will soon contain
755 # the following files:
756 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800757 # "socket_address.cc",
758 # "socket_address.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100759 # ]
760}
761
762rtc_source_set("nullsocketserver") {
763 # TODO(bugs.webrtc.org/9987): This build target will soon contain
764 # the following files:
765 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800766 # "null_socket_server.cc",
767 # "null_socket_server.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100768 # ]
769}
770
771rtc_source_set("socketserver") {
772 # TODO(bugs.webrtc.org/9987): This build target will soon contain
773 # the following files:
774 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800775 # "socket_server.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100776 # ]
777}
778
779rtc_source_set("threading") {
780 # TODO(bugs.webrtc.org/9987): This build target will soon contain
781 # the following files:
782 # sources = [
783 # "asyncresolver.cc",
784 # "asyncresolver.h",
785 # "defaultsocketserver.cc",
786 # "defaultsocketserver.h",
Steve Anton10542f22019-01-11 09:11:00 -0800787 # "message_handler.cc",
788 # "message_handler.h",
789 # "message_queue.cc",
790 # "message_queue.h",
791 # "network_monitor.cc",
792 # "network_monitor.h",
793 # "physical_socket_server.cc",
794 # "physical_socket_server.h",
795 # "signal_thread.cc",
796 # "signal_thread.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100797 # "thread.cc",
798 # "thread.h",
799 # ]
800}
801
802rtc_source_set("socketfactory") {
803 # TODO(bugs.webrtc.org/9987): This build target will soon contain
804 # the following files:
805 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800806 # "socket_factory.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100807 # ]
808}
809
810rtc_source_set("asyncsocket") {
811 # TODO(bugs.webrtc.org/9987): This build target will soon contain
812 # the following files:
813 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800814 # "async_socket.cc",
815 # "async_socket.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100816 # ]
817}
818
819rtc_source_set("socket") {
820 # TODO(bugs.webrtc.org/9987): This build target will soon contain
821 # the following files:
822 # sources = [
823 # "socket.cc",
824 # "socket.h",
825 # ]
826}
827
828rtc_source_set("network_constants") {
829 # TODO(bugs.webrtc.org/9987): This build target will soon contain
830 # the following files:
831 # sources = [
832 # "network_constants.h",
833 # ]
834}
835
836if (is_android) {
837 rtc_source_set("ifaddrs_android") {
838 # TODO(bugs.webrtc.org/9987): This build target will soon contain
839 # the following files:
840 # sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800841 # "ifaddrs_android.cc",
842 # "ifaddrs_android.h",
Karl Wiberg0b6d0e62018-12-06 14:50:45 +0100843 # ]
844 }
845}
846
847if (is_win) {
848 rtc_source_set("win32") {
849 # TODO(bugs.webrtc.org/9987): This build target will soon contain
850 # the following files:
851 # sources = [
852 # "win32.cc",
853 # "win32.h",
854 # ]
855 }
856}
857
mbonadei9c5e5112017-09-05 05:17:02 -0700858rtc_static_library("rtc_base") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000859 visibility = [ "*" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200860 cflags = []
861 cflags_cc = []
862 libs = []
863 defines = []
864 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100865 ":checks",
Patrik Höglund3e113432017-12-15 14:40:10 +0100866 ":stringutils",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200867 "..:webrtc_common",
Joachim Bauch58daf402017-12-21 22:00:34 +0100868 "../api:array_view",
Sebastian Janssone07864e2018-10-15 09:28:15 +0200869 "network:sent_packet",
Artem Titova76af0c2018-07-23 17:38:12 +0200870 "third_party/base64",
Artem Titove41c4332018-07-25 15:04:28 +0200871 "third_party/sigslot",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200872 "//third_party/abseil-cpp/absl/memory",
Niels Möller3c7d5992018-10-19 15:29:54 +0200873 "//third_party/abseil-cpp/absl/strings",
Danil Chapovalov0a1d1892018-06-21 11:48:25 +0200874 "//third_party/abseil-cpp/absl/types:optional",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200875 ]
876 public_deps = [
877 ":rtc_base_approved",
878 ]
879 public_configs = []
880
881 all_dependent_configs = [ ":rtc_base_all_dependent_config" ]
882
883 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800884 "async_invoker.cc",
885 "async_invoker.h",
886 "async_invoker_inl.h",
887 "async_packet_socket.cc",
888 "async_packet_socket.h",
889 "async_resolver_interface.cc",
890 "async_resolver_interface.h",
891 "async_socket.cc",
892 "async_socket.h",
893 "async_tcp_socket.cc",
894 "async_tcp_socket.h",
895 "async_udp_socket.cc",
896 "async_udp_socket.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800897 "asyncinvoker-inl.h",
898 "asyncinvoker.h",
899 "asyncpacketsocket.h",
900 "asyncresolverinterface.h",
901 "asyncsocket.h",
902 "asynctcpsocket.h",
903 "asyncudpsocket.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200904 "crc32.cc",
905 "crc32.h",
Steve Anton10542f22019-01-11 09:11:00 -0800906 "crypt_string.cc",
907 "crypt_string.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800908 "cryptstring.h",
Sebastian Janssonf9c5cf62018-02-28 16:04:26 +0100909 "data_rate_limiter.cc",
910 "data_rate_limiter.h",
Patrik Höglund76df0df2017-12-19 11:50:21 +0100911 "dscp.h",
Steve Anton10542f22019-01-11 09:11:00 -0800912 "file_rotating_stream.cc",
913 "file_rotating_stream.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800914 "filerotatingstream.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200915 "gunit_prod.h",
916 "helpers.cc",
917 "helpers.h",
Steve Anton10542f22019-01-11 09:11:00 -0800918 "http_common.cc",
919 "http_common.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800920 "httpcommon.h",
Steve Anton10542f22019-01-11 09:11:00 -0800921 "ip_address.cc",
922 "ip_address.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800923 "ipaddress.h",
Patrik Höglund76df0df2017-12-19 11:50:21 +0100924 "keep_ref_until_done.h",
Benjamin Wrightb3f887b2018-10-30 13:53:30 -0700925 "key_derivation.cc",
926 "key_derivation.h",
Qingsi Wang09619332018-09-12 22:51:55 -0700927 "mdns_responder_interface.h",
Steve Anton10542f22019-01-11 09:11:00 -0800928 "message_digest.cc",
929 "message_digest.h",
930 "message_handler.cc",
931 "message_handler.h",
932 "message_queue.cc",
933 "message_queue.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800934 "messagedigest.h",
935 "messagehandler.h",
936 "messagequeue.h",
Steve Anton10542f22019-01-11 09:11:00 -0800937 "net_helper.cc",
938 "net_helper.h",
939 "net_helpers.cc",
940 "net_helpers.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800941 "nethelper.h",
942 "nethelpers.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200943 "network.cc",
944 "network.h",
Patrik Höglunde2d6a062017-10-05 14:53:33 +0200945 "network_constants.h",
Steve Anton10542f22019-01-11 09:11:00 -0800946 "network_monitor.cc",
947 "network_monitor.h",
948 "network_route.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800949 "networkmonitor.h",
950 "networkroute.h",
Steve Anton10542f22019-01-11 09:11:00 -0800951 "null_socket_server.cc",
952 "null_socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800953 "nullsocketserver.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200954 "openssl.h",
Steve Anton10542f22019-01-11 09:11:00 -0800955 "openssl_adapter.cc",
956 "openssl_adapter.h",
957 "openssl_certificate.cc",
958 "openssl_certificate.h",
959 "openssl_digest.cc",
960 "openssl_digest.h",
961 "openssl_identity.cc",
962 "openssl_identity.h",
Benjamin Wrightb3f887b2018-10-30 13:53:30 -0700963 "openssl_key_derivation_hkdf.cc",
964 "openssl_key_derivation_hkdf.h",
Steve Anton10542f22019-01-11 09:11:00 -0800965 "openssl_session_cache.cc",
966 "openssl_session_cache.h",
967 "openssl_stream_adapter.cc",
968 "openssl_stream_adapter.h",
969 "openssl_utility.cc",
970 "openssl_utility.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800971 "openssladapter.h",
972 "opensslcertificate.h",
973 "openssldigest.h",
974 "opensslidentity.h",
975 "opensslsessioncache.h",
976 "opensslstreamadapter.h",
977 "opensslutility.h",
Steve Anton10542f22019-01-11 09:11:00 -0800978 "physical_socket_server.cc",
979 "physical_socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800980 "physicalsocketserver.h",
Steve Anton10542f22019-01-11 09:11:00 -0800981 "proxy_info.cc",
982 "proxy_info.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800983 "proxyinfo.h",
Steve Anton10542f22019-01-11 09:11:00 -0800984 "rtc_certificate.cc",
985 "rtc_certificate.h",
986 "rtc_certificate_generator.cc",
987 "rtc_certificate_generator.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800988 "rtccertificate.h",
989 "rtccertificategenerator.h",
Steve Anton10542f22019-01-11 09:11:00 -0800990 "signal_thread.cc",
991 "signal_thread.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800992 "signalthread.h",
Steve Anton10542f22019-01-11 09:11:00 -0800993 "sigslot_repeater.h",
Steve Antonaec15aa2019-01-11 09:13:07 -0800994 "sigslotrepeater.h",
Qingsi Wang6e641e62018-04-11 20:14:17 -0700995 "socket.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +0200996 "socket.h",
Steve Anton10542f22019-01-11 09:11:00 -0800997 "socket_adapters.cc",
998 "socket_adapters.h",
999 "socket_address.cc",
1000 "socket_address.h",
1001 "socket_address_pair.cc",
1002 "socket_address_pair.h",
1003 "socket_factory.h",
1004 "socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001005 "socketadapters.h",
1006 "socketaddress.h",
1007 "socketaddresspair.h",
1008 "socketfactory.h",
1009 "socketserver.h",
Steve Anton10542f22019-01-11 09:11:00 -08001010 "ssl_adapter.cc",
1011 "ssl_adapter.h",
1012 "ssl_certificate.cc",
1013 "ssl_certificate.h",
1014 "ssl_fingerprint.cc",
1015 "ssl_fingerprint.h",
1016 "ssl_identity.cc",
1017 "ssl_identity.h",
1018 "ssl_stream_adapter.cc",
1019 "ssl_stream_adapter.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001020 "ssladapter.h",
1021 "sslcertificate.h",
1022 "sslfingerprint.h",
1023 "sslidentity.h",
1024 "sslstreamadapter.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001025 "stream.cc",
1026 "stream.h",
1027 "thread.cc",
1028 "thread.h",
1029 ]
1030
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001031 if (build_with_chromium) {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001032 include_dirs = [ "../../boringssl/src/include" ]
1033 public_configs += [ ":rtc_base_chromium_config" ]
1034 } else {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001035 sources += [
1036 "callback.h",
Steve Anton10542f22019-01-11 09:11:00 -08001037 "log_sinks.cc",
1038 "log_sinks.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001039 "logsinks.h",
Steve Anton10542f22019-01-11 09:11:00 -08001040 "numerics/math_utils.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001041 "numerics/mathutils.h",
Steve Anton10542f22019-01-11 09:11:00 -08001042 "rolling_accumulator.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001043 "rollingaccumulator.h",
Steve Anton10542f22019-01-11 09:11:00 -08001044 "ssl_roots.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001045 "sslroots.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001046 ]
1047
1048 if (is_win) {
Steve Antonaec15aa2019-01-11 09:13:07 -08001049 sources += [
1050 "win32_socket_init.h",
1051 "win32socketinit.h",
1052 ]
Robin Raymondce1b1402018-11-22 20:10:11 -05001053 if (current_os != "winuwp") {
1054 sources += [
Steve Anton10542f22019-01-11 09:11:00 -08001055 "win32_socket_server.cc",
1056 "win32_socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001057 "win32socketserver.h",
Robin Raymondce1b1402018-11-22 20:10:11 -05001058 ]
1059 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001060 }
1061 } # !build_with_chromium
1062
1063 if (rtc_build_ssl) {
1064 deps += [ "//third_party/boringssl" ]
Dan Minor9cdd8762018-01-16 10:40:39 -05001065 } else {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001066 configs += [ ":external_ssl_library" ]
1067 }
1068
1069 if (is_android) {
1070 sources += [
Steve Antonaec15aa2019-01-11 09:13:07 -08001071 "ifaddrs-android.h",
Steve Anton10542f22019-01-11 09:11:00 -08001072 "ifaddrs_android.cc",
1073 "ifaddrs_android.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001074 ]
1075
1076 libs += [
1077 "log",
1078 "GLESv2",
1079 ]
1080 }
1081
1082 if (is_ios || is_mac) {
Steve Anton10542f22019-01-11 09:11:00 -08001083 sources += [ "mac_ifaddrs_converter.cc" ]
Kári Tristan Helgason62b13452018-10-12 12:57:49 +02001084 deps += [ "system:cocoa_threading" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001085 }
1086
Joachim Bauch75f18fc2017-12-20 21:25:47 +01001087 if (rtc_use_x11) {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001088 libs += [
1089 "dl",
1090 "rt",
1091 "Xext",
1092 "X11",
1093 "Xcomposite",
1094 "Xrender",
1095 ]
1096 }
1097
1098 if (is_linux) {
1099 libs += [
1100 "dl",
1101 "rt",
1102 ]
1103 }
1104
1105 if (is_mac) {
1106 sources += [
Steve Anton10542f22019-01-11 09:11:00 -08001107 "mac_utils.cc",
1108 "mac_utils.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001109 "macutils.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001110 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001111 }
1112
1113 if (is_win) {
1114 sources += [
1115 "win32.cc",
1116 "win32.h",
Steve Anton10542f22019-01-11 09:11:00 -08001117 "win32_window.cc",
1118 "win32_window.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001119 "win32window.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001120 ]
1121
1122 libs += [
1123 "crypt32.lib",
1124 "iphlpapi.lib",
1125 "secur32.lib",
1126 ]
1127
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001128 defines += [ "_CRT_NONSTDC_NO_DEPRECATE" ]
1129 }
1130
Fabrice de Gans-Riberi09a6cd52018-03-30 10:38:06 -07001131 if (is_posix || is_fuchsia) {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001132 sources += [
1133 "ifaddrs_converter.cc",
1134 "ifaddrs_converter.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001135 ]
1136 }
1137
1138 if (is_nacl) {
1139 deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
1140 defines += [ "timezone=_timezone" ]
1141 sources -= [ "ifaddrs_converter.cc" ]
1142 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001143}
1144
1145rtc_source_set("gtest_prod") {
Per Kjellandera7f2d842018-01-10 15:54:53 +00001146 visibility = [ "*" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001147 sources = [
1148 "gtest_prod_util.h",
1149 ]
1150}
1151
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001152rtc_source_set("gunit_helpers") {
1153 testonly = true
1154 sources = [
1155 "gunit.cc",
1156 "gunit.h",
1157 ]
1158 deps = [
1159 ":logging",
1160 ":rtc_base",
1161 ":rtc_base_tests_utils",
1162 ":stringutils",
1163 "../test:test_support",
Steve Anton68586e82018-12-13 17:41:25 -08001164 "//third_party/abseil-cpp/absl/strings",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001165 ]
1166}
1167
1168rtc_source_set("testclient") {
1169 testonly = true
1170 sources = [
Steve Anton10542f22019-01-11 09:11:00 -08001171 "test_client.cc",
1172 "test_client.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001173 "testclient.h",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001174 ]
1175 deps = [
1176 ":criticalsection",
1177 ":gunit_helpers",
1178 ":macromagic",
1179 ":rtc_base",
1180 ":rtc_base_tests_utils",
1181 ":timeutils",
Yves Gerey3e707812018-11-28 16:47:49 +01001182 "//third_party/abseil-cpp/absl/memory",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001183 ]
1184}
1185
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001186rtc_source_set("rtc_base_tests_utils") {
1187 testonly = true
1188 sources = [
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001189 "cpu_time.cc",
1190 "cpu_time.h",
Steve Anton10542f22019-01-11 09:11:00 -08001191 "fake_clock.cc",
1192 "fake_clock.h",
Qingsi Wang09619332018-09-12 22:51:55 -07001193 "fake_mdns_responder.h",
Steve Anton10542f22019-01-11 09:11:00 -08001194 "fake_network.h",
1195 "fake_ssl_identity.cc",
1196 "fake_ssl_identity.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001197 "fakeclock.h",
1198 "fakenetwork.h",
1199 "fakesslidentity.h",
Steve Anton10542f22019-01-11 09:11:00 -08001200 "firewall_socket_server.cc",
1201 "firewall_socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001202 "firewallsocketserver.h",
Niels Möllere7547d52018-11-01 09:33:08 +01001203 "memory_stream.cc",
1204 "memory_stream.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001205 "memory_usage.cc",
1206 "memory_usage.h",
Steve Anton10542f22019-01-11 09:11:00 -08001207 "nat_server.cc",
1208 "nat_server.h",
1209 "nat_socket_factory.cc",
1210 "nat_socket_factory.h",
1211 "nat_types.cc",
1212 "nat_types.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001213 "natserver.h",
1214 "natsocketfactory.h",
1215 "nattypes.h",
Steve Anton10542f22019-01-11 09:11:00 -08001216 "proxy_server.cc",
1217 "proxy_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001218 "proxyserver.h",
Niels Möller44153152018-12-17 14:04:05 +01001219 "server_socket_adapters.cc",
1220 "server_socket_adapters.h",
Steve Anton10542f22019-01-11 09:11:00 -08001221 "sigslot_tester.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001222 "sigslottester.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001223 "sigslottester.h.pump",
Steve Anton10542f22019-01-11 09:11:00 -08001224 "socket_stream.cc",
1225 "socket_stream.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001226 "socketstream.h",
Steve Anton10542f22019-01-11 09:11:00 -08001227 "test_base64.h",
1228 "test_certificate_verifier.h",
1229 "test_echo_server.cc",
1230 "test_echo_server.h",
1231 "test_utils.cc",
1232 "test_utils.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001233 "testbase64.h",
1234 "testcertificateverifier.h",
1235 "testechoserver.h",
1236 "testutils.h",
Steve Anton10542f22019-01-11 09:11:00 -08001237 "virtual_socket_server.cc",
1238 "virtual_socket_server.h",
Steve Antonaec15aa2019-01-11 09:13:07 -08001239 "virtualsocketserver.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001240 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001241 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001242 ":checks",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001243 ":rtc_base",
Sebastian Jansson5f83cf02018-05-08 14:52:22 +02001244 "../api/units:time_delta",
Artem Titove41c4332018-07-25 15:04:28 +02001245 "third_party/sigslot",
Karl Wiberg918f50c2018-07-05 11:40:33 +02001246 "//third_party/abseil-cpp/absl/memory",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001247 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001248}
1249
Tommida8781f2018-02-19 12:41:43 +01001250rtc_source_set("rtc_task_queue_for_test") {
1251 visibility = [ "*" ]
1252 testonly = true
1253
1254 sources = [
1255 "task_queue_for_test.cc",
1256 "task_queue_for_test.h",
1257 ]
1258 deps = [
1259 ":checks",
1260 ":rtc_base_approved",
1261 ":rtc_task_queue",
1262 ]
1263}
1264
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001265if (rtc_include_tests) {
Artem Titove41c4332018-07-25 15:04:28 +02001266 rtc_source_set("sigslot_unittest") {
1267 testonly = true
1268 sources = [
1269 "sigslot_unittest.cc",
1270 ]
1271 deps = [
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001272 ":gunit_helpers",
Artem Titove41c4332018-07-25 15:04:28 +02001273 ":rtc_base",
1274 ":rtc_base_tests_utils",
Yves Gerey3e707812018-11-28 16:47:49 +01001275 "../test:test_support",
Artem Titove41c4332018-07-25 15:04:28 +02001276 "third_party/sigslot",
1277 ]
1278 }
1279
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001280 rtc_source_set("rtc_base_tests_main") {
1281 testonly = true
1282 sources = [
1283 "unittest_main.cc",
1284 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001285 deps = [
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001286 ":gunit_helpers",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001287 ":rtc_base",
1288 ":rtc_base_approved",
1289 ":rtc_base_tests_utils",
Mirko Bonadei17f48782018-09-28 08:51:10 +02001290 "../system_wrappers:field_trial",
1291 "../system_wrappers:metrics",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001292 "../test:field_trial",
1293 "../test:test_support",
1294 ]
1295
1296 public_deps = [
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001297 "//testing/gtest",
1298 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001299 }
1300
1301 rtc_source_set("rtc_base_nonparallel_tests") {
1302 testonly = true
1303
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001304 sources = [
1305 "cpu_time_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001306 "file_rotating_stream_unittest.cc",
1307 "null_socket_server_unittest.cc",
1308 "physical_socket_server_unittest.cc",
1309 "socket_address_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001310 "socket_unittest.cc",
1311 "socket_unittest.h",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001312 ]
1313 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001314 ":checks",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001315 ":gunit_helpers",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001316 ":rtc_base",
1317 ":rtc_base_tests_main",
1318 ":rtc_base_tests_utils",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001319 ":testclient",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001320 "../system_wrappers:system_wrappers",
Patrik Höglund7696bef2018-03-15 15:05:39 +01001321 "../test:fileutils",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001322 "../test:test_support",
Yves Gerey3e707812018-11-28 16:47:49 +01001323 "third_party/sigslot:sigslot",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001324 "//testing/gtest",
Karl Wiberg918f50c2018-07-05 11:40:33 +02001325 "//third_party/abseil-cpp/absl/memory",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001326 ]
1327 if (is_win) {
Steve Anton10542f22019-01-11 09:11:00 -08001328 sources += [ "win32_socket_server_unittest.cc" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001329 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001330 }
1331
1332 rtc_source_set("rtc_base_approved_unittests") {
1333 testonly = true
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001334 sources = [
Steve Anton10542f22019-01-11 09:11:00 -08001335 "atomic_ops_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001336 "base64_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001337 "bind_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001338 "bit_buffer_unittest.cc",
1339 "bitrate_allocation_strategy_unittest.cc",
1340 "buffer_queue_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001341 "buffer_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001342 "byte_buffer_unittest.cc",
1343 "byte_order_unittest.cc",
1344 "copy_on_write_buffer_unittest.cc",
1345 "critical_section_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001346 "event_tracer_unittest.cc",
1347 "event_unittest.cc",
1348 "file_unittest.cc",
1349 "function_view_unittest.cc",
1350 "logging_unittest.cc",
Karl Wiberg65c39222017-11-22 12:25:14 +01001351 "numerics/histogram_percentile_counter_unittest.cc",
1352 "numerics/mod_ops_unittest.cc",
1353 "numerics/moving_max_counter_unittest.cc",
Karl Wiberge40468b2017-11-22 10:42:26 +01001354 "numerics/safe_compare_unittest.cc",
1355 "numerics/safe_minmax_unittest.cc",
Ilya Nikolaevskiy0beed5d2018-05-22 10:54:30 +02001356 "numerics/sample_counter_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001357 "one_time_event_unittest.cc",
Artem Titove62f6002018-03-19 15:40:00 +01001358 "platform_file_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001359 "platform_thread_unittest.cc",
1360 "random_unittest.cc",
1361 "rate_limiter_unittest.cc",
1362 "rate_statistics_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001363 "rate_tracker_unittest.cc",
1364 "ref_counted_object_unittest.cc",
Alessio Bazzicad31843e2018-04-06 16:18:21 +02001365 "sanitizer_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001366 "string_encode_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001367 "string_to_number_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001368 "string_utils_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001369 "stringize_macros_unittest.cc",
Tommifef05002018-02-27 13:51:08 +01001370 "strings/string_builder_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001371 "swap_queue_unittest.cc",
1372 "thread_annotations_unittest.cc",
1373 "thread_checker_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001374 "time_utils_unittest.cc",
1375 "timestamp_aligner_unittest.cc",
1376 "virtual_socket_unittest.cc",
Joachim Bauch5b32f232018-03-07 20:02:26 +01001377 "zero_memory_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001378 ]
henrika3ca48a62018-05-21 13:34:51 +02001379 if (is_win) {
1380 sources += [ "win/windows_version_unittest.cc" ]
1381 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001382 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001383 ":checks",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001384 ":gunit_helpers",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001385 ":rate_limiter",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001386 ":rtc_base",
1387 ":rtc_base_approved",
1388 ":rtc_base_tests_main",
1389 ":rtc_base_tests_utils",
1390 ":rtc_task_queue",
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001391 ":safe_compare",
Karl Wiberg12edf4c2018-03-07 14:18:56 +01001392 ":safe_minmax",
Alessio Bazzicad31843e2018-04-06 16:18:21 +02001393 ":sanitizer",
Patrik Höglund3e113432017-12-15 14:40:10 +01001394 ":stringutils",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001395 ":testclient",
kwiberg529662a2017-09-04 05:43:17 -07001396 "../api:array_view",
Yves Gerey3e707812018-11-28 16:47:49 +01001397 "../api/units:time_delta",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001398 "../system_wrappers:system_wrappers",
Patrik Höglund7696bef2018-03-15 15:05:39 +01001399 "../test:fileutils",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001400 "../test:test_support",
Karl Wiberg29e7bee2018-03-22 14:11:52 +01001401 "memory:unittests",
Artem Titova76af0c2018-07-23 17:38:12 +02001402 "third_party/base64",
Yves Gerey3e707812018-11-28 16:47:49 +01001403 "third_party/sigslot:sigslot",
Karl Wiberg918f50c2018-07-05 11:40:33 +02001404 "//third_party/abseil-cpp/absl/memory",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001405 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001406 }
1407
1408 rtc_source_set("rtc_task_queue_unittests") {
Per Kjellandera7f2d842018-01-10 15:54:53 +00001409 visibility = [ "*" ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001410 testonly = true
1411
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001412 sources = [
1413 "task_queue_unittest.cc",
1414 ]
1415 deps = [
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001416 ":gunit_helpers",
mbonadei95c8f652017-08-27 23:40:10 -07001417 ":rtc_base_approved",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001418 ":rtc_base_tests_main",
1419 ":rtc_base_tests_utils",
1420 ":rtc_task_queue",
Tommi68561562018-02-13 19:47:50 +01001421 ":rtc_task_queue_for_test",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001422 "../test:test_support",
Yves Gerey3e707812018-11-28 16:47:49 +01001423 "//third_party/abseil-cpp/absl/memory",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001424 ]
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001425 }
1426
1427 rtc_source_set("sequenced_task_checker_unittests") {
1428 testonly = true
1429
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001430 sources = [
1431 "sequenced_task_checker_unittest.cc",
1432 ]
1433 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001434 ":checks",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001435 ":rtc_base_approved",
1436 ":rtc_base_tests_main",
1437 ":rtc_task_queue",
1438 ":sequenced_task_checker",
1439 "../test:test_support",
1440 ]
1441 }
1442
1443 rtc_source_set("weak_ptr_unittests") {
1444 testonly = true
1445
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001446 sources = [
1447 "weak_ptr_unittest.cc",
1448 ]
1449 deps = [
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001450 ":gunit_helpers",
Mirko Bonadeica270912018-10-10 15:51:03 +02001451 ":rtc_base_approved",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001452 ":rtc_base_tests_main",
1453 ":rtc_base_tests_utils",
Tommi8d2c5a82018-03-19 11:12:48 +01001454 ":rtc_event",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001455 ":rtc_task_queue",
1456 ":weak_ptr",
1457 "../test:test_support",
Yves Gerey3e707812018-11-28 16:47:49 +01001458 "//third_party/abseil-cpp/absl/memory",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001459 ]
1460 }
1461
1462 rtc_source_set("rtc_numerics_unittests") {
1463 testonly = true
1464
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001465 sources = [
1466 "numerics/exp_filter_unittest.cc",
Ilya Nikolaevskiy26341992018-11-05 12:55:18 +01001467 "numerics/moving_average_unittest.cc",
Ilya Nikolaevskiyb9685752017-11-01 14:01:00 +01001468 "numerics/moving_median_filter_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001469 "numerics/percentile_filter_unittest.cc",
Artem Titove4ed6ea2019-01-11 11:02:19 +01001470 "numerics/samples_stats_counter_unittest.cc",
Bjorn Tereliusa194e582017-10-25 13:07:09 +02001471 "numerics/sequence_number_util_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001472 ]
1473 deps = [
1474 ":rtc_base_approved",
1475 ":rtc_base_tests_main",
1476 ":rtc_numerics",
1477 "../test:test_support",
1478 ]
1479 }
1480
Sam Zackrissonb45bdb52018-10-02 16:25:59 +02001481 rtc_source_set("rtc_json_unittests") {
1482 testonly = true
1483
1484 sources = [
1485 "strings/json_unittest.cc",
1486 ]
1487 deps = [
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001488 ":gunit_helpers",
Sam Zackrissonb45bdb52018-10-02 16:25:59 +02001489 ":rtc_base_tests_main",
1490 ":rtc_base_tests_utils",
1491 ":rtc_json",
1492 "../test:test_support",
1493 ]
1494 }
1495
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001496 rtc_source_set("rtc_base_unittests") {
1497 testonly = true
Benjamin Wrightd6f86e82018-05-08 13:12:25 -07001498 defines = []
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001499
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001500 sources = [
1501 "callback_unittest.cc",
1502 "crc32_unittest.cc",
Sebastian Janssonf9c5cf62018-02-28 16:04:26 +01001503 "data_rate_limiter_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001504 "helpers_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001505 "ip_address_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001506 "memory_usage_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001507 "message_digest_unittest.cc",
1508 "message_queue_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001509 "nat_unittest.cc",
1510 "network_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001511 "proxy_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001512 "rolling_accumulator_unittest.cc",
1513 "rtc_certificate_generator_unittest.cc",
1514 "rtc_certificate_unittest.cc",
1515 "signal_thread_unittest.cc",
1516 "sigslot_tester_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001517 "stream_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001518 "test_client_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001519 "thread_unittest.cc",
1520 ]
1521 if (is_win) {
1522 sources += [
1523 "win32_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001524 "win32_window_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001525 ]
1526 }
Fabrice de Gans-Riberi09a6cd52018-03-30 10:38:06 -07001527 if (is_posix || is_fuchsia) {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001528 sources += [
Steve Anton10542f22019-01-11 09:11:00 -08001529 "openssl_adapter_unittest.cc",
Benjamin Wrightb3f887b2018-10-30 13:53:30 -07001530 "openssl_key_derivation_hkdf_unittest.cc",
Steve Anton10542f22019-01-11 09:11:00 -08001531 "openssl_session_cache_unittest.cc",
1532 "openssl_utility_unittest.cc",
1533 "ssl_adapter_unittest.cc",
1534 "ssl_identity_unittest.cc",
1535 "ssl_stream_adapter_unittest.cc",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001536 ]
1537 }
1538 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +01001539 ":checks",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001540 ":gunit_helpers",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001541 ":rtc_base_tests_main",
1542 ":rtc_base_tests_utils",
Patrik Höglund3e113432017-12-15 14:40:10 +01001543 ":stringutils",
Mirko Bonadeie3abb812018-11-23 13:15:08 +01001544 ":testclient",
Joachim Bauch58daf402017-12-21 22:00:34 +01001545 "../api:array_view",
Patrik Höglund7696bef2018-03-15 15:05:39 +01001546 "../test:fileutils",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001547 "../test:test_support",
Artem Titove41c4332018-07-25 15:04:28 +02001548 "third_party/sigslot",
Karl Wiberg918f50c2018-07-05 11:40:33 +02001549 "//third_party/abseil-cpp/absl/memory",
Danil Chapovalov0a1d1892018-06-21 11:48:25 +02001550 "//third_party/abseil-cpp/absl/types:optional",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001551 ]
1552 public_deps = [
1553 ":rtc_base",
1554 ]
Diogo Real1dca9d52017-08-29 12:18:32 -07001555 if (build_with_chromium) {
1556 include_dirs = [ "../../boringssl/src/include" ]
1557 }
1558 if (rtc_build_ssl) {
1559 deps += [ "//third_party/boringssl" ]
1560 } else {
1561 configs += [ ":external_ssl_library" ]
1562 }
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001563 }
1564}
1565
Henrik Kjellander73e21802017-06-20 08:38:58 +02001566if (is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +00001567 rtc_android_library("base_java") {
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001568 java_files = [
1569 "java/src/org/webrtc/ContextUtils.java",
Paulina Hensman1ec04f12018-06-21 14:31:38 +02001570 "java/src/org/webrtc/Loggable.java",
Henrik Kjellanderc0362762017-06-29 08:03:04 +02001571 "java/src/org/webrtc/Logging.java",
1572 "java/src/org/webrtc/Size.java",
1573 "java/src/org/webrtc/ThreadUtils.java",
1574 ]
Artem Titarenko69540f42018-12-10 12:30:46 +01001575 deps = [
1576 "//third_party/android_deps:android_support_annotations_java",
1577 ]
Henrik Kjellander73e21802017-06-20 08:38:58 +02001578 }
1579}