blob: 536dd23a0328113405f0c4048cc64ffb93493394 [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",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010078 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -070079 "../rtc_base:rtc_base",
80 "../rtc_base:rtc_task_queue",
Patrik Höglund3e113432017-12-15 14:40:10 +010081 "../rtc_base:stringutils",
kjellanderc76dc952016-06-03 03:09:32 -070082 ]
83
kjellanderc76dc952016-06-03 03:09:32 -070084 if (rtc_build_libsrtp) {
85 deps += [ "//third_party/libsrtp" ]
86 }
87
ehmaldonadoe9cc6862016-09-05 06:10:18 -070088 public_configs = [ ":rtc_pc_config" ]
kjellanderc76dc952016-06-03 03:09:32 -070089
kjellandere40a7ee2016-10-16 23:56:12 -070090 if (!build_with_chromium && is_clang) {
kjellander142f8c52016-06-13 00:08:24 -070091 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070092 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderc76dc952016-06-03 03:09:32 -070093 }
94}
kjellander142f8c52016-06-13 00:08:24 -070095
zhihuang38ede132017-06-15 12:52:32 -070096rtc_source_set("rtc_pc") {
zhihuang38ede132017-06-15 12:52:32 -070097 deps = [
Mirko Bonadeie51f7852017-12-06 11:23:19 +010098 ":rtc_pc_base",
zhihuang38ede132017-06-15 12:52:32 -070099 "../media:rtc_audio_video",
100 ]
101}
102
ossu7bb87ee2017-01-23 04:56:25 -0800103config("libjingle_peerconnection_warnings_config") {
104 # GN orders flags on a target before flags from configs. The default config
105 # adds these flags so to cancel them out they need to come from a config and
106 # cannot be on the target directly.
107 if (!is_win && !is_clang) {
108 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC.
109 }
110}
111
zhihuang38ede132017-06-15 12:52:32 -0700112rtc_static_library("peerconnection") {
ossu7bb87ee2017-01-23 04:56:25 -0800113 cflags = []
114 sources = [
115 "audiotrack.cc",
116 "audiotrack.h",
117 "datachannel.cc",
118 "datachannel.h",
119 "dtmfsender.cc",
120 "dtmfsender.h",
deadbeef1dcb1642017-03-29 21:08:16 -0700121 "iceserverparsing.cc",
122 "iceserverparsing.h",
ossu7bb87ee2017-01-23 04:56:25 -0800123 "jsepicecandidate.cc",
124 "jsepsessiondescription.cc",
125 "localaudiosource.cc",
126 "localaudiosource.h",
ossu7bb87ee2017-01-23 04:56:25 -0800127 "mediastream.cc",
128 "mediastream.h",
129 "mediastreamobserver.cc",
130 "mediastreamobserver.h",
131 "mediastreamtrack.h",
ossu7bb87ee2017-01-23 04:56:25 -0800132 "peerconnection.cc",
133 "peerconnection.h",
134 "peerconnectionfactory.cc",
135 "peerconnectionfactory.h",
136 "remoteaudiosource.cc",
137 "remoteaudiosource.h",
138 "rtcstatscollector.cc",
139 "rtcstatscollector.h",
140 "rtpreceiver.cc",
141 "rtpreceiver.h",
142 "rtpsender.cc",
143 "rtpsender.h",
Steve Anton6e634bf2017-11-13 10:44:53 -0800144 "rtptransceiver.cc",
145 "rtptransceiver.h",
ossu7bb87ee2017-01-23 04:56:25 -0800146 "sctputils.cc",
147 "sctputils.h",
Steve Anton97a9f762017-10-06 10:14:03 -0700148 "sdputils.cc",
149 "sdputils.h",
ossu7bb87ee2017-01-23 04:56:25 -0800150 "statscollector.cc",
151 "statscollector.h",
152 "streamcollection.h",
deadbeef804c1af2017-02-11 19:07:31 -0800153 "trackmediainfomap.cc",
154 "trackmediainfomap.h",
ossu7bb87ee2017-01-23 04:56:25 -0800155 "videocapturertracksource.cc",
156 "videocapturertracksource.h",
157 "videotrack.cc",
158 "videotrack.h",
159 "videotracksource.cc",
160 "videotracksource.h",
161 "webrtcsdp.cc",
162 "webrtcsdp.h",
ossu7bb87ee2017-01-23 04:56:25 -0800163 "webrtcsessiondescriptionfactory.cc",
164 "webrtcsessiondescriptionfactory.h",
165 ]
166
167 configs += [ ":libjingle_peerconnection_warnings_config" ]
168
169 if (!build_with_chromium && is_clang) {
170 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
171 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
172 }
173
174 deps = [
zhihuang38ede132017-06-15 12:52:32 -0700175 ":rtc_pc_base",
mbonadei7d9a55b2017-06-01 13:01:48 -0700176 "..:webrtc_common",
ossu7bb87ee2017-01-23 04:56:25 -0800177 "../api:call_api",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100178 "../api:libjingle_peerconnection_api",
kwiberg84f6a3f2017-09-05 08:43:13 -0700179 "../api:optional",
ossu7bb87ee2017-01-23 04:56:25 -0800180 "../api:rtc_stats_api",
ilnikd60d06a2017-04-05 03:02:20 -0700181 "../api/video_codecs:video_codecs_api",
zhihuang38ede132017-06-15 12:52:32 -0700182 "../call:call_interfaces",
mbonadei7d9a55b2017-06-01 13:01:48 -0700183 "../logging:rtc_event_log_api",
zhihuang38ede132017-06-15 12:52:32 -0700184 "../media:rtc_data",
185 "../media:rtc_media_base",
mbonadei7d9a55b2017-06-01 13:01:48 -0700186 "../p2p:rtc_p2p",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100187 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700188 "../rtc_base:rtc_base",
189 "../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100190 "../rtc_base:stringutils",
ossu7bb87ee2017-01-23 04:56:25 -0800191 "../stats",
Mirko Bonadeia498ae82017-12-06 09:17:14 +0100192 "../system_wrappers",
193 "../system_wrappers:field_trial_api",
ossu7bb87ee2017-01-23 04:56:25 -0800194 ]
zhihuang38ede132017-06-15 12:52:32 -0700195}
196
197# This target implements CreatePeerConnectionFactory methods that will create a
198# PeerConnection will full functionality (audio, video and data). Applications
199# that wish to reduce their binary size by ommitting functionality they don't
200# need should use CreateModularCreatePeerConnectionFactory instead, using the
201# "peerconnection" build target and other targets specific to their
202# requrements. See comment in peerconnectionfactoryinterface.h.
zhihuangab97e182017-06-22 01:28:59 -0700203rtc_static_library("create_pc_factory") {
zhihuang38ede132017-06-15 12:52:32 -0700204 sources = [
205 "createpeerconnectionfactory.cc",
206 ]
207
208 deps = [
209 "../api:audio_mixer_api",
210 "../api:libjingle_peerconnection_api",
Edward Lemur872cf382017-11-20 18:41:50 +0100211 "../api:peerconnection_and_implicit_call_api",
zhihuang38ede132017-06-15 12:52:32 -0700212 "../api/audio_codecs:audio_codecs_api",
Magnus Jedvert58b03162017-09-15 19:02:47 +0200213 "../api/video_codecs:video_codecs_api",
zhihuang38ede132017-06-15 12:52:32 -0700214 "../call",
215 "../call:call_interfaces",
216 "../logging:rtc_event_log_api",
217 "../media:rtc_audio_video",
Edward Lemur872cf382017-11-20 18:41:50 +0100218 "../media:rtc_media_base",
zhihuang38ede132017-06-15 12:52:32 -0700219 "../modules/audio_device:audio_device",
peaha9cc40b2017-06-29 08:32:09 -0700220 "../modules/audio_processing:audio_processing",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700221 "../rtc_base:rtc_base",
222 "../rtc_base:rtc_base_approved",
zhihuang38ede132017-06-15 12:52:32 -0700223 ]
224
225 configs += [ ":libjingle_peerconnection_warnings_config" ]
226
227 if (!build_with_chromium && is_clang) {
228 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
229 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
230 }
231}
232
233rtc_source_set("libjingle_peerconnection") {
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100234 deps = [
zhihuang38ede132017-06-15 12:52:32 -0700235 ":create_pc_factory",
236 ":peerconnection",
237 "../api:libjingle_peerconnection_api",
238 ]
ossu7bb87ee2017-01-23 04:56:25 -0800239}
240
kjellander142f8c52016-06-13 00:08:24 -0700241if (rtc_include_tests) {
242 config("rtc_pc_unittests_config") {
243 # GN orders flags on a target before flags from configs. The default config
244 # adds -Wall, and this flag have to be after -Wall -- so they need to
245 # come from a config and can't be on the target directly.
246 if (!is_win && !is_clang) {
247 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC.
248 }
249 }
250
ehmaldonado38a21322016-09-02 04:10:34 -0700251 rtc_test("rtc_pc_unittests") {
kjellander142f8c52016-06-13 00:08:24 -0700252 testonly = true
253
254 sources = [
255 "bundlefilter_unittest.cc",
256 "channel_unittest.cc",
257 "channelmanager_unittest.cc",
258 "currentspeakermonitor_unittest.cc",
Zhi Huangf2d7beb2017-11-20 14:35:11 -0800259 "dtlssrtptransport_unittest.cc",
kjellander142f8c52016-06-13 00:08:24 -0700260 "mediasession_unittest.cc",
261 "rtcpmuxfilter_unittest.cc",
zstein56162b92017-04-24 16:54:35 -0700262 "rtptransport_unittest.cc",
zstein398c3fd2017-07-19 13:38:02 -0700263 "rtptransporttestutil.h",
kjellander142f8c52016-06-13 00:08:24 -0700264 "srtpfilter_unittest.cc",
zstein4dde3df2017-07-07 14:26:25 -0700265 "srtpsession_unittest.cc",
266 "srtptestutil.h",
zstein398c3fd2017-07-19 13:38:02 -0700267 "srtptransport_unittest.cc",
Zhi Huangb5261582017-09-29 10:51:43 -0700268 "transportcontroller_unittest.cc",
kjellander142f8c52016-06-13 00:08:24 -0700269 ]
270
271 include_dirs = [ "//third_party/libsrtp/srtp" ]
272
ehmaldonado7a2ce0b2016-09-05 01:35:44 -0700273 configs += [ ":rtc_pc_unittests_config" ]
kjellander142f8c52016-06-13 00:08:24 -0700274
kjellandere40a7ee2016-10-16 23:56:12 -0700275 if (!build_with_chromium && is_clang) {
kjellander142f8c52016-06-13 00:08:24 -0700276 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700277 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander142f8c52016-06-13 00:08:24 -0700278 }
279
280 if (is_win) {
281 libs = [ "strmiids.lib" ]
282 }
283
284 deps = [
ossu7bb87ee2017-01-23 04:56:25 -0800285 ":libjingle_peerconnection",
Zhi Huangb5261582017-09-29 10:51:43 -0700286 ":pc_test_utils",
kjellander142f8c52016-06-13 00:08:24 -0700287 ":rtc_pc",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100288 ":rtc_pc_base",
kwiberg529662a2017-09-04 05:43:17 -0700289 "../api:array_view",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100290 "../api:libjingle_peerconnection_api",
mbonadei7d9a55b2017-06-01 13:01:48 -0700291 "../logging:rtc_event_log_api",
292 "../media:rtc_media_base",
mbonadei9087d492017-04-25 00:35:35 -0700293 "../media:rtc_media_tests_utils",
mbonadei7d9a55b2017-06-01 13:01:48 -0700294 "../p2p:p2p_test_utils",
295 "../p2p:rtc_p2p",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100296 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700297 "../rtc_base:rtc_base",
298 "../rtc_base:rtc_base_approved",
299 "../rtc_base:rtc_base_tests_main",
300 "../rtc_base:rtc_base_tests_utils",
kjellander142f8c52016-06-13 00:08:24 -0700301 "../system_wrappers:metrics_default",
zstein398c3fd2017-07-19 13:38:02 -0700302 "../test:test_support",
kjellander142f8c52016-06-13 00:08:24 -0700303 ]
304
305 if (rtc_build_libsrtp) {
306 deps += [ "//third_party/libsrtp" ]
307 }
308
309 if (is_android) {
310 deps += [ "//testing/android/native_test:native_test_support" ]
311 }
312 }
ossu7bb87ee2017-01-23 04:56:25 -0800313
deadbeefe814a0d2017-02-25 18:15:09 -0800314 rtc_source_set("pc_test_utils") {
315 testonly = true
316 sources = [
317 "test/fakeaudiocapturemodule.cc",
318 "test/fakeaudiocapturemodule.h",
319 "test/fakedatachannelprovider.h",
320 "test/fakeperiodicvideocapturer.h",
321 "test/fakertccertificategenerator.h",
Steve Antonda6c0952017-10-23 11:41:54 -0700322 "test/fakesctptransport.h",
Zhi Huangb5261582017-09-29 10:51:43 -0700323 "test/faketransportcontroller.h",
deadbeefe814a0d2017-02-25 18:15:09 -0800324 "test/fakevideotrackrenderer.h",
325 "test/fakevideotracksource.h",
326 "test/mock_datachannel.h",
327 "test/mock_peerconnection.h",
deadbeefe814a0d2017-02-25 18:15:09 -0800328 "test/mockpeerconnectionobservers.h",
329 "test/peerconnectiontestwrapper.cc",
330 "test/peerconnectiontestwrapper.h",
331 "test/rtcstatsobtainer.h",
332 "test/testsdpstrings.h",
333 ]
334
335 deps = [
336 ":libjingle_peerconnection",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100337 ":peerconnection",
Zhi Huangb5261582017-09-29 10:51:43 -0700338 ":rtc_pc_base",
mbonadei7d9a55b2017-06-01 13:01:48 -0700339 "..:webrtc_common",
340 "../api:libjingle_peerconnection_test_api",
Edward Lemur872cf382017-11-20 18:41:50 +0100341 "../api:peerconnection_and_implicit_call_api",
mbonadei7d9a55b2017-06-01 13:01:48 -0700342 "../api:rtc_stats_api",
zhihuang38ede132017-06-15 12:52:32 -0700343 "../call:call_interfaces",
344 "../logging:rtc_event_log_api",
mbonadei7d9a55b2017-06-01 13:01:48 -0700345 "../media:rtc_media",
Edward Lemur872cf382017-11-20 18:41:50 +0100346 "../media:rtc_media_base",
mbonadei7d9a55b2017-06-01 13:01:48 -0700347 "../media:rtc_media_tests_utils",
348 "../modules/audio_device:audio_device",
349 "../p2p:p2p_test_utils",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100350 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700351 "../rtc_base:rtc_base",
352 "../rtc_base:rtc_base_approved",
353 "../rtc_base:rtc_base_tests_utils",
mbonadei7d9a55b2017-06-01 13:01:48 -0700354 "../test:test_support",
deadbeefe814a0d2017-02-25 18:15:09 -0800355 "//testing/gmock",
356 ]
357
358 if (!build_with_chromium && is_clang) {
359 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
360 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
361 }
362 }
363
ossu7bb87ee2017-01-23 04:56:25 -0800364 config("peerconnection_unittests_config") {
365 # The warnings below are enabled by default. Since GN orders compiler flags
366 # for a target before flags from configs, the only way to disable such
367 # warnings is by having them in a separate config, loaded from the target.
368 # TODO(kjellander): Make the code compile without disabling these flags.
369 # See https://bugs.webrtc.org/3307.
370 if (is_clang && is_win) {
371 cflags = [
372 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6267
373 # for -Wno-sign-compare
374 "-Wno-sign-compare",
ossu7bb87ee2017-01-23 04:56:25 -0800375 ]
376 }
377
378 if (!is_win) {
379 cflags = [ "-Wno-sign-compare" ]
380 }
381 }
382
383 rtc_test("peerconnection_unittests") {
ossu7bb87ee2017-01-23 04:56:25 -0800384 testonly = true
385 sources = [
386 "datachannel_unittest.cc",
387 "dtmfsender_unittest.cc",
deadbeef1dcb1642017-03-29 21:08:16 -0700388 "iceserverparsing_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800389 "jsepsessiondescription_unittest.cc",
390 "localaudiosource_unittest.cc",
391 "mediaconstraintsinterface_unittest.cc",
392 "mediastream_unittest.cc",
Steve Anton6f25b092017-10-23 09:39:20 -0700393 "peerconnection_bundle_unittest.cc",
Steve Anton6b63cd52017-10-06 11:20:31 -0700394 "peerconnection_crypto_unittest.cc",
Steve Antonda6c0952017-10-23 11:41:54 -0700395 "peerconnection_datachannel_unittest.cc",
Steve Antonf1c6db12017-10-13 11:13:35 -0700396 "peerconnection_ice_unittest.cc",
deadbeef1dcb1642017-03-29 21:08:16 -0700397 "peerconnection_integrationtest.cc",
Steve Anton8d3444d2017-10-20 15:30:51 -0700398 "peerconnection_media_unittest.cc",
Henrik Boström933d8b02017-10-10 10:05:16 -0700399 "peerconnection_rtp_unittest.cc",
Steve Anton8d3444d2017-10-20 15:30:51 -0700400 "peerconnection_signaling_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800401 "peerconnectionendtoend_unittest.cc",
402 "peerconnectionfactory_unittest.cc",
403 "peerconnectioninterface_unittest.cc",
Steve Anton94286cb2017-09-26 16:20:19 -0700404 "peerconnectionwrapper.cc",
405 "peerconnectionwrapper.h",
ossu7bb87ee2017-01-23 04:56:25 -0800406 "proxy_unittest.cc",
407 "rtcstats_integrationtest.cc",
408 "rtcstatscollector_unittest.cc",
Steve Anton1d03a752017-11-27 14:30:09 -0800409 "rtpmediautils_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800410 "rtpsenderreceiver_unittest.cc",
411 "sctputils_unittest.cc",
412 "statscollector_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800413 "test/fakeaudiocapturemodule_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800414 "test/testsdpstrings.h",
deadbeef804c1af2017-02-11 19:07:31 -0800415 "trackmediainfomap_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800416 "videocapturertracksource_unittest.cc",
417 "videotrack_unittest.cc",
418 "webrtcsdp_unittest.cc",
ossu7bb87ee2017-01-23 04:56:25 -0800419 ]
420
421 if (rtc_enable_sctp) {
422 defines = [ "HAVE_SCTP" ]
423 }
424
425 configs += [ ":peerconnection_unittests_config" ]
426
427 if (!build_with_chromium && is_clang) {
428 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
429 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
430 }
431
432 # TODO(jschuh): Bug 1348: fix this warning.
433 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
434
435 if (is_win) {
436 cflags = [
437 "/wd4245", # conversion from int to size_t, signed/unsigned mismatch.
438 "/wd4389", # signed/unsigned mismatch.
439 ]
440 }
441
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100442 deps = [
443 ":peerconnection",
444 ":rtc_pc_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100445 "../rtc_base:checks",
Patrik Höglund3e113432017-12-15 14:40:10 +0100446 "../rtc_base:stringutils",
Mirko Bonadeie51f7852017-12-06 11:23:19 +0100447 ]
ossu7bb87ee2017-01-23 04:56:25 -0800448 if (is_android) {
Patrik Höglund563934e2017-09-15 09:04:28 +0200449 deps += [ ":android_black_magic" ]
ossu7bb87ee2017-01-23 04:56:25 -0800450 }
451
452 deps += [
453 ":libjingle_peerconnection",
deadbeefe814a0d2017-02-25 18:15:09 -0800454 ":pc_test_utils",
ossu7bb87ee2017-01-23 04:56:25 -0800455 "..:webrtc_common",
456 "../api:fakemetricsobserver",
Patrik Höglund563934e2017-09-15 09:04:28 +0200457 "../api:libjingle_peerconnection_test_api",
Henrik Boström31638672017-11-23 17:48:32 +0100458 "../api:optional",
Patrik Höglund563934e2017-09-15 09:04:28 +0200459 "../api:rtc_stats_api",
Karl Wibergc5bb00b2017-10-10 23:17:17 +0200460 "../api/audio_codecs:audio_codecs_api",
Patrik Höglund563934e2017-09-15 09:04:28 +0200461 "../api/audio_codecs:builtin_audio_decoder_factory",
462 "../api/audio_codecs:builtin_audio_encoder_factory",
Karl Wibergc5bb00b2017-10-10 23:17:17 +0200463 "../api/audio_codecs/L16:audio_decoder_L16",
464 "../api/audio_codecs/L16:audio_encoder_L16",
Steve Anton8d3444d2017-10-20 15:30:51 -0700465 "../call:call_interfaces",
Elad Alon99c3fe52017-10-13 16:29:40 +0200466 "../logging:rtc_event_log_api",
Steve Anton8d3444d2017-10-20 15:30:51 -0700467 "../logging:rtc_event_log_impl",
Patrik Höglund563934e2017-09-15 09:04:28 +0200468 "../media:rtc_audio_video",
469 "../media:rtc_data", # TODO(phoglund): AFAIK only used for one sctp constant.
470 "../media:rtc_media_base",
mbonadei9087d492017-04-25 00:35:35 -0700471 "../media:rtc_media_tests_utils",
Patrik Höglund563934e2017-09-15 09:04:28 +0200472 "../modules/audio_processing:audio_processing",
473 "../modules/utility:utility",
474 "../p2p:p2p_test_utils",
475 "../p2p:rtc_p2p",
ossu7bb87ee2017-01-23 04:56:25 -0800476 "../pc:rtc_pc",
Henrik Boström933d8b02017-10-10 10:05:16 -0700477 "../rtc_base:rtc_base",
Patrik Höglund563934e2017-09-15 09:04:28 +0200478 "../rtc_base:rtc_base_approved",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700479 "../rtc_base:rtc_base_tests_main",
480 "../rtc_base:rtc_base_tests_utils",
ossu7bb87ee2017-01-23 04:56:25 -0800481 "../system_wrappers:metrics_default",
kwiberg2b3aa142017-06-14 03:31:17 -0700482 "../test:audio_codec_mocks",
Patrik Höglund563934e2017-09-15 09:04:28 +0200483 "../test:test_support",
ossu7bb87ee2017-01-23 04:56:25 -0800484 ]
485
486 if (is_android) {
Patrik Höglund563934e2017-09-15 09:04:28 +0200487 deps += [
488 "//testing/android/native_test:native_test_support",
489
490 # We need to depend on this one directly, or classloads will fail for
491 # the voice engine BuildInfo, for instance.
492 "../sdk/android:libjingle_peerconnection_java",
493 ]
ossu7bb87ee2017-01-23 04:56:25 -0800494
495 shard_timeout = 900
496 }
497 }
Patrik Höglund563934e2017-09-15 09:04:28 +0200498
499 if (is_android) {
500 rtc_source_set("android_black_magic") {
501 # The android code uses hacky includes to chromium-base and the ssl code;
502 # having this in a separate target enables us to keep the peerconnection
503 # unit tests clean.
504 check_includes = false
505 testonly = true
506 sources = [
507 "test/androidtestinitializer.cc",
508 "test/androidtestinitializer.h",
509 ]
510 deps = [
511 "../sdk/android:libjingle_peerconnection_jni",
512 "//testing/android/native_test:native_test_support",
513 ]
514 }
515 }
kjellander142f8c52016-06-13 00:08:24 -0700516}