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