blob: 41a3898608b688c18bcc2e57235bb4baac0da539 [file] [log] [blame]
kjellanderc76dc952016-06-03 03:09:32 -07001# Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
2#
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
mbonadei9aa3f0a2017-01-24 06:58:22 -08009import("../webrtc.gni")
ossu7bb87ee2017-01-23 04:56:25 -080010if (is_android) {
11 import("//build/config/android/config.gni")
12 import("//build/config/android/rules.gni")
13}
kjellanderc76dc952016-06-03 03:09:32 -070014
15group("pc") {
Mirko Bonadeie51f7852017-12-06 11:23:19 +010016 deps = [
kjellanderc76dc952016-06-03 03:09:32 -070017 ":rtc_pc",
18 ]
19}
20
21config("rtc_pc_config") {
jbaucheaa9c1d2017-03-06 11:32:22 -080022 defines = []
deadbeef40610e22016-12-22 10:53:38 -080023 if (rtc_enable_sctp) {
24 defines += [ "HAVE_SCTP" ]
25 }
kjellanderc76dc952016-06-03 03:09:32 -070026}
27
zhihuang38ede132017-06-15 12:52:32 -070028rtc_static_library("rtc_pc_base") {
kjellanderc76dc952016-06-03 03:09:32 -070029 defines = []
30 sources = [
31 "audiomonitor.cc",
32 "audiomonitor.h",
33 "bundlefilter.cc",
34 "bundlefilter.h",
35 "channel.cc",
36 "channel.h",
37 "channelmanager.cc",
38 "channelmanager.h",
39 "currentspeakermonitor.cc",
40 "currentspeakermonitor.h",
Zhi Huangf2d7beb2017-11-20 14:35:11 -080041 "dtlssrtptransport.cc",
42 "dtlssrtptransport.h",
jbauchdfcab722017-03-06 00:14:10 -080043 "externalhmac.cc",
44 "externalhmac.h",
kjellanderc76dc952016-06-03 03:09:32 -070045 "mediamonitor.cc",
46 "mediamonitor.h",
47 "mediasession.cc",
48 "mediasession.h",
kjellanderc76dc952016-06-03 03:09:32 -070049 "rtcpmuxfilter.cc",
50 "rtcpmuxfilter.h",
Steve Anton1d03a752017-11-27 14:30:09 -080051 "rtpmediautils.cc",
52 "rtpmediautils.h",
zsteind48dbda2017-04-04 19:45:57 -070053 "rtptransport.cc",
54 "rtptransport.h",
zstein398c3fd2017-07-19 13:38:02 -070055 "rtptransportinternal.h",
Zhi Huangf2d7beb2017-11-20 14:35:11 -080056 "rtptransportinternaladapter.h",
kjellanderc76dc952016-06-03 03:09:32 -070057 "srtpfilter.cc",
58 "srtpfilter.h",
zstein4dde3df2017-07-07 14:26:25 -070059 "srtpsession.cc",
60 "srtpsession.h",
zstein398c3fd2017-07-19 13:38:02 -070061 "srtptransport.cc",
62 "srtptransport.h",
Zhi Huangb5261582017-09-29 10:51:43 -070063 "transportcontroller.cc",
64 "transportcontroller.h",
kjellanderc76dc952016-06-03 03:09:32 -070065 "voicechannel.h",
66 ]
67
68 deps = [
mbonadei7d9a55b2017-06-01 13:01:48 -070069 "..:webrtc_common",
kjellandera69d9732016-08-31 07:33:05 -070070 "../api:call_api",
mbonadei7d9a55b2017-06-01 13:01:48 -070071 "../api:libjingle_peerconnection_api",
kwiberg84f6a3f2017-09-05 08:43:13 -070072 "../api:optional",
mbonadei7d9a55b2017-06-01 13:01:48 -070073 "../api:ortc_api",
zhihuang38ede132017-06-15 12:52:32 -070074 "../media:rtc_data",
zhihuang130ca7e2017-06-21 01:02:59 -070075 "../media:rtc_h264_profile_id",
zhihuang38ede132017-06-15 12:52:32 -070076 "../media:rtc_media_base",
mbonadei7d9a55b2017-06-01 13:01:48 -070077 "../p2p:rtc_p2p",
ehmaldonadof6a861a2017-07-19 10:40:47 -070078 "../rtc_base:rtc_base",
79 "../rtc_base:rtc_task_queue",
kjellanderc76dc952016-06-03 03:09:32 -070080 ]
81
kjellanderc76dc952016-06-03 03:09:32 -070082 if (rtc_build_libsrtp) {
83 deps += [ "//third_party/libsrtp" ]
84 }
85
ehmaldonadoe9cc6862016-09-05 06:10:18 -070086 public_configs = [ ":rtc_pc_config" ]
kjellanderc76dc952016-06-03 03:09:32 -070087
kjellandere40a7ee2016-10-16 23:56:12 -070088 if (!build_with_chromium && is_clang) {
kjellander142f8c52016-06-13 00:08:24 -070089 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070090 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderc76dc952016-06-03 03:09:32 -070091 }
92}
kjellander142f8c52016-06-13 00:08:24 -070093
zhihuang38ede132017-06-15 12:52:32 -070094rtc_source_set("rtc_pc") {
zhihuang38ede132017-06-15 12:52:32 -070095 deps = [
Mirko Bonadeie51f7852017-12-06 11:23:19 +010096 ":rtc_pc_base",
zhihuang38ede132017-06-15 12:52:32 -070097 "../media:rtc_audio_video",
98 ]
99}
100
ossu7bb87ee2017-01-23 04:56:25 -0800101config("libjingle_peerconnection_warnings_config") {
102 # GN orders flags on a target before flags from configs. The default config
103 # adds these flags so to cancel them out they need to come from a config and
104 # cannot be on the target directly.
105 if (!is_win && !is_clang) {
106 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC.
107 }
108}
109
zhihuang38ede132017-06-15 12:52:32 -0700110rtc_static_library("peerconnection") {
ossu7bb87ee2017-01-23 04:56:25 -0800111 cflags = []
112 sources = [
113 "audiotrack.cc",
114 "audiotrack.h",
115 "datachannel.cc",
116 "datachannel.h",
117 "dtmfsender.cc",
118 "dtmfsender.h",
deadbeef1dcb1642017-03-29 21:08:16 -0700119 "iceserverparsing.cc",
120 "iceserverparsing.h",
ossu7bb87ee2017-01-23 04:56:25 -0800121 "jsepicecandidate.cc",
122 "jsepsessiondescription.cc",
123 "localaudiosource.cc",
124 "localaudiosource.h",
ossu7bb87ee2017-01-23 04:56:25 -0800125 "mediastream.cc",
126 "mediastream.h",
127 "mediastreamobserver.cc",
128 "mediastreamobserver.h",
129 "mediastreamtrack.h",
ossu7bb87ee2017-01-23 04:56:25 -0800130 "peerconnection.cc",
131 "peerconnection.h",
132 "peerconnectionfactory.cc",
133 "peerconnectionfactory.h",
134 "remoteaudiosource.cc",
135 "remoteaudiosource.h",
136 "rtcstatscollector.cc",
137 "rtcstatscollector.h",
138 "rtpreceiver.cc",
139 "rtpreceiver.h",
140 "rtpsender.cc",
141 "rtpsender.h",
Steve Anton6e634bf2017-11-13 10:44:53 -0800142 "rtptransceiver.cc",
143 "rtptransceiver.h",
ossu7bb87ee2017-01-23 04:56:25 -0800144 "sctputils.cc",
145 "sctputils.h",
Steve Anton97a9f762017-10-06 10:14:03 -0700146 "sdputils.cc",
147 "sdputils.h",
ossu7bb87ee2017-01-23 04:56:25 -0800148 "statscollector.cc",
149 "statscollector.h",
150 "streamcollection.h",
deadbeef804c1af2017-02-11 19:07:31 -0800151 "trackmediainfomap.cc",
152 "trackmediainfomap.h",
ossu7bb87ee2017-01-23 04:56:25 -0800153 "videocapturertracksource.cc",
154 "videocapturertracksource.h",
155 "videotrack.cc",
156 "videotrack.h",
157 "videotracksource.cc",
158 "videotracksource.h",
159 "webrtcsdp.cc",
160 "webrtcsdp.h",
ossu7bb87ee2017-01-23 04:56:25 -0800161 "webrtcsessiondescriptionfactory.cc",
162 "webrtcsessiondescriptionfactory.h",
163 ]
164
165 configs += [ ":libjingle_peerconnection_warnings_config" ]
166
167 if (!build_with_chromium && is_clang) {
168 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
169 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
170 }
171
172 deps = [
zhihuang38ede132017-06-15 12:52:32 -0700173 ":rtc_pc_base",
mbonadei7d9a55b2017-06-01 13:01:48 -0700174 "..:webrtc_common",
ossu7bb87ee2017-01-23 04:56:25 -0800175 "../api:call_api",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100176 "../api:libjingle_peerconnection_api",
kwiberg84f6a3f2017-09-05 08:43:13 -0700177 "../api:optional",
ossu7bb87ee2017-01-23 04:56:25 -0800178 "../api:rtc_stats_api",
ilnikd60d06a2017-04-05 03:02:20 -0700179 "../api/video_codecs:video_codecs_api",
zhihuang38ede132017-06-15 12:52:32 -0700180 "../call:call_interfaces",
mbonadei7d9a55b2017-06-01 13:01:48 -0700181 "../logging:rtc_event_log_api",
zhihuang38ede132017-06-15 12:52:32 -0700182 "../media:rtc_data",
183 "../media:rtc_media_base",
mbonadei7d9a55b2017-06-01 13:01:48 -0700184 "../p2p:rtc_p2p",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700185 "../rtc_base:rtc_base",
186 "../rtc_base:rtc_base_approved",
ossu7bb87ee2017-01-23 04:56:25 -0800187 "../stats",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100188 "../system_wrappers",
189 "../system_wrappers:field_trial_api",
ossu7bb87ee2017-01-23 04:56:25 -0800190 ]
zhihuang38ede132017-06-15 12:52:32 -0700191}
192
193# This target implements CreatePeerConnectionFactory methods that will create a
194# PeerConnection will full functionality (audio, video and data). Applications
195# that wish to reduce their binary size by ommitting functionality they don't
196# need should use CreateModularCreatePeerConnectionFactory instead, using the
197# "peerconnection" build target and other targets specific to their
198# requrements. See comment in peerconnectionfactoryinterface.h.
zhihuangab97e182017-06-22 01:28:59 -0700199rtc_static_library("create_pc_factory") {
zhihuang38ede132017-06-15 12:52:32 -0700200 sources = [
201 "createpeerconnectionfactory.cc",
202 ]
203
204 deps = [
205 "../api:audio_mixer_api",
206 "../api:libjingle_peerconnection_api",
Edward Lemur872cf382017-11-20 18:41:50 +0100207 "../api:peerconnection_and_implicit_call_api",
zhihuang38ede132017-06-15 12:52:32 -0700208 "../api/audio_codecs:audio_codecs_api",
Magnus Jedvert58b03162017-09-15 19:02:47 +0200209 "../api/video_codecs:video_codecs_api",
zhihuang38ede132017-06-15 12:52:32 -0700210 "../call",
211 "../call:call_interfaces",
212 "../logging:rtc_event_log_api",
213 "../media:rtc_audio_video",
Edward Lemur872cf382017-11-20 18:41:50 +0100214 "../media:rtc_media_base",
zhihuang38ede132017-06-15 12:52:32 -0700215 "../modules/audio_device:audio_device",
peaha9cc40b2017-06-29 08:32:09 -0700216 "../modules/audio_processing:audio_processing",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700217 "../rtc_base:rtc_base",
218 "../rtc_base:rtc_base_approved",
zhihuang38ede132017-06-15 12:52:32 -0700219 ]
220
221 configs += [ ":libjingle_peerconnection_warnings_config" ]
222
223 if (!build_with_chromium && is_clang) {
224 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
225 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
226 }
227}
228
229rtc_source_set("libjingle_peerconnection") {
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100230 deps = [
zhihuang38ede132017-06-15 12:52:32 -0700231 ":create_pc_factory",
232 ":peerconnection",
233 "../api:libjingle_peerconnection_api",
234 ]
ossu7bb87ee2017-01-23 04:56:25 -0800235}
236
kjellander142f8c52016-06-13 00:08:24 -0700237if (rtc_include_tests) {
238 config("rtc_pc_unittests_config") {
239 # GN orders flags on a target before flags from configs. The default config
240 # adds -Wall, and this flag have to be after -Wall -- so they need to
241 # come from a config and can't be on the target directly.
242 if (!is_win && !is_clang) {
243 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC.
244 }
245 }
246
ehmaldonado38a21322016-09-02 04:10:34 -0700247 rtc_test("rtc_pc_unittests") {
kjellander142f8c52016-06-13 00:08:24 -0700248 testonly = true
249
250 sources = [
251 "bundlefilter_unittest.cc",
252 "channel_unittest.cc",
253 "channelmanager_unittest.cc",
254 "currentspeakermonitor_unittest.cc",
Zhi Huangf2d7beb2017-11-20 14:35:11 -0800255 "dtlssrtptransport_unittest.cc",
kjellander142f8c52016-06-13 00:08:24 -0700256 "mediasession_unittest.cc",
257 "rtcpmuxfilter_unittest.cc",
zstein56162b92017-04-24 16:54:35 -0700258 "rtptransport_unittest.cc",
zstein398c3fd2017-07-19 13:38:02 -0700259 "rtptransporttestutil.h",
kjellander142f8c52016-06-13 00:08:24 -0700260 "srtpfilter_unittest.cc",
zstein4dde3df2017-07-07 14:26:25 -0700261 "srtpsession_unittest.cc",
262 "srtptestutil.h",
zstein398c3fd2017-07-19 13:38:02 -0700263 "srtptransport_unittest.cc",
Zhi Huangb5261582017-09-29 10:51:43 -0700264 "transportcontroller_unittest.cc",
kjellander142f8c52016-06-13 00:08:24 -0700265 ]
266
267 include_dirs = [ "//third_party/libsrtp/srtp" ]
268
ehmaldonado7a2ce0b2016-09-05 01:35:44 -0700269 configs += [ ":rtc_pc_unittests_config" ]
kjellander142f8c52016-06-13 00:08:24 -0700270
kjellandere40a7ee2016-10-16 23:56:12 -0700271 if (!build_with_chromium && is_clang) {
kjellander142f8c52016-06-13 00:08:24 -0700272 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700273 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander142f8c52016-06-13 00:08:24 -0700274 }
275
276 if (is_win) {
277 libs = [ "strmiids.lib" ]
278 }
279
280 deps = [
ossu7bb87ee2017-01-23 04:56:25 -0800281 ":libjingle_peerconnection",
Zhi Huangb5261582017-09-29 10:51:43 -0700282 ":pc_test_utils",
kjellander142f8c52016-06-13 00:08:24 -0700283 ":rtc_pc",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100284 ":rtc_pc_base",
kwiberg529662a2017-09-04 05:43:17 -0700285 "../api:array_view",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100286 "../api:libjingle_peerconnection_api",
mbonadei7d9a55b2017-06-01 13:01:48 -0700287 "../logging:rtc_event_log_api",
288 "../media:rtc_media_base",
mbonadei9087d492017-04-25 00:35:35 -0700289 "../media:rtc_media_tests_utils",
mbonadei7d9a55b2017-06-01 13:01:48 -0700290 "../p2p:p2p_test_utils",
291 "../p2p:rtc_p2p",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700292 "../rtc_base:rtc_base",
293 "../rtc_base:rtc_base_approved",
294 "../rtc_base:rtc_base_tests_main",
295 "../rtc_base:rtc_base_tests_utils",
kjellander142f8c52016-06-13 00:08:24 -0700296 "../system_wrappers:metrics_default",
zstein398c3fd2017-07-19 13:38:02 -0700297 "../test:test_support",
kjellander142f8c52016-06-13 00:08:24 -0700298 ]
299
300 if (rtc_build_libsrtp) {
301 deps += [ "//third_party/libsrtp" ]
302 }
303
304 if (is_android) {
305 deps += [ "//testing/android/native_test:native_test_support" ]
306 }
307 }
ossu7bb87ee2017-01-23 04:56:25 -0800308
deadbeefe814a0d2017-02-25 18:15:09 -0800309 rtc_source_set("pc_test_utils") {
310 testonly = true
311 sources = [
312 "test/fakeaudiocapturemodule.cc",
313 "test/fakeaudiocapturemodule.h",
314 "test/fakedatachannelprovider.h",
315 "test/fakeperiodicvideocapturer.h",
316 "test/fakertccertificategenerator.h",
Steve Antonda6c0952017-10-23 11:41:54 -0700317 "test/fakesctptransport.h",
Zhi Huangb5261582017-09-29 10:51:43 -0700318 "test/faketransportcontroller.h",
deadbeefe814a0d2017-02-25 18:15:09 -0800319 "test/fakevideotrackrenderer.h",
320 "test/fakevideotracksource.h",
321 "test/mock_datachannel.h",
322 "test/mock_peerconnection.h",
deadbeefe814a0d2017-02-25 18:15:09 -0800323 "test/mockpeerconnectionobservers.h",
324 "test/peerconnectiontestwrapper.cc",
325 "test/peerconnectiontestwrapper.h",
326 "test/rtcstatsobtainer.h",
327 "test/testsdpstrings.h",
328 ]
329
330 deps = [
331 ":libjingle_peerconnection",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100332 ":peerconnection",
Zhi Huangb5261582017-09-29 10:51:43 -0700333 ":rtc_pc_base",
mbonadei7d9a55b2017-06-01 13:01:48 -0700334 "..:webrtc_common",
335 "../api:libjingle_peerconnection_test_api",
Edward Lemur872cf382017-11-20 18:41:50 +0100336 "../api:peerconnection_and_implicit_call_api",
mbonadei7d9a55b2017-06-01 13:01:48 -0700337 "../api:rtc_stats_api",
zhihuang38ede132017-06-15 12:52:32 -0700338 "../call:call_interfaces",
339 "../logging:rtc_event_log_api",
mbonadei7d9a55b2017-06-01 13:01:48 -0700340 "../media:rtc_media",
Edward Lemur872cf382017-11-20 18:41:50 +0100341 "../media:rtc_media_base",
mbonadei7d9a55b2017-06-01 13:01:48 -0700342 "../media:rtc_media_tests_utils",
343 "../modules/audio_device:audio_device",
344 "../p2p:p2p_test_utils",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700345 "../rtc_base:rtc_base",
346 "../rtc_base:rtc_base_approved",
347 "../rtc_base:rtc_base_tests_utils",
mbonadei7d9a55b2017-06-01 13:01:48 -0700348 "../test:test_support",
deadbeefe814a0d2017-02-25 18:15:09 -0800349 "//testing/gmock",
350 ]
351
352 if (!build_with_chromium && is_clang) {
353 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
354 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
355 }
356 }
357
ossu7bb87ee2017-01-23 04:56:25 -0800358 config("peerconnection_unittests_config") {
359 # The warnings below are enabled by default. Since GN orders compiler flags
360 # for a target before flags from configs, the only way to disable such
361 # warnings is by having them in a separate config, loaded from the target.
362 # TODO(kjellander): Make the code compile without disabling these flags.
363 # See https://bugs.webrtc.org/3307.
364 if (is_clang && is_win) {
365 cflags = [
366 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6267
367 # for -Wno-sign-compare
368 "-Wno-sign-compare",
ossu7bb87ee2017-01-23 04:56:25 -0800369 ]
370 }
371
372 if (!is_win) {
373 cflags = [ "-Wno-sign-compare" ]
374 }
375 }
376
377 rtc_test("peerconnection_unittests") {
ossu7bb87ee2017-01-23 04:56:25 -0800378 testonly = true
379 sources = [
380 "datachannel_unittest.cc",
381 "dtmfsender_unittest.cc",
deadbeef1dcb1642017-03-29 21:08:16 -0700382 "iceserverparsing_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800383 "jsepsessiondescription_unittest.cc",
384 "localaudiosource_unittest.cc",
385 "mediaconstraintsinterface_unittest.cc",
386 "mediastream_unittest.cc",
Steve Anton6f25b092017-10-23 09:39:20 -0700387 "peerconnection_bundle_unittest.cc",
Steve Anton6b63cd52017-10-06 11:20:31 -0700388 "peerconnection_crypto_unittest.cc",
Steve Antonda6c0952017-10-23 11:41:54 -0700389 "peerconnection_datachannel_unittest.cc",
Steve Antonf1c6db12017-10-13 11:13:35 -0700390 "peerconnection_ice_unittest.cc",
deadbeef1dcb1642017-03-29 21:08:16 -0700391 "peerconnection_integrationtest.cc",
Steve Anton8d3444d2017-10-20 15:30:51 -0700392 "peerconnection_media_unittest.cc",
Henrik Boström933d8b02017-10-10 10:05:16 -0700393 "peerconnection_rtp_unittest.cc",
Steve Anton8d3444d2017-10-20 15:30:51 -0700394 "peerconnection_signaling_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800395 "peerconnectionendtoend_unittest.cc",
396 "peerconnectionfactory_unittest.cc",
397 "peerconnectioninterface_unittest.cc",
Steve Anton94286cb2017-09-26 16:20:19 -0700398 "peerconnectionwrapper.cc",
399 "peerconnectionwrapper.h",
ossu7bb87ee2017-01-23 04:56:25 -0800400 "proxy_unittest.cc",
401 "rtcstats_integrationtest.cc",
402 "rtcstatscollector_unittest.cc",
Steve Anton1d03a752017-11-27 14:30:09 -0800403 "rtpmediautils_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800404 "rtpsenderreceiver_unittest.cc",
405 "sctputils_unittest.cc",
406 "statscollector_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800407 "test/fakeaudiocapturemodule_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800408 "test/testsdpstrings.h",
deadbeef804c1af2017-02-11 19:07:31 -0800409 "trackmediainfomap_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800410 "videocapturertracksource_unittest.cc",
411 "videotrack_unittest.cc",
412 "webrtcsdp_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800413 ]
414
415 if (rtc_enable_sctp) {
416 defines = [ "HAVE_SCTP" ]
417 }
418
419 configs += [ ":peerconnection_unittests_config" ]
420
421 if (!build_with_chromium && is_clang) {
422 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
423 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
424 }
425
426 # TODO(jschuh): Bug 1348: fix this warning.
427 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
428
429 if (is_win) {
430 cflags = [
431 "/wd4245", # conversion from int to size_t, signed/unsigned mismatch.
432 "/wd4389", # signed/unsigned mismatch.
433 ]
434 }
435
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100436 deps = [
437 ":peerconnection",
438 ":rtc_pc_base",
439 ]
ossu7bb87ee2017-01-23 04:56:25 -0800440 if (is_android) {
Patrik Höglund563934e2017-09-15 09:04:28 +0200441 deps += [ ":android_black_magic" ]
ossu7bb87ee2017-01-23 04:56:25 -0800442 }
443
444 deps += [
445 ":libjingle_peerconnection",
deadbeefe814a0d2017-02-25 18:15:09 -0800446 ":pc_test_utils",
ossu7bb87ee2017-01-23 04:56:25 -0800447 "..:webrtc_common",
448 "../api:fakemetricsobserver",
Patrik Höglund563934e2017-09-15 09:04:28 +0200449 "../api:libjingle_peerconnection_test_api",
Henrik Boström31638672017-11-23 17:48:32 +0100450 "../api:optional",
Patrik Höglund563934e2017-09-15 09:04:28 +0200451 "../api:rtc_stats_api",
Karl Wibergc5bb00b2017-10-10 23:17:17 +0200452 "../api/audio_codecs:audio_codecs_api",
Patrik Höglund563934e2017-09-15 09:04:28 +0200453 "../api/audio_codecs:builtin_audio_decoder_factory",
454 "../api/audio_codecs:builtin_audio_encoder_factory",
Karl Wibergc5bb00b2017-10-10 23:17:17 +0200455 "../api/audio_codecs/L16:audio_decoder_L16",
456 "../api/audio_codecs/L16:audio_encoder_L16",
Steve Anton8d3444d2017-10-20 15:30:51 -0700457 "../call:call_interfaces",
Elad Alon99c3fe52017-10-13 16:29:40 +0200458 "../logging:rtc_event_log_api",
Steve Anton8d3444d2017-10-20 15:30:51 -0700459 "../logging:rtc_event_log_impl",
Patrik Höglund563934e2017-09-15 09:04:28 +0200460 "../media:rtc_audio_video",
461 "../media:rtc_data", # TODO(phoglund): AFAIK only used for one sctp constant.
462 "../media:rtc_media_base",
mbonadei9087d492017-04-25 00:35:35 -0700463 "../media:rtc_media_tests_utils",
Patrik Höglund563934e2017-09-15 09:04:28 +0200464 "../modules/audio_processing:audio_processing",
465 "../modules/utility:utility",
466 "../p2p:p2p_test_utils",
467 "../p2p:rtc_p2p",
ossu7bb87ee2017-01-23 04:56:25 -0800468 "../pc:rtc_pc",
Henrik Boström933d8b02017-10-10 10:05:16 -0700469 "../rtc_base:rtc_base",
Patrik Höglund563934e2017-09-15 09:04:28 +0200470 "../rtc_base:rtc_base_approved",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700471 "../rtc_base:rtc_base_tests_main",
472 "../rtc_base:rtc_base_tests_utils",
ossu7bb87ee2017-01-23 04:56:25 -0800473 "../system_wrappers:metrics_default",
kwiberg2b3aa142017-06-14 03:31:17 -0700474 "../test:audio_codec_mocks",
Patrik Höglund563934e2017-09-15 09:04:28 +0200475 "../test:test_support",
ossu7bb87ee2017-01-23 04:56:25 -0800476 ]
477
478 if (is_android) {
Patrik Höglund563934e2017-09-15 09:04:28 +0200479 deps += [
480 "//testing/android/native_test:native_test_support",
481
482 # We need to depend on this one directly, or classloads will fail for
483 # the voice engine BuildInfo, for instance.
484 "../sdk/android:libjingle_peerconnection_java",
485 ]
ossu7bb87ee2017-01-23 04:56:25 -0800486
487 shard_timeout = 900
488 }
489 }
Patrik Höglund563934e2017-09-15 09:04:28 +0200490
491 if (is_android) {
492 rtc_source_set("android_black_magic") {
493 # The android code uses hacky includes to chromium-base and the ssl code;
494 # having this in a separate target enables us to keep the peerconnection
495 # unit tests clean.
496 check_includes = false
497 testonly = true
498 sources = [
499 "test/androidtestinitializer.cc",
500 "test/androidtestinitializer.h",
501 ]
502 deps = [
503 "../sdk/android:libjingle_peerconnection_jni",
504 "//testing/android/native_test:native_test_support",
505 ]
506 }
507 }
kjellander142f8c52016-06-13 00:08:24 -0700508}