Show all non-generic file handlers as "Open" in file tasks combobutton.
[chromium-blink-merge.git] / third_party / libjingle / libjingle.gyp
blobaedb1e2fdcfa1c57128ef3ba50bbf95d585e8b89
1 # Copyright (c) 2012 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.
6   'includes': [
7     '../../build/win_precompile.gypi',
8   ],
9   'variables': {
10     'enabled_libjingle_device_manager%': 0,
11     'libjingle_additional_deps%': [],
12     'libjingle_peerconnection_additional_deps%': [],
13     'libjingle_source%': "source",
14     'libpeer_target_type%': 'static_library',
15     'libpeer_allocator_shim%': 0,
16     'webrtc_p2p': "../webrtc/p2p",
17     'webrtc_xmpp': "../webrtc/libjingle/xmpp",
18   },
19   # Most of these settings have been split according to their scope into
20   # :jingle_unexported_configs, :jingle_direct_dependent_configs,
21   # :jingle_all_dependent_configs in the GN build.
22   'target_defaults': {
23     'defines': [
24       'EXPAT_RELATIVE_PATH',
25       'FEATURE_ENABLE_SSL',
26       'GTEST_RELATIVE_PATH',
27       'HAVE_SRTP',
28       'HAVE_WEBRTC_VIDEO',
29       'HAVE_WEBRTC_VOICE',
30       'LOGGING_INSIDE_WEBRTC',
31       'NO_MAIN_THREAD_WRAPPING',
32       'NO_SOUND_SYSTEM',
33       'SRTP_RELATIVE_PATH',
34       'USE_WEBRTC_DEV_BRANCH',
35       'ENABLE_EXTERNAL_AUTH',
36       'WEBRTC_CHROMIUM_BUILD',
37     ],
38     'configurations': {
39       'Debug': {
40         'defines': [
41           # TODO(sergeyu): Fix libjingle to use NDEBUG instead of
42           # _DEBUG and remove this define. See below as well.
43           '_DEBUG',
44         ],
45       }
46     },
47     'include_dirs': [
48       './overrides',
49       '../../third_party/webrtc/overrides',
50       './<(libjingle_source)',
51       '../..',
52       '../../testing/gtest/include',
53       '../../third_party',
54       '../../third_party/libyuv/include',
55       '../../third_party/usrsctp',
56     ],
57     # These dependencies have been translated into :jingle_deps in the GN build.
58     'dependencies': [
59       '<(DEPTH)/base/base.gyp:base',
60       '<(DEPTH)/net/net.gyp:net',
61       '<(DEPTH)/third_party/expat/expat.gyp:expat',
62     ],
63     'export_dependent_settings': [
64       '<(DEPTH)/third_party/expat/expat.gyp:expat',
65     ],
66     'direct_dependent_settings': {
67       'include_dirs': [
68         '../../third_party/webrtc/overrides',
69         './overrides',
70         './<(libjingle_source)',
71         '../..',
72         '../../testing/gtest/include',
73         '../../third_party',
74       ],
75       'defines': [
76         'FEATURE_ENABLE_SSL',
77         'FEATURE_ENABLE_VOICEMAIL',
78         'EXPAT_RELATIVE_PATH',
79         'GTEST_RELATIVE_PATH',
80         'NO_MAIN_THREAD_WRAPPING',
81         'NO_SOUND_SYSTEM',
82       ],
83       'conditions': [
84         ['OS=="win"', {
85           'link_settings': {
86             'libraries': [
87               '-lsecur32.lib',
88               '-lcrypt32.lib',
89               '-liphlpapi.lib',
90             ],
91           },
92         }],
93         ['OS=="win"', {
94           'include_dirs': [
95             '../third_party/platformsdk_win7/files/Include',
96           ],
97           'defines': [
98             '_CRT_SECURE_NO_WARNINGS',  # Suppres warnings about _vsnprinf
99           ],
100           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
101           'msvs_disabled_warnings': [ 4267 ],
102         }],
103         ['OS=="linux"', {
104           'defines': [
105             'LINUX',
106             'WEBRTC_LINUX',
107           ],
108         }],
109         ['OS=="mac"', {
110           'defines': [
111             'OSX',
112             'WEBRTC_MAC',
113           ],
114         }],
115         ['OS=="ios"', {
116           'defines': [
117             'IOS',
118             'WEBRTC_MAC',
119             'WEBRTC_IOS',
120           ],
121         }],
122         ['OS=="win"', {
123           'defines': [
124             'WEBRTC_WIN',
125           ],
126         }],
127         ['OS=="android"', {
128           'defines': [
129             'ANDROID',
130           ],
131         }],
132         ['os_posix==1', {
133           'defines': [
134             'POSIX',
135             'WEBRTC_POSIX',
136           ],
137         }],
138         ['os_bsd==1', {
139           'defines': [
140             'BSD',
141           ],
142         }],
143         ['OS=="openbsd"', {
144           'defines': [
145             'OPENBSD',
146           ],
147         }],
148         ['OS=="freebsd"', {
149           'defines': [
150             'FREEBSD',
151           ],
152         }],
153         ['chromeos==1', {
154           'defines': [
155             'CHROMEOS',
156           ],
157         }],
158       ],
159     },
160     'all_dependent_settings': {
161       'configurations': {
162         'Debug': {
163           'defines': [
164             # TODO(sergeyu): Fix libjingle to use NDEBUG instead of _DEBUG and
165             # remove this define. See above and GN file as well.
166             '_DEBUG',
167           ],
168         }
169       },
170     },
171     'variables': {
172       'clang_warning_flags_unset': [
173         # Don't warn about string->bool used in asserts.
174         '-Wstring-conversion',
175       ],
176     },
177     'conditions': [
178       ['"<(libpeer_target_type)"=="static_library"', {
179         'defines': [ 'LIBPEERCONNECTION_LIB=1' ],
180       }],
181       ['use_openssl==1', {
182         'defines': [
183           'SSL_USE_OPENSSL',
184           'HAVE_OPENSSL_SSL_H',
185         ],
186         'dependencies': [
187           '../../third_party/boringssl/boringssl.gyp:boringssl',
188         ],
189       }, {
190         'defines': [
191           'SSL_USE_NSS',
192           'HAVE_NSS_SSL_H',
193           'SSL_USE_NSS_RNG',
194         ],
195         'conditions': [
196           ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
197             'dependencies': [
198               '<(DEPTH)/build/linux/system.gyp:ssl',
199             ],
200           }],
201           ['OS == "mac" or OS == "ios" or OS == "win"', {
202             'dependencies': [
203               '<(DEPTH)/net/third_party/nss/ssl.gyp:libssl',
204               '<(DEPTH)/third_party/nss/nss.gyp:nspr',
205               '<(DEPTH)/third_party/nss/nss.gyp:nss',
206             ],
207           }],
208         ],
209       }],
210       ['OS=="win"', {
211         'include_dirs': [
212           '../third_party/platformsdk_win7/files/Include',
213         ],
214         'conditions' : [
215           ['target_arch == "ia32"', {
216             'defines': [
217               '_USE_32BIT_TIME_T',
218             ],
219           }],
220         ],
221       }],
222       ['OS=="linux"', {
223         'defines': [
224           'LINUX',
225           'WEBRTC_LINUX',
226         ],
227       }],
228       ['OS=="mac"', {
229         'defines': [
230           'OSX',
231           'WEBRTC_MAC',
232         ],
233       }],
234       ['OS=="win"', {
235         'defines': [
236           'WEBRTC_WIN',
237         ],
238       }],
239       ['OS=="ios"', {
240         'defines': [
241           'IOS',
242           'WEBRTC_MAC',
243           'WEBRTC_IOS',
244         ],
245       }],
246       ['os_posix == 1', {
247         'defines': [
248           'POSIX',
249           'WEBRTC_POSIX',
250         ],
251       }],
252       ['os_bsd==1', {
253         'defines': [
254           'BSD',
255         ],
256       }],
257       ['OS=="openbsd"', {
258         'defines': [
259           'OPENBSD',
260         ],
261       }],
262       ['OS=="freebsd"', {
263         'defines': [
264           'FREEBSD',
265         ],
266       }],
267     ],
268   },
269   'targets': [
270     # GN version: //third_party/libjingle
271     {
272       'target_name': 'libjingle',
273       'type': 'static_library',
274       'includes': [ 'libjingle_common.gypi' ],
275       'sources!' : [
276         # Compiled as part of libjingle_p2p_constants.
277         '<(webrtc_p2p)/base/constants.cc',
278         '<(webrtc_p2p)/base/constants.h',
279       ],
280       'dependencies': [
281         '<(DEPTH)/third_party/webrtc/base/base.gyp:webrtc_base',
282         '<(DEPTH)/third_party/webrtc/libjingle/xmllite/xmllite.gyp:rtc_xmllite',
283         'libjingle_p2p_constants',
284         '<@(libjingle_additional_deps)',
285       ],
286     },  # target libjingle
287     # This has to be is a separate project due to a bug in MSVS 2008 and the
288     # current toolset on android.  The problem is that we have two files named
289     # "constants.cc" and MSVS/android doesn't handle this properly.
290     # GYP currently has guards to catch this, so if you want to remove it,
291     # run GYP and if GYP has removed the validation check, then we can assume
292     # that the toolchains have been fixed (we currently use VS2010 and later,
293     # so VS2008 isn't a concern anymore).
294     #
295     # GN version: //third_party/libjingle:libjingle_p2p_constants
296     {
297       'target_name': 'libjingle_p2p_constants',
298       'type': 'static_library',
299       'sources': [
300         '<(webrtc_p2p)/base/constants.cc',
301         '<(webrtc_p2p)/base/constants.h',
302       ],
303     },  # target libjingle_p2p_constants
304     # GN version: //third_party/libjingle:peerconnection_server
305     {
306       'target_name': 'peerconnection_server',
307       'type': 'executable',
308       'sources': [
309         '<(libjingle_source)/talk/examples/peerconnection/server/data_socket.cc',
310         '<(libjingle_source)/talk/examples/peerconnection/server/data_socket.h',
311         '<(libjingle_source)/talk/examples/peerconnection/server/main.cc',
312         '<(libjingle_source)/talk/examples/peerconnection/server/peer_channel.cc',
313         '<(libjingle_source)/talk/examples/peerconnection/server/peer_channel.h',
314         '<(libjingle_source)/talk/examples/peerconnection/server/utils.cc',
315         '<(libjingle_source)/talk/examples/peerconnection/server/utils.h',
316       ],
317       'include_dirs': [
318         '<(libjingle_source)',
319       ],
320       'dependencies': [
321         'libjingle',
322       ],
323       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
324       'msvs_disabled_warnings': [ 4309, ],
325     }, # target peerconnection_server
326   ],
327   'conditions': [
328     ['enable_webrtc==1', {
329       'targets': [
330         {
331           # GN version: //third_party/libjingle:libjingle_webrtc_common
332           'target_name': 'libjingle_webrtc_common',
333           'type': 'static_library',
334           'all_dependent_settings': {
335             'conditions': [
336               ['"<(libpeer_target_type)"=="static_library"', {
337                 'defines': [ 'LIBPEERCONNECTION_LIB=1' ],
338               }],
339             ],
340           },
341           'sources': [
342             'overrides/talk/media/webrtc/webrtcexport.h',
344             '<(libjingle_source)/talk/app/webrtc/audiotrack.cc',
345             '<(libjingle_source)/talk/app/webrtc/audiotrack.h',
346             '<(libjingle_source)/talk/app/webrtc/audiotrackrenderer.cc',
347             '<(libjingle_source)/talk/app/webrtc/audiotrackrenderer.h',
348             '<(libjingle_source)/talk/app/webrtc/datachannel.cc',
349             '<(libjingle_source)/talk/app/webrtc/datachannel.h',
350             '<(libjingle_source)/talk/app/webrtc/dtmfsender.cc',
351             '<(libjingle_source)/talk/app/webrtc/dtmfsender.h',
352             '<(libjingle_source)/talk/app/webrtc/jsep.h',
353             '<(libjingle_source)/talk/app/webrtc/jsepicecandidate.cc',
354             '<(libjingle_source)/talk/app/webrtc/jsepicecandidate.h',
355             '<(libjingle_source)/talk/app/webrtc/jsepsessiondescription.cc',
356             '<(libjingle_source)/talk/app/webrtc/jsepsessiondescription.h',
357             '<(libjingle_source)/talk/app/webrtc/localaudiosource.cc',
358             '<(libjingle_source)/talk/app/webrtc/localaudiosource.h',
359             '<(libjingle_source)/talk/app/webrtc/mediaconstraintsinterface.cc',
360             '<(libjingle_source)/talk/app/webrtc/mediaconstraintsinterface.h',
361             '<(libjingle_source)/talk/app/webrtc/mediastream.cc',
362             '<(libjingle_source)/talk/app/webrtc/mediastream.h',
363             '<(libjingle_source)/talk/app/webrtc/mediastreamhandler.cc',
364             '<(libjingle_source)/talk/app/webrtc/mediastreamhandler.h',
365             '<(libjingle_source)/talk/app/webrtc/mediastreaminterface.h',
366             '<(libjingle_source)/talk/app/webrtc/mediastreamprovider.h',
367             '<(libjingle_source)/talk/app/webrtc/mediastreamproxy.h',
368             '<(libjingle_source)/talk/app/webrtc/mediastreamsignaling.cc',
369             '<(libjingle_source)/talk/app/webrtc/mediastreamsignaling.h',
370             '<(libjingle_source)/talk/app/webrtc/mediastreamtrack.h',
371             '<(libjingle_source)/talk/app/webrtc/mediastreamtrackproxy.h',
372             '<(libjingle_source)/talk/app/webrtc/notifier.h',
373             '<(libjingle_source)/talk/app/webrtc/peerconnection.cc',
374             '<(libjingle_source)/talk/app/webrtc/peerconnection.h',
375             '<(libjingle_source)/talk/app/webrtc/peerconnectionfactory.cc',
376             '<(libjingle_source)/talk/app/webrtc/peerconnectionfactory.h',
377             '<(libjingle_source)/talk/app/webrtc/peerconnectioninterface.h',
378             '<(libjingle_source)/talk/app/webrtc/portallocatorfactory.cc',
379             '<(libjingle_source)/talk/app/webrtc/portallocatorfactory.h',
380             '<(libjingle_source)/talk/app/webrtc/remoteaudiosource.cc',
381             '<(libjingle_source)/talk/app/webrtc/remoteaudiosource.h',
382             '<(libjingle_source)/talk/app/webrtc/remotevideocapturer.cc',
383             '<(libjingle_source)/talk/app/webrtc/remotevideocapturer.h',
384             '<(libjingle_source)/talk/app/webrtc/sctputils.cc',
385             '<(libjingle_source)/talk/app/webrtc/sctputils.h',
386             '<(libjingle_source)/talk/app/webrtc/statscollector.cc',
387             '<(libjingle_source)/talk/app/webrtc/statscollector.h',
388             '<(libjingle_source)/talk/app/webrtc/statstypes.cc',
389             '<(libjingle_source)/talk/app/webrtc/statstypes.h',
390             '<(libjingle_source)/talk/app/webrtc/streamcollection.h',
391             '<(libjingle_source)/talk/app/webrtc/umametrics.h',
392             '<(libjingle_source)/talk/app/webrtc/videosource.cc',
393             '<(libjingle_source)/talk/app/webrtc/videosource.h',
394             '<(libjingle_source)/talk/app/webrtc/videosourceinterface.h',
395             '<(libjingle_source)/talk/app/webrtc/videosourceproxy.h',
396             '<(libjingle_source)/talk/app/webrtc/videotrack.cc',
397             '<(libjingle_source)/talk/app/webrtc/videotrack.h',
398             '<(libjingle_source)/talk/app/webrtc/videotrackrenderers.cc',
399             '<(libjingle_source)/talk/app/webrtc/videotrackrenderers.h',
400             '<(libjingle_source)/talk/app/webrtc/webrtcsdp.cc',
401             '<(libjingle_source)/talk/app/webrtc/webrtcsdp.h',
402             '<(libjingle_source)/talk/app/webrtc/webrtcsession.cc',
403             '<(libjingle_source)/talk/app/webrtc/webrtcsession.h',
404             '<(libjingle_source)/talk/app/webrtc/webrtcsessiondescriptionfactory.cc',
405             '<(libjingle_source)/talk/app/webrtc/webrtcsessiondescriptionfactory.h',
406             '<(libjingle_source)/talk/media/base/audiorenderer.h',
407             '<(libjingle_source)/talk/media/base/capturemanager.cc',
408             '<(libjingle_source)/talk/media/base/capturemanager.h',
409             '<(libjingle_source)/talk/media/base/capturerenderadapter.cc',
410             '<(libjingle_source)/talk/media/base/capturerenderadapter.h',
411             '<(libjingle_source)/talk/media/base/codec.cc',
412             '<(libjingle_source)/talk/media/base/codec.h',
413             '<(libjingle_source)/talk/media/base/constants.cc',
414             '<(libjingle_source)/talk/media/base/constants.h',
415             '<(libjingle_source)/talk/media/base/cryptoparams.h',
416             '<(libjingle_source)/talk/media/base/filemediaengine.cc',
417             '<(libjingle_source)/talk/media/base/filemediaengine.h',
418             '<(libjingle_source)/talk/media/base/hybriddataengine.h',
419             '<(libjingle_source)/talk/media/base/mediachannel.h',
420             '<(libjingle_source)/talk/media/base/mediaengine.cc',
421             '<(libjingle_source)/talk/media/base/mediaengine.h',
422             '<(libjingle_source)/talk/media/base/rtpdataengine.cc',
423             '<(libjingle_source)/talk/media/base/rtpdataengine.h',
424             '<(libjingle_source)/talk/media/base/rtpdump.cc',
425             '<(libjingle_source)/talk/media/base/rtpdump.h',
426             '<(libjingle_source)/talk/media/base/rtputils.cc',
427             '<(libjingle_source)/talk/media/base/rtputils.h',
428             '<(libjingle_source)/talk/media/base/streamparams.cc',
429             '<(libjingle_source)/talk/media/base/streamparams.h',
430             '<(libjingle_source)/talk/media/base/videoadapter.cc',
431             '<(libjingle_source)/talk/media/base/videoadapter.h',
432             '<(libjingle_source)/talk/media/base/videocapturer.cc',
433             '<(libjingle_source)/talk/media/base/videocapturer.h',
434             '<(libjingle_source)/talk/media/base/videocommon.cc',
435             '<(libjingle_source)/talk/media/base/videocommon.h',
436             '<(libjingle_source)/talk/media/base/videoframe.cc',
437             '<(libjingle_source)/talk/media/base/videoframe.h',
438             '<(libjingle_source)/talk/media/base/videoframefactory.cc',
439             '<(libjingle_source)/talk/media/base/videoframefactory.h',
440             '<(libjingle_source)/talk/media/devices/dummydevicemanager.cc',
441             '<(libjingle_source)/talk/media/devices/dummydevicemanager.h',
442             '<(libjingle_source)/talk/media/devices/filevideocapturer.cc',
443             '<(libjingle_source)/talk/media/devices/filevideocapturer.h',
444             '<(libjingle_source)/talk/media/webrtc/webrtccommon.h',
445             '<(libjingle_source)/talk/media/webrtc/webrtcpassthroughrender.cc',
446             '<(libjingle_source)/talk/media/webrtc/webrtcpassthroughrender.h',
447             '<(libjingle_source)/talk/media/webrtc/webrtctexturevideoframe.cc',
448             '<(libjingle_source)/talk/media/webrtc/webrtctexturevideoframe.h',
449             '<(libjingle_source)/talk/media/webrtc/webrtcvideocapturer.cc',
450             '<(libjingle_source)/talk/media/webrtc/webrtcvideocapturer.h',
451             '<(libjingle_source)/talk/media/webrtc/webrtcvideoframe.cc',
452             '<(libjingle_source)/talk/media/webrtc/webrtcvideoframe.h',
453             '<(libjingle_source)/talk/media/webrtc/webrtcvideoframefactory.cc',
454             '<(libjingle_source)/talk/media/webrtc/webrtcvideoframefactory.h',
455             '<(libjingle_source)/talk/media/webrtc/webrtcvie.h',
456             '<(libjingle_source)/talk/media/webrtc/webrtcvoe.h',
457             '<(libjingle_source)/talk/session/media/audiomonitor.cc',
458             '<(libjingle_source)/talk/session/media/audiomonitor.h',
459             '<(libjingle_source)/talk/session/media/bundlefilter.cc',
460             '<(libjingle_source)/talk/session/media/bundlefilter.h',
461             '<(libjingle_source)/talk/session/media/call.cc',
462             '<(libjingle_source)/talk/session/media/call.h',
463             '<(libjingle_source)/talk/session/media/channel.cc',
464             '<(libjingle_source)/talk/session/media/channel.h',
465             '<(libjingle_source)/talk/session/media/channelmanager.cc',
466             '<(libjingle_source)/talk/session/media/channelmanager.h',
467             '<(libjingle_source)/talk/session/media/currentspeakermonitor.cc',
468             '<(libjingle_source)/talk/session/media/currentspeakermonitor.h',
469             '<(libjingle_source)/talk/session/media/externalhmac.cc',
470             '<(libjingle_source)/talk/session/media/externalhmac.h',
471             '<(libjingle_source)/talk/session/media/mediamessages.cc',
472             '<(libjingle_source)/talk/session/media/mediamessages.h',
473             '<(libjingle_source)/talk/session/media/mediamonitor.cc',
474             '<(libjingle_source)/talk/session/media/mediamonitor.h',
475             '<(libjingle_source)/talk/session/media/mediasession.cc',
476             '<(libjingle_source)/talk/session/media/mediasession.h',
477             '<(libjingle_source)/talk/session/media/mediasessionclient.cc',
478             '<(libjingle_source)/talk/session/media/mediasessionclient.h',
479             '<(libjingle_source)/talk/session/media/mediasink.h',
480             '<(libjingle_source)/talk/session/media/rtcpmuxfilter.cc',
481             '<(libjingle_source)/talk/session/media/rtcpmuxfilter.h',
482             '<(libjingle_source)/talk/session/media/soundclip.cc',
483             '<(libjingle_source)/talk/session/media/soundclip.h',
484             '<(libjingle_source)/talk/session/media/srtpfilter.cc',
485             '<(libjingle_source)/talk/session/media/srtpfilter.h',
486             '<(libjingle_source)/talk/session/media/typingmonitor.cc',
487             '<(libjingle_source)/talk/session/media/typingmonitor.h',
488             '<(libjingle_source)/talk/session/media/voicechannel.h',
489             '<(libjingle_source)/talk/session/tunnel/pseudotcpchannel.cc',
490             '<(libjingle_source)/talk/session/tunnel/pseudotcpchannel.h',
491             '<(libjingle_source)/talk/session/tunnel/tunnelsessionclient.cc',
492             '<(libjingle_source)/talk/session/tunnel/tunnelsessionclient.h',
493           ],
494           'conditions': [
495             ['libpeer_allocator_shim==1 and '
496              'libpeer_target_type!="static_library" and OS!="mac"', {
497               'sources': [
498                 'overrides/allocator_shim/allocator_stub.cc',
499                 'overrides/allocator_shim/allocator_stub.h',
500               ],
501             }],
502             # TODO(mallinath) - Enable SCTP for iOS.
503             ['OS!="ios"', {
504               'defines': [
505                 'HAVE_SCTP',
506               ],
507               'sources': [
508                 '<(libjingle_source)/talk/media/sctp/sctpdataengine.cc',
509                 '<(libjingle_source)/talk/media/sctp/sctpdataengine.h',
510               ],
511               'dependencies': [
512                 '<(DEPTH)/third_party/usrsctp/usrsctp.gyp:usrsctplib',
513               ],
514             }],
515             ['enabled_libjingle_device_manager==1', {
516               'sources!': [
517                 '<(libjingle_source)/talk/media/devices/dummydevicemanager.cc',
518                 '<(libjingle_source)/talk/media/devices/dummydevicemanager.h',
519               ],
520               'sources': [
521                 '<(libjingle_source)/talk/media/devices/devicemanager.cc',
522                 '<(libjingle_source)/talk/media/devices/devicemanager.h',
523               ],
524               'conditions': [
525                 ['OS=="win"', {
526                   'sources': [
527                     '<(libjingle_source)/talk/media/devices/win32deviceinfo.cc',
528                     '<(libjingle_source)/talk/media/devices/win32devicemanager.cc',
529                     '<(libjingle_source)/talk/media/devices/win32devicemanager.h',
530                   ],
531                 }],
532                 ['OS=="linux"', {
533                   'sources': [
534                     '<(libjingle_source)/talk/media/devices/libudevsymboltable.cc',
535                     '<(libjingle_source)/talk/media/devices/libudevsymboltable.h',
536                     '<(libjingle_source)/talk/media/devices/linuxdeviceinfo.cc',
537                     '<(libjingle_source)/talk/media/devices/linuxdevicemanager.cc',
538                     '<(libjingle_source)/talk/media/devices/linuxdevicemanager.h',
539                     '<(libjingle_source)/talk/media/devices/v4llookup.cc',
540                     '<(libjingle_source)/talk/media/devices/v4llookup.h',
541                   ],
542                 }],
543                 ['OS=="mac"', {
544                   'sources': [
545                     '<(libjingle_source)/talk/media/devices/macdeviceinfo.cc',
546                     '<(libjingle_source)/talk/media/devices/macdevicemanager.cc',
547                     '<(libjingle_source)/talk/media/devices/macdevicemanager.h',
548                     '<(libjingle_source)/talk/media/devices/macdevicemanagermm.mm',
549                   ],
550                   'xcode_settings': {
551                     'WARNING_CFLAGS': [
552                       # Suppres warnings about using deprecated functions in
553                       # macdevicemanager.cc.
554                       '-Wno-deprecated-declarations',
555                     ],
556                   },
557                 }],
558               ],
559             }],
560           ],
561           'dependencies': [
562             '<(DEPTH)/third_party/libsrtp/libsrtp.gyp:libsrtp',
563             '<(DEPTH)/third_party/webrtc/modules/modules.gyp:media_file',
564             '<(DEPTH)/third_party/webrtc/modules/modules.gyp:video_capture_module_impl',
565             '<(DEPTH)/third_party/webrtc/modules/modules.gyp:video_render_module_impl',
566             'libjingle',
567           ],
568         },  # target libjingle_webrtc_common
569         {
570           # GN version: //third_party/libjingle:libjingle_webrtc
571           'target_name': 'libjingle_webrtc',
572           'type': 'static_library',
573           'sources': [
574             'overrides/init_webrtc.cc',
575             'overrides/init_webrtc.h',
576           ],
577           'dependencies': [
578             'libjingle_webrtc_common',
579           ],
580           'conditions': [
581             ['libpeer_target_type=="static_library"', {
582               'dependencies': [
583                 '<(DEPTH)/third_party/webrtc/modules/modules.gyp:audio_processing',
584               ],
585             }],
586           ],
587         },
588         {
589           # GN version: //third_party/libjingle:libpeerconnection
590           'target_name': 'libpeerconnection',
591           'type': '<(libpeer_target_type)',
592           'sources': [
593             # Note: sources list duplicated in GN build.
594             '<(libjingle_source)/talk/media/webrtc/webrtcmediaengine.cc',
595             '<(libjingle_source)/talk/media/webrtc/webrtcmediaengine.h',
596             '<(libjingle_source)/talk/media/webrtc/webrtcvideoengine.cc',
597             '<(libjingle_source)/talk/media/webrtc/webrtcvideoengine.h',
598             '<(libjingle_source)/talk/media/webrtc/webrtcvideoengine2.cc',
599             '<(libjingle_source)/talk/media/webrtc/webrtcvideoengine2.h',
600             '<(libjingle_source)/talk/media/webrtc/webrtcvoiceengine.cc',
601             '<(libjingle_source)/talk/media/webrtc/webrtcvoiceengine.h',
602           ],
603           'dependencies': [
604             '<(DEPTH)/third_party/webrtc/system_wrappers/source/system_wrappers.gyp:system_wrappers',
605             '<(DEPTH)/third_party/webrtc/voice_engine/voice_engine.gyp:voice_engine',
606             '<(DEPTH)/third_party/webrtc/webrtc.gyp:webrtc',
607             '<@(libjingle_peerconnection_additional_deps)',
608             'libjingle_webrtc_common',
609           ],
610           'conditions': [
611             ['libpeer_target_type!="static_library"', {
612               'sources': [
613                 'overrides/initialize_module.cc',
614               ],
615               'conditions': [
616                 ['OS!="mac" and OS!="android"', {
617                   'sources': [
618                     'overrides/allocator_shim/allocator_proxy.cc',
619                   ],
620                 }],
621               ],
622             }],
623             ['"<(libpeer_target_type)"!="static_library"', {
624               # Used to control symbol export/import.
625               'defines': [ 'LIBPEERCONNECTION_IMPLEMENTATION=1' ],
626             }],
627             ['OS=="win" and "<(libpeer_target_type)"!="static_library"', {
628               'link_settings': {
629                 'libraries': [
630                   '-lsecur32.lib',
631                   '-lcrypt32.lib',
632                   '-liphlpapi.lib',
633                 ],
634               },
635             }],
636             ['OS!="win" and "<(libpeer_target_type)"!="static_library"', {
637               'cflags': [
638                 # For compatibility with how we export symbols from this
639                 # target on Windows.  This also prevents the linker from
640                 # picking up symbols from this target that should be linked
641                 # in from other libjingle libs.
642                 '-fvisibility=hidden',
643               ],
644             }],
645             ['OS=="mac" and libpeer_target_type!="static_library"', {
646               'product_name': 'libpeerconnection',
647             }],
648             ['OS=="android" and "<(libpeer_target_type)"=="static_library"', {
649               'standalone_static_library': 1,
650             }],
651             ['OS=="linux" and libpeer_target_type!="static_library"', {
652               # The installer and various tools depend on finding the .so
653               # in this directory and not lib.target as will otherwise be
654               # the case with make builds.
655               'product_dir': '<(PRODUCT_DIR)/lib',
656             }],
657           ],
658         },  # target libpeerconnection
659       ],
660     }],
661     ['enable_webrtc==1 and OS=="android" and "<(libpeer_target_type)"=="static_library"', {
662       'targets': [
663         {
664           # GN version: //third_party/libjingle:libjingle_peerconnection_so
665           'target_name': 'libjingle_peerconnection_so',
666           'type': 'shared_library',
667           'dependencies': [
668             '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
669             'libjingle_webrtc',
670             'libpeerconnection',
671           ],
672           'sources': [
673             '<(libjingle_source)/talk/app/webrtc/java/jni/peerconnection_jni.cc',
674           ],
675         },
676         {
677           # GN version: //third_party/libjingle:libjingle_peerconnection_java
678           'target_name': 'libjingle_peerconnection_javalib',
679           'type': 'none',
680           'variables': {
681             'java_in_dir': '<(libjingle_source)/talk/app/webrtc/java',
682           },
683           'dependencies': [
684             'libjingle_peerconnection_so',
685           ],
686           'includes': [ '../../build/java.gypi' ],
687         },
688       ],
689     }],
690   ],