1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/crypto.gni")
6 import("//build/config/features.gni")
8 # From third_party/libjingle/libjingle.gyp's target_defaults.
9 config("jingle_unexported_configs") {
11 "EXPAT_RELATIVE_PATH",
13 "GTEST_RELATIVE_PATH",
17 "LOGGING_INSIDE_WEBRTC",
18 "NO_MAIN_THREAD_WRAPPING",
21 "USE_WEBRTC_DEV_BRANCH",
22 "ENABLE_EXTERNAL_AUTH",
23 "WEBRTC_CHROMIUM_BUILD",
28 "../../third_party/webrtc/overrides",
30 "../../testing/gtest/include",
32 "../../third_party/libyuv/include",
33 "../../third_party/usrsctp",
36 # Assumes libpeer is linked statically.
37 defines += [ "LIBPEERCONNECTION_LIB=1" ]
39 if (is_win && cpu_arch == "x86") {
40 defines += [ "_USE_32BIT_TIME_T" ]
58 # From third_party/libjingle/libjingle.gyp's target_defaults.
59 config("jingle_direct_dependent_configs") {
61 "../../third_party/webrtc/overrides",
64 "../../testing/gtest/include",
69 "FEATURE_ENABLE_VOICEMAIL",
70 "EXPAT_RELATIVE_PATH",
71 "GTEST_RELATIVE_PATH",
72 "NO_MAIN_THREAD_WRAPPING",
75 # TODO(GYP): Port is_win blocks.
77 defines += [ "LINUX", "WEBRTC_LINUX" ]
80 defines += [ "OSX", "WEBRTC_MAC" ]
83 defines += [ "IOS", "WEBRTC_MAC", "WEBRTC_IOS" ]
86 defines += [ "WEBRTC_WIN" ]
89 defines += [ "ANDROID" ]
92 defines += [ "POSIX", "WEBRTC_POSIX" ]
94 # TODO(GYP): Support these in GN.
96 # defines += [ "BSD" ]
99 # defines += [ "OPENBSD" ]
102 # defines += [ "FREEBSD" ]
105 defines += [ "CHROMEOS" ]
109 # From third_party/libjingle/libjingle.gyp's target_defaults.
110 config("jingle_all_dependent_configs") {
112 # TODO(sergeyu): Fix libjingle to use NDEBUG instead of
113 # _DEBUG and remove this define. See GYP file as well.
114 defines = [ "_DEBUG" ]
118 # From third_party/libjingle/libjingle.gyp's target_defaults.
119 group("jingle_deps") {
123 "//third_party/expat",
126 forward_dependent_configs_from = [
127 "//third_party/expat",
131 # GYP version: third_party/libjingle.gyp:libjingle
132 static_library("libjingle") {
134 # List from third_party/libjingle/libjingle_common.gypi
135 "source/talk/p2p/base/asyncstuntcpsocket.cc",
136 "source/talk/p2p/base/asyncstuntcpsocket.h",
137 "source/talk/p2p/base/basicpacketsocketfactory.cc",
138 "source/talk/p2p/base/basicpacketsocketfactory.h",
139 "source/talk/p2p/base/candidate.h",
140 "source/talk/p2p/base/common.h",
141 "source/talk/p2p/base/constants.cc",
142 "source/talk/p2p/base/constants.h",
143 "source/talk/p2p/base/dtlstransport.h",
144 "source/talk/p2p/base/dtlstransportchannel.cc",
145 "source/talk/p2p/base/dtlstransportchannel.h",
146 "source/talk/p2p/base/p2ptransport.cc",
147 "source/talk/p2p/base/p2ptransport.h",
148 "source/talk/p2p/base/p2ptransportchannel.cc",
149 "source/talk/p2p/base/p2ptransportchannel.h",
150 "source/talk/p2p/base/parsing.cc",
151 "source/talk/p2p/base/parsing.h",
152 "source/talk/p2p/base/port.cc",
153 "source/talk/p2p/base/port.h",
154 "source/talk/p2p/base/portallocator.cc",
155 "source/talk/p2p/base/portallocator.h",
156 "source/talk/p2p/base/portallocatorsessionproxy.cc",
157 "source/talk/p2p/base/portallocatorsessionproxy.h",
158 "source/talk/p2p/base/portproxy.cc",
159 "source/talk/p2p/base/portproxy.h",
160 "source/talk/p2p/base/pseudotcp.cc",
161 "source/talk/p2p/base/pseudotcp.h",
162 "source/talk/p2p/base/rawtransport.cc",
163 "source/talk/p2p/base/rawtransport.h",
164 "source/talk/p2p/base/rawtransportchannel.cc",
165 "source/talk/p2p/base/rawtransportchannel.h",
166 "source/talk/p2p/base/relayport.cc",
167 "source/talk/p2p/base/relayport.h",
168 "source/talk/p2p/base/session.cc",
169 "source/talk/p2p/base/session.h",
170 "source/talk/p2p/base/sessionclient.h",
171 "source/talk/p2p/base/sessiondescription.cc",
172 "source/talk/p2p/base/sessiondescription.h",
173 "source/talk/p2p/base/sessionid.h",
174 "source/talk/p2p/base/sessionmanager.cc",
175 "source/talk/p2p/base/sessionmanager.h",
176 "source/talk/p2p/base/sessionmessages.cc",
177 "source/talk/p2p/base/sessionmessages.h",
178 "source/talk/p2p/base/stun.cc",
179 "source/talk/p2p/base/stun.h",
180 "source/talk/p2p/base/stunport.cc",
181 "source/talk/p2p/base/stunport.h",
182 "source/talk/p2p/base/stunrequest.cc",
183 "source/talk/p2p/base/stunrequest.h",
184 "source/talk/p2p/base/tcpport.cc",
185 "source/talk/p2p/base/tcpport.h",
186 "source/talk/p2p/base/transport.cc",
187 "source/talk/p2p/base/transport.h",
188 "source/talk/p2p/base/transportchannel.cc",
189 "source/talk/p2p/base/transportchannel.h",
190 "source/talk/p2p/base/transportchannelimpl.h",
191 "source/talk/p2p/base/transportchannelproxy.cc",
192 "source/talk/p2p/base/transportchannelproxy.h",
193 "source/talk/p2p/base/transportdescription.cc",
194 "source/talk/p2p/base/transportdescription.h",
195 "source/talk/p2p/base/transportdescriptionfactory.cc",
196 "source/talk/p2p/base/transportdescriptionfactory.h",
197 "source/talk/p2p/base/turnport.cc",
198 "source/talk/p2p/base/turnport.h",
199 "source/talk/p2p/client/basicportallocator.cc",
200 "source/talk/p2p/client/basicportallocator.h",
201 "source/talk/p2p/client/httpportallocator.cc",
202 "source/talk/p2p/client/httpportallocator.h",
203 "source/talk/p2p/client/sessionmanagertask.h",
204 "source/talk/p2p/client/sessionsendtask.h",
205 "source/talk/p2p/client/socketmonitor.cc",
206 "source/talk/p2p/client/socketmonitor.h",
207 "source/talk/xmllite/qname.cc",
208 "source/talk/xmllite/qname.h",
209 "source/talk/xmllite/xmlbuilder.cc",
210 "source/talk/xmllite/xmlbuilder.h",
211 "source/talk/xmllite/xmlconstants.cc",
212 "source/talk/xmllite/xmlconstants.h",
213 "source/talk/xmllite/xmlelement.cc",
214 "source/talk/xmllite/xmlelement.h",
215 "source/talk/xmllite/xmlnsstack.cc",
216 "source/talk/xmllite/xmlnsstack.h",
217 "source/talk/xmllite/xmlparser.cc",
218 "source/talk/xmllite/xmlparser.h",
219 "source/talk/xmllite/xmlprinter.cc",
220 "source/talk/xmllite/xmlprinter.h",
221 "source/talk/xmpp/asyncsocket.h",
222 "source/talk/xmpp/constants.cc",
223 "source/talk/xmpp/constants.h",
224 "source/talk/xmpp/jid.cc",
225 "source/talk/xmpp/jid.h",
226 "source/talk/xmpp/plainsaslhandler.h",
227 "source/talk/xmpp/prexmppauth.h",
228 "source/talk/xmpp/saslcookiemechanism.h",
229 "source/talk/xmpp/saslhandler.h",
230 "source/talk/xmpp/saslmechanism.cc",
231 "source/talk/xmpp/saslmechanism.h",
232 "source/talk/xmpp/saslplainmechanism.h",
233 "source/talk/xmpp/xmppclient.cc",
234 "source/talk/xmpp/xmppclient.h",
235 "source/talk/xmpp/xmppclientsettings.h",
236 "source/talk/xmpp/xmppengine.h",
237 "source/talk/xmpp/xmppengineimpl.cc",
238 "source/talk/xmpp/xmppengineimpl.h",
239 "source/talk/xmpp/xmppengineimpl_iq.cc",
240 "source/talk/xmpp/xmpplogintask.cc",
241 "source/talk/xmpp/xmpplogintask.h",
242 "source/talk/xmpp/xmppstanzaparser.cc",
243 "source/talk/xmpp/xmppstanzaparser.h",
244 "source/talk/xmpp/xmpptask.cc",
245 "source/talk/xmpp/xmpptask.h",
248 # Compiled as part of libjingle_p2p_constants.
249 "source/talk/p2p/base/constants.cc",
250 "source/talk/p2p/base/constants.h",
253 "//third_party/webrtc/base:webrtc_base",
254 ":libjingle_p2p_constants",
258 # From libjingle_common.gypi's conditions list.
260 cflags = [ "/wd4005", "/wd4267" ]
263 forward_dependent_configs_from = [
267 ":jingle_unexported_configs"
269 direct_dependent_configs = [
270 ":jingle_direct_dependent_configs",
272 all_dependent_configs = [
273 ":jingle_all_dependent_configs",
277 # This has to be is a separate project due to a bug in MSVS 2008 and the
278 # current toolset on android. The problem is that we have two files named
279 # "constants.cc" and MSVS/android doesn't handle this properly.
280 # GYP currently has guards to catch this, so if you want to remove it,
281 # run GYP and if GYP has removed the validation check, then we can assume
282 # that the toolchains have been fixed (we currently use VS2010 and later,
283 # so VS2008 isn't a concern anymore).
285 # GYP version: third_party/libjingle.gyp:libjingle_p2p_constants
286 static_library("libjingle_p2p_constants") {
288 "source/talk/p2p/base/constants.cc",
289 "source/talk/p2p/base/constants.h",
294 forward_dependent_configs_from = [
298 ":jingle_unexported_configs"
300 direct_dependent_configs = [
301 ":jingle_direct_dependent_configs",
303 all_dependent_configs = [
304 ":jingle_all_dependent_configs",
308 # GYP version: third_party/libjingle.gyp:peerconnnection_server
309 #TODO(GYP): Switch to executable when WebRTC dependency is resolved.
310 source_set("peerconnnection_server") {
312 "source/talk/examples/peerconnection/server/data_socket.cc",
313 "source/talk/examples/peerconnection/server/data_socket.h",
314 "source/talk/examples/peerconnection/server/main.cc",
315 "source/talk/examples/peerconnection/server/peer_channel.cc",
316 "source/talk/examples/peerconnection/server/peer_channel.h",
317 "source/talk/examples/peerconnection/server/utils.cc",
318 "source/talk/examples/peerconnection/server/utils.h",
327 forward_dependent_configs_from = [
331 ":jingle_unexported_configs"
333 direct_dependent_configs = [
334 ":jingle_direct_dependent_configs",
336 all_dependent_configs = [
337 ":jingle_all_dependent_configs",
340 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
341 cflags = [ "/wd4309" ]
347 source_set("libjingle_webrtc") {
349 "overrides/init_webrtc.cc",
350 "overrides/init_webrtc.h",
352 deps = [ ":libjingle_webrtc_common" ]
355 # Note: this does not support the shared library build of libpeerconnection
356 # as is supported in the GYP build. It's not clear what this is used for.
357 source_set("libjingle_webrtc_common") {
359 "overrides/talk/media/webrtc/webrtcexport.h",
361 "source/talk/app/webrtc/audiotrack.cc",
362 "source/talk/app/webrtc/audiotrack.h",
363 "source/talk/app/webrtc/audiotrackrenderer.cc",
364 "source/talk/app/webrtc/audiotrackrenderer.h",
365 "source/talk/app/webrtc/datachannel.cc",
366 "source/talk/app/webrtc/datachannel.h",
367 "source/talk/app/webrtc/dtmfsender.cc",
368 "source/talk/app/webrtc/dtmfsender.h",
369 "source/talk/app/webrtc/jsep.h",
370 "source/talk/app/webrtc/jsepicecandidate.cc",
371 "source/talk/app/webrtc/jsepicecandidate.h",
372 "source/talk/app/webrtc/jsepsessiondescription.cc",
373 "source/talk/app/webrtc/jsepsessiondescription.h",
374 "source/talk/app/webrtc/localaudiosource.cc",
375 "source/talk/app/webrtc/localaudiosource.h",
376 "source/talk/app/webrtc/mediaconstraintsinterface.cc",
377 "source/talk/app/webrtc/mediaconstraintsinterface.h",
378 "source/talk/app/webrtc/mediastream.cc",
379 "source/talk/app/webrtc/mediastream.h",
380 "source/talk/app/webrtc/mediastreamhandler.cc",
381 "source/talk/app/webrtc/mediastreamhandler.h",
382 "source/talk/app/webrtc/mediastreaminterface.h",
383 "source/talk/app/webrtc/mediastreamprovider.h",
384 "source/talk/app/webrtc/mediastreamproxy.h",
385 "source/talk/app/webrtc/mediastreamsignaling.cc",
386 "source/talk/app/webrtc/mediastreamsignaling.h",
387 "source/talk/app/webrtc/mediastreamtrack.h",
388 "source/talk/app/webrtc/mediastreamtrackproxy.h",
389 "source/talk/app/webrtc/notifier.h",
390 "source/talk/app/webrtc/peerconnection.cc",
391 "source/talk/app/webrtc/peerconnection.h",
392 "source/talk/app/webrtc/peerconnectionfactory.cc",
393 "source/talk/app/webrtc/peerconnectionfactory.h",
394 "source/talk/app/webrtc/peerconnectioninterface.h",
395 "source/talk/app/webrtc/portallocatorfactory.cc",
396 "source/talk/app/webrtc/portallocatorfactory.h",
397 "source/talk/app/webrtc/remoteaudiosource.cc",
398 "source/talk/app/webrtc/remoteaudiosource.h",
399 "source/talk/app/webrtc/remotevideocapturer.cc",
400 "source/talk/app/webrtc/remotevideocapturer.h",
401 "source/talk/app/webrtc/sctputils.cc",
402 "source/talk/app/webrtc/sctputils.h",
403 "source/talk/app/webrtc/statscollector.cc",
404 "source/talk/app/webrtc/statscollector.h",
405 "source/talk/app/webrtc/statstypes.h",
406 "source/talk/app/webrtc/streamcollection.h",
407 "source/talk/app/webrtc/umametrics.h",
408 "source/talk/app/webrtc/videosource.cc",
409 "source/talk/app/webrtc/videosource.h",
410 "source/talk/app/webrtc/videosourceinterface.h",
411 "source/talk/app/webrtc/videosourceproxy.h",
412 "source/talk/app/webrtc/videotrack.cc",
413 "source/talk/app/webrtc/videotrack.h",
414 "source/talk/app/webrtc/videotrackrenderers.cc",
415 "source/talk/app/webrtc/videotrackrenderers.h",
416 "source/talk/app/webrtc/webrtcsdp.cc",
417 "source/talk/app/webrtc/webrtcsdp.h",
418 "source/talk/app/webrtc/webrtcsession.cc",
419 "source/talk/app/webrtc/webrtcsession.h",
420 "source/talk/app/webrtc/webrtcsessiondescriptionfactory.cc",
421 "source/talk/app/webrtc/webrtcsessiondescriptionfactory.h",
422 "source/talk/media/base/audiorenderer.h",
423 "source/talk/media/base/capturemanager.cc",
424 "source/talk/media/base/capturemanager.h",
425 "source/talk/media/base/capturerenderadapter.cc",
426 "source/talk/media/base/capturerenderadapter.h",
427 "source/talk/media/base/codec.cc",
428 "source/talk/media/base/codec.h",
429 "source/talk/media/base/constants.cc",
430 "source/talk/media/base/constants.h",
431 "source/talk/media/base/cryptoparams.h",
432 "source/talk/media/base/filemediaengine.cc",
433 "source/talk/media/base/filemediaengine.h",
434 "source/talk/media/base/hybriddataengine.h",
435 "source/talk/media/base/mediachannel.h",
436 "source/talk/media/base/mediaengine.cc",
437 "source/talk/media/base/mediaengine.h",
438 "source/talk/media/base/rtpdataengine.cc",
439 "source/talk/media/base/rtpdataengine.h",
440 "source/talk/media/base/rtpdump.cc",
441 "source/talk/media/base/rtpdump.h",
442 "source/talk/media/base/rtputils.cc",
443 "source/talk/media/base/rtputils.h",
444 "source/talk/media/base/streamparams.cc",
445 "source/talk/media/base/streamparams.h",
446 "source/talk/media/base/videoadapter.cc",
447 "source/talk/media/base/videoadapter.h",
448 "source/talk/media/base/videocapturer.cc",
449 "source/talk/media/base/videocapturer.h",
450 "source/talk/media/base/videocommon.cc",
451 "source/talk/media/base/videocommon.h",
452 "source/talk/media/base/videoframe.cc",
453 "source/talk/media/base/videoframe.h",
454 "source/talk/media/devices/dummydevicemanager.cc",
455 "source/talk/media/devices/dummydevicemanager.h",
456 "source/talk/media/devices/filevideocapturer.cc",
457 "source/talk/media/devices/filevideocapturer.h",
458 "source/talk/media/webrtc/webrtccommon.h",
459 "source/talk/media/webrtc/webrtcpassthroughrender.cc",
460 "source/talk/media/webrtc/webrtcpassthroughrender.h",
461 "source/talk/media/webrtc/webrtctexturevideoframe.cc",
462 "source/talk/media/webrtc/webrtctexturevideoframe.h",
463 "source/talk/media/webrtc/webrtcvideocapturer.cc",
464 "source/talk/media/webrtc/webrtcvideocapturer.h",
465 "source/talk/media/webrtc/webrtcvideoframe.cc",
466 "source/talk/media/webrtc/webrtcvideoframe.h",
467 "source/talk/media/webrtc/webrtcvideoframefactory.cc",
468 "source/talk/media/webrtc/webrtcvideoframefactory.h",
469 "source/talk/media/webrtc/webrtcvie.h",
470 "source/talk/media/webrtc/webrtcvoe.h",
471 "source/talk/session/media/audiomonitor.cc",
472 "source/talk/session/media/audiomonitor.h",
473 "source/talk/session/media/bundlefilter.cc",
474 "source/talk/session/media/bundlefilter.h",
475 "source/talk/session/media/call.cc",
476 "source/talk/session/media/call.h",
477 "source/talk/session/media/channel.cc",
478 "source/talk/session/media/channel.h",
479 "source/talk/session/media/channelmanager.cc",
480 "source/talk/session/media/channelmanager.h",
481 "source/talk/session/media/currentspeakermonitor.cc",
482 "source/talk/session/media/currentspeakermonitor.h",
483 "source/talk/session/media/externalhmac.cc",
484 "source/talk/session/media/externalhmac.h",
485 "source/talk/session/media/mediamessages.cc",
486 "source/talk/session/media/mediamessages.h",
487 "source/talk/session/media/mediamonitor.cc",
488 "source/talk/session/media/mediamonitor.h",
489 "source/talk/session/media/mediasession.cc",
490 "source/talk/session/media/mediasession.h",
491 "source/talk/session/media/mediasessionclient.cc",
492 "source/talk/session/media/mediasessionclient.h",
493 "source/talk/session/media/mediasink.h",
494 "source/talk/session/media/rtcpmuxfilter.cc",
495 "source/talk/session/media/rtcpmuxfilter.h",
496 "source/talk/session/media/soundclip.cc",
497 "source/talk/session/media/soundclip.h",
498 "source/talk/session/media/srtpfilter.cc",
499 "source/talk/session/media/srtpfilter.h",
500 "source/talk/session/media/typingmonitor.cc",
501 "source/talk/session/media/typingmonitor.h",
502 "source/talk/session/media/voicechannel.h",
503 "source/talk/session/tunnel/pseudotcpchannel.cc",
504 "source/talk/session/tunnel/pseudotcpchannel.h",
505 "source/talk/session/tunnel/tunnelsessionclient.cc",
506 "source/talk/session/tunnel/tunnelsessionclient.h",
509 configs += [ ":jingle_unexported_configs" ]
510 direct_dependent_configs = [ ":jingle_direct_dependent_configs" ]
513 "//third_party/libsrtp",
514 "//third_party/webrtc/modules/media_file",
515 "//third_party/webrtc/modules/video_capture",
516 "//third_party/webrtc/modules/video_render",
520 # TODO(mallinath) - Enable SCTP for iOS.
522 "source/talk/media/sctp/sctpdataengine.cc",
523 "source/talk/media/sctp/sctpdataengine.h",
525 defines = [ "HAVE_SCTP" ]
526 deps += [ "//third_party/usrsctp" ]
530 cflags = [ "-Wno-unused-private-field" ]
534 # Note: this does not support the shared library build of libpeerconnection
535 # as is supported in the GYP build. It's not clear what this is used for.
536 source_set("libpeerconnection") {
538 "source/talk/media/webrtc/webrtcmediaengine.cc",
539 "source/talk/media/webrtc/webrtcmediaengine.h",
540 "source/talk/media/webrtc/webrtcvideoengine.cc",
541 "source/talk/media/webrtc/webrtcvideoengine.h",
542 "source/talk/media/webrtc/webrtcvideoengine2.cc",
543 "source/talk/media/webrtc/webrtcvideoengine2.h",
544 "source/talk/media/webrtc/webrtcvoiceengine.cc",
545 "source/talk/media/webrtc/webrtcvoiceengine.h",
548 configs += [ ":jingle_unexported_configs" ]
549 direct_dependent_configs = [ ":jingle_direct_dependent_configs" ]
552 ":libjingle_webrtc_common",
553 "//third_party/webrtc",
554 "//third_party/webrtc/system_wrappers",
555 "//third_party/webrtc/voice_engine",
561 # TODO(GYP): Port libjingle.gyp's enable_webrtc condition block.