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 && current_cpu == "x86") {
40 defines += [ "_USE_32BIT_TIME_T" ]
57 # From third_party/libjingle/libjingle.gyp's target_defaults.
58 config("jingle_direct_dependent_configs") {
60 "../../third_party/webrtc/overrides",
63 "../../testing/gtest/include",
68 "FEATURE_ENABLE_VOICEMAIL",
69 "EXPAT_RELATIVE_PATH",
70 "GTEST_RELATIVE_PATH",
71 "NO_MAIN_THREAD_WRAPPING",
75 # TODO(GYP): Port is_win blocks.
96 defines += [ "WEBRTC_WIN" ]
99 defines += [ "ANDROID" ]
108 # TODO(GYP): Support these in GN.
110 # defines += [ "BSD" ]
113 # defines += [ "OPENBSD" ]
116 # defines += [ "FREEBSD" ]
119 defines += [ "CHROMEOS" ]
123 # From third_party/libjingle/libjingle.gyp's target_defaults.
124 config("jingle_all_dependent_configs") {
126 # TODO(sergeyu): Fix libjingle to use NDEBUG instead of
127 # _DEBUG and remove this define. See GYP file as well.
128 defines = [ "_DEBUG" ]
132 # From third_party/libjingle/libjingle.gyp's target_defaults.
133 group("jingle_deps") {
135 "//third_party/expat",
144 # GYP version: third_party/libjingle.gyp:libjingle
145 static_library("libjingle") {
146 p2p_dir = "../webrtc/p2p"
147 xmllite_dir = "../webrtc/libjingle/xmllite"
148 xmpp_dir = "../webrtc/libjingle/xmpp"
150 # List from third_party/libjingle/libjingle_common.gypi
151 "$p2p_dir/base/asyncstuntcpsocket.cc",
152 "$p2p_dir/base/asyncstuntcpsocket.h",
153 "$p2p_dir/base/basicpacketsocketfactory.cc",
154 "$p2p_dir/base/basicpacketsocketfactory.h",
155 "$p2p_dir/base/candidate.h",
156 "$p2p_dir/base/common.h",
157 "$p2p_dir/base/constants.cc",
158 "$p2p_dir/base/constants.h",
159 "$p2p_dir/base/dtlstransport.h",
160 "$p2p_dir/base/dtlstransportchannel.cc",
161 "$p2p_dir/base/dtlstransportchannel.h",
162 "$p2p_dir/base/p2ptransport.cc",
163 "$p2p_dir/base/p2ptransport.h",
164 "$p2p_dir/base/p2ptransportchannel.cc",
165 "$p2p_dir/base/p2ptransportchannel.h",
166 "$p2p_dir/base/port.cc",
167 "$p2p_dir/base/port.h",
168 "$p2p_dir/base/portallocator.cc",
169 "$p2p_dir/base/portallocator.h",
170 "$p2p_dir/base/portallocatorsessionproxy.cc",
171 "$p2p_dir/base/portallocatorsessionproxy.h",
172 "$p2p_dir/base/portproxy.cc",
173 "$p2p_dir/base/portproxy.h",
174 "$p2p_dir/base/pseudotcp.cc",
175 "$p2p_dir/base/pseudotcp.h",
176 "$p2p_dir/base/rawtransport.cc",
177 "$p2p_dir/base/rawtransport.h",
178 "$p2p_dir/base/rawtransportchannel.cc",
179 "$p2p_dir/base/rawtransportchannel.h",
180 "$p2p_dir/base/relayport.cc",
181 "$p2p_dir/base/relayport.h",
182 "$p2p_dir/base/session.cc",
183 "$p2p_dir/base/session.h",
184 "$p2p_dir/base/sessiondescription.cc",
185 "$p2p_dir/base/sessiondescription.h",
186 "$p2p_dir/base/sessionid.h",
187 "$p2p_dir/base/stun.cc",
188 "$p2p_dir/base/stun.h",
189 "$p2p_dir/base/stunport.cc",
190 "$p2p_dir/base/stunport.h",
191 "$p2p_dir/base/stunrequest.cc",
192 "$p2p_dir/base/stunrequest.h",
193 "$p2p_dir/base/tcpport.cc",
194 "$p2p_dir/base/tcpport.h",
195 "$p2p_dir/base/transport.cc",
196 "$p2p_dir/base/transport.h",
197 "$p2p_dir/base/transportchannel.cc",
198 "$p2p_dir/base/transportchannel.h",
199 "$p2p_dir/base/transportchannelimpl.h",
200 "$p2p_dir/base/transportchannelproxy.cc",
201 "$p2p_dir/base/transportchannelproxy.h",
202 "$p2p_dir/base/transportdescription.cc",
203 "$p2p_dir/base/transportdescription.h",
204 "$p2p_dir/base/transportdescriptionfactory.cc",
205 "$p2p_dir/base/transportdescriptionfactory.h",
206 "$p2p_dir/base/turnport.cc",
207 "$p2p_dir/base/turnport.h",
208 "$p2p_dir/client/basicportallocator.cc",
209 "$p2p_dir/client/basicportallocator.h",
210 "$p2p_dir/client/httpportallocator.cc",
211 "$p2p_dir/client/httpportallocator.h",
212 "$p2p_dir/client/socketmonitor.cc",
213 "$p2p_dir/client/socketmonitor.h",
214 "$xmllite_dir/qname.cc",
215 "$xmllite_dir/qname.h",
216 "$xmllite_dir/xmlbuilder.cc",
217 "$xmllite_dir/xmlbuilder.h",
218 "$xmllite_dir/xmlconstants.cc",
219 "$xmllite_dir/xmlconstants.h",
220 "$xmllite_dir/xmlelement.cc",
221 "$xmllite_dir/xmlelement.h",
222 "$xmllite_dir/xmlnsstack.cc",
223 "$xmllite_dir/xmlnsstack.h",
224 "$xmllite_dir/xmlparser.cc",
225 "$xmllite_dir/xmlparser.h",
226 "$xmllite_dir/xmlprinter.cc",
227 "$xmllite_dir/xmlprinter.h",
228 "$xmpp_dir/asyncsocket.h",
229 "$xmpp_dir/constants.cc",
230 "$xmpp_dir/constants.h",
233 "$xmpp_dir/plainsaslhandler.h",
234 "$xmpp_dir/prexmppauth.h",
235 "$xmpp_dir/saslcookiemechanism.h",
236 "$xmpp_dir/saslhandler.h",
237 "$xmpp_dir/saslmechanism.cc",
238 "$xmpp_dir/saslmechanism.h",
239 "$xmpp_dir/saslplainmechanism.h",
240 "$xmpp_dir/xmppclient.cc",
241 "$xmpp_dir/xmppclient.h",
242 "$xmpp_dir/xmppclientsettings.h",
243 "$xmpp_dir/xmppengine.h",
244 "$xmpp_dir/xmppengineimpl.cc",
245 "$xmpp_dir/xmppengineimpl.h",
246 "$xmpp_dir/xmppengineimpl_iq.cc",
247 "$xmpp_dir/xmpplogintask.cc",
248 "$xmpp_dir/xmpplogintask.h",
249 "$xmpp_dir/xmppstanzaparser.cc",
250 "$xmpp_dir/xmppstanzaparser.h",
251 "$xmpp_dir/xmpptask.cc",
252 "$xmpp_dir/xmpptask.h",
255 # Compiled as part of libjingle_p2p_constants.
256 "$p2p_dir/base/constants.cc",
257 "$p2p_dir/base/constants.h",
260 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
261 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
267 "//third_party/webrtc/base:rtc_base",
268 ":libjingle_p2p_constants",
271 # From libjingle_common.gypi's conditions list.
273 cflags = [ "/wd4005" ]
276 configs += [ ":jingle_unexported_configs" ]
277 public_configs = [ ":jingle_direct_dependent_configs" ]
278 all_dependent_configs = [ ":jingle_all_dependent_configs" ]
281 # This has to be is a separate project due to a bug in MSVS 2008 and the
282 # current toolset on android. The problem is that we have two files named
283 # "constants.cc" and MSVS/android doesn't handle this properly.
284 # GYP currently has guards to catch this, so if you want to remove it,
285 # run GYP and if GYP has removed the validation check, then we can assume
286 # that the toolchains have been fixed (we currently use VS2010 and later,
287 # so VS2008 isn't a concern anymore).
289 # GYP version: third_party/libjingle.gyp:libjingle_p2p_constants
290 static_library("libjingle_p2p_constants") {
291 p2p_dir = "../webrtc/p2p"
293 "$p2p_dir/base/constants.cc",
294 "$p2p_dir/base/constants.h",
299 configs += [ ":jingle_unexported_configs" ]
300 public_configs = [ ":jingle_direct_dependent_configs" ]
301 all_dependent_configs = [ ":jingle_all_dependent_configs" ]
304 # GYP version: third_party/libjingle.gyp:peerconnnection_server
305 #TODO(GYP): Switch to executable when WebRTC dependency is resolved.
306 source_set("peerconnnection_server") {
308 "source/talk/examples/peerconnection/server/data_socket.cc",
309 "source/talk/examples/peerconnection/server/data_socket.h",
310 "source/talk/examples/peerconnection/server/main.cc",
311 "source/talk/examples/peerconnection/server/peer_channel.cc",
312 "source/talk/examples/peerconnection/server/peer_channel.h",
313 "source/talk/examples/peerconnection/server/utils.cc",
314 "source/talk/examples/peerconnection/server/utils.h",
316 include_dirs = [ "source" ]
324 configs += [ ":jingle_unexported_configs" ]
325 public_configs = [ ":jingle_direct_dependent_configs" ]
326 all_dependent_configs = [ ":jingle_all_dependent_configs" ]
328 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
329 cflags = [ "/wd4309" ]
334 source_set("libjingle_webrtc") {
336 "overrides/init_webrtc.cc",
337 "overrides/init_webrtc.h",
339 configs += [ ":jingle_unexported_configs" ]
340 public_configs = [ ":jingle_direct_dependent_configs" ]
342 ":libjingle_webrtc_common",
346 # Note: this does not support the shared library build of libpeerconnection
347 # as is supported in the GYP build. It's not clear what this is used for.
348 source_set("libjingle_webrtc_common") {
350 "overrides/talk/media/webrtc/webrtcexport.h",
351 "source/talk/app/webrtc/audiotrack.cc",
352 "source/talk/app/webrtc/audiotrack.h",
353 "source/talk/app/webrtc/audiotrackrenderer.cc",
354 "source/talk/app/webrtc/audiotrackrenderer.h",
355 "source/talk/app/webrtc/datachannel.cc",
356 "source/talk/app/webrtc/datachannel.h",
357 "source/talk/app/webrtc/dtmfsender.cc",
358 "source/talk/app/webrtc/dtmfsender.h",
359 "source/talk/app/webrtc/jsep.h",
360 "source/talk/app/webrtc/jsepicecandidate.cc",
361 "source/talk/app/webrtc/jsepicecandidate.h",
362 "source/talk/app/webrtc/jsepsessiondescription.cc",
363 "source/talk/app/webrtc/jsepsessiondescription.h",
364 "source/talk/app/webrtc/localaudiosource.cc",
365 "source/talk/app/webrtc/localaudiosource.h",
366 "source/talk/app/webrtc/mediaconstraintsinterface.cc",
367 "source/talk/app/webrtc/mediaconstraintsinterface.h",
368 "source/talk/app/webrtc/mediastream.cc",
369 "source/talk/app/webrtc/mediastream.h",
370 "source/talk/app/webrtc/mediastreamhandler.cc",
371 "source/talk/app/webrtc/mediastreamhandler.h",
372 "source/talk/app/webrtc/mediastreaminterface.h",
373 "source/talk/app/webrtc/mediastreamprovider.h",
374 "source/talk/app/webrtc/mediastreamproxy.h",
375 "source/talk/app/webrtc/mediastreamsignaling.cc",
376 "source/talk/app/webrtc/mediastreamsignaling.h",
377 "source/talk/app/webrtc/mediastreamtrack.h",
378 "source/talk/app/webrtc/mediastreamtrackproxy.h",
379 "source/talk/app/webrtc/notifier.h",
380 "source/talk/app/webrtc/peerconnection.cc",
381 "source/talk/app/webrtc/peerconnection.h",
382 "source/talk/app/webrtc/peerconnectionfactory.cc",
383 "source/talk/app/webrtc/peerconnectionfactory.h",
384 "source/talk/app/webrtc/peerconnectioninterface.h",
385 "source/talk/app/webrtc/portallocatorfactory.cc",
386 "source/talk/app/webrtc/portallocatorfactory.h",
387 "source/talk/app/webrtc/remoteaudiosource.cc",
388 "source/talk/app/webrtc/remoteaudiosource.h",
389 "source/talk/app/webrtc/remotevideocapturer.cc",
390 "source/talk/app/webrtc/remotevideocapturer.h",
391 "source/talk/app/webrtc/sctputils.cc",
392 "source/talk/app/webrtc/sctputils.h",
393 "source/talk/app/webrtc/statscollector.cc",
394 "source/talk/app/webrtc/statscollector.h",
395 "source/talk/app/webrtc/statstypes.h",
396 "source/talk/app/webrtc/streamcollection.h",
397 "source/talk/app/webrtc/umametrics.h",
398 "source/talk/app/webrtc/videosource.cc",
399 "source/talk/app/webrtc/videosource.h",
400 "source/talk/app/webrtc/videosourceinterface.h",
401 "source/talk/app/webrtc/videosourceproxy.h",
402 "source/talk/app/webrtc/videotrack.cc",
403 "source/talk/app/webrtc/videotrack.h",
404 "source/talk/app/webrtc/videotrackrenderers.cc",
405 "source/talk/app/webrtc/videotrackrenderers.h",
406 "source/talk/app/webrtc/webrtcsdp.cc",
407 "source/talk/app/webrtc/webrtcsdp.h",
408 "source/talk/app/webrtc/webrtcsession.cc",
409 "source/talk/app/webrtc/webrtcsession.h",
410 "source/talk/app/webrtc/webrtcsessiondescriptionfactory.cc",
411 "source/talk/app/webrtc/webrtcsessiondescriptionfactory.h",
412 "source/talk/media/base/audiorenderer.h",
413 "source/talk/media/base/capturemanager.cc",
414 "source/talk/media/base/capturemanager.h",
415 "source/talk/media/base/capturerenderadapter.cc",
416 "source/talk/media/base/capturerenderadapter.h",
417 "source/talk/media/base/codec.cc",
418 "source/talk/media/base/codec.h",
419 "source/talk/media/base/constants.cc",
420 "source/talk/media/base/constants.h",
421 "source/talk/media/base/cryptoparams.h",
422 "source/talk/media/base/filemediaengine.cc",
423 "source/talk/media/base/filemediaengine.h",
424 "source/talk/media/base/hybriddataengine.h",
425 "source/talk/media/base/mediachannel.h",
426 "source/talk/media/base/mediaengine.cc",
427 "source/talk/media/base/mediaengine.h",
428 "source/talk/media/base/rtpdataengine.cc",
429 "source/talk/media/base/rtpdataengine.h",
430 "source/talk/media/base/rtpdump.cc",
431 "source/talk/media/base/rtpdump.h",
432 "source/talk/media/base/rtputils.cc",
433 "source/talk/media/base/rtputils.h",
434 "source/talk/media/base/streamparams.cc",
435 "source/talk/media/base/streamparams.h",
436 "source/talk/media/base/videoadapter.cc",
437 "source/talk/media/base/videoadapter.h",
438 "source/talk/media/base/videocapturer.cc",
439 "source/talk/media/base/videocapturer.h",
440 "source/talk/media/base/videocommon.cc",
441 "source/talk/media/base/videocommon.h",
442 "source/talk/media/base/videoframe.cc",
443 "source/talk/media/base/videoframe.h",
444 "source/talk/media/base/videoframefactory.cc",
445 "source/talk/media/base/videoframefactory.h",
446 "source/talk/media/devices/dummydevicemanager.cc",
447 "source/talk/media/devices/dummydevicemanager.h",
448 "source/talk/media/devices/filevideocapturer.cc",
449 "source/talk/media/devices/filevideocapturer.h",
450 "source/talk/media/webrtc/webrtccommon.h",
451 "source/talk/media/webrtc/webrtcpassthroughrender.cc",
452 "source/talk/media/webrtc/webrtcpassthroughrender.h",
453 "source/talk/media/webrtc/webrtctexturevideoframe.cc",
454 "source/talk/media/webrtc/webrtctexturevideoframe.h",
455 "source/talk/media/webrtc/webrtcvideocapturer.cc",
456 "source/talk/media/webrtc/webrtcvideocapturer.h",
457 "source/talk/media/webrtc/webrtcvideoframe.cc",
458 "source/talk/media/webrtc/webrtcvideoframe.h",
459 "source/talk/media/webrtc/webrtcvideoframefactory.cc",
460 "source/talk/media/webrtc/webrtcvideoframefactory.h",
461 "source/talk/media/webrtc/webrtcvie.h",
462 "source/talk/media/webrtc/webrtcvoe.h",
463 "source/talk/session/media/audiomonitor.cc",
464 "source/talk/session/media/audiomonitor.h",
465 "source/talk/session/media/bundlefilter.cc",
466 "source/talk/session/media/bundlefilter.h",
467 "source/talk/session/media/channel.cc",
468 "source/talk/session/media/channel.h",
469 "source/talk/session/media/channelmanager.cc",
470 "source/talk/session/media/channelmanager.h",
471 "source/talk/session/media/currentspeakermonitor.cc",
472 "source/talk/session/media/currentspeakermonitor.h",
473 "source/talk/session/media/externalhmac.cc",
474 "source/talk/session/media/externalhmac.h",
475 "source/talk/session/media/mediamonitor.cc",
476 "source/talk/session/media/mediamonitor.h",
477 "source/talk/session/media/mediasession.cc",
478 "source/talk/session/media/mediasession.h",
479 "source/talk/session/media/mediasink.h",
480 "source/talk/session/media/rtcpmuxfilter.cc",
481 "source/talk/session/media/rtcpmuxfilter.h",
482 "source/talk/session/media/soundclip.cc",
483 "source/talk/session/media/soundclip.h",
484 "source/talk/session/media/srtpfilter.cc",
485 "source/talk/session/media/srtpfilter.h",
486 "source/talk/session/media/typingmonitor.cc",
487 "source/talk/session/media/typingmonitor.h",
488 "source/talk/session/media/voicechannel.h",
491 configs += [ ":jingle_unexported_configs" ]
492 public_configs = [ ":jingle_direct_dependent_configs" ]
495 "//third_party/libsrtp",
496 "//third_party/webrtc/modules/media_file",
497 "//third_party/webrtc/modules/video_capture",
498 "//third_party/webrtc/modules/video_render",
502 # TODO(mallinath) - Enable SCTP for iOS.
504 "source/talk/media/sctp/sctpdataengine.cc",
505 "source/talk/media/sctp/sctpdataengine.h",
507 defines = [ "HAVE_SCTP" ]
508 deps += [ "//third_party/usrsctp" ]
512 cflags = [ "-Wno-unused-private-field" ]
516 # Note: this does not support the shared library build of libpeerconnection
517 # as is supported in the GYP build. It's not clear what this is used for.
518 source_set("libpeerconnection") {
520 "source/talk/media/webrtc/simulcast.cc",
521 "source/talk/media/webrtc/simulcast.h",
522 "source/talk/media/webrtc/webrtcmediaengine.cc",
523 "source/talk/media/webrtc/webrtcmediaengine.h",
524 "source/talk/media/webrtc/webrtcvideoengine.cc",
525 "source/talk/media/webrtc/webrtcvideoengine.h",
526 "source/talk/media/webrtc/webrtcvideoengine2.cc",
527 "source/talk/media/webrtc/webrtcvideoengine2.h",
528 "source/talk/media/webrtc/webrtcvoiceengine.cc",
529 "source/talk/media/webrtc/webrtcvoiceengine.h",
532 configs += [ ":jingle_unexported_configs" ]
533 public_configs = [ ":jingle_direct_dependent_configs" ]
536 ":libjingle_webrtc_common",
537 "//third_party/webrtc",
538 "//third_party/webrtc/system_wrappers",
539 "//third_party/webrtc/voice_engine",
543 source_set("libjingle_peerconnection_so") {
545 "source/talk/app/webrtc/java/jni/peerconnection_jni.cc",
553 android_library("libjingle_peerconnection_java") {
555 "source/talk/app/webrtc/java/src/org/webrtc/AudioSource.java",
556 "source/talk/app/webrtc/java/src/org/webrtc/AudioTrack.java",
557 "source/talk/app/webrtc/java/src/org/webrtc/DataChannel.java",
558 "source/talk/app/webrtc/java/src/org/webrtc/IceCandidate.java",
559 "source/talk/app/webrtc/java/src/org/webrtc/Logging.java",
560 "source/talk/app/webrtc/java/src/org/webrtc/MediaConstraints.java",
561 "source/talk/app/webrtc/java/src/org/webrtc/MediaSource.java",
562 "source/talk/app/webrtc/java/src/org/webrtc/MediaStream.java",
563 "source/talk/app/webrtc/java/src/org/webrtc/MediaStreamTrack.java",
564 "source/talk/app/webrtc/java/src/org/webrtc/PeerConnectionFactory.java",
565 "source/talk/app/webrtc/java/src/org/webrtc/PeerConnection.java",
566 "source/talk/app/webrtc/java/src/org/webrtc/SdpObserver.java",
567 "source/talk/app/webrtc/java/src/org/webrtc/StatsObserver.java",
568 "source/talk/app/webrtc/java/src/org/webrtc/StatsReport.java",
569 "source/talk/app/webrtc/java/src/org/webrtc/SessionDescription.java",
570 "source/talk/app/webrtc/java/src/org/webrtc/VideoCapturer.java",
571 "source/talk/app/webrtc/java/src/org/webrtc/VideoRenderer.java",
572 "source/talk/app/webrtc/java/src/org/webrtc/VideoSource.java",
573 "source/talk/app/webrtc/java/src/org/webrtc/VideoTrack.java",
577 # TODO(GYP): Port libjingle.gyp's enable_webrtc condition block.