blob: 39ab843813f279a7938fb69a368edc88d1ef7560 [file] [log] [blame]
henrike@webrtc.org28e20752013-07-10 00:45:36 +00001#
2# libjingle
3# Copyright 2012, Google Inc.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are met:
7#
8# 1. Redistributions of source code must retain the above copyright notice,
9# this list of conditions and the following disclaimer.
10# 2. Redistributions in binary form must reproduce the above copyright notice,
11# this list of conditions and the following disclaimer in the documentation
12# and/or other materials provided with the distribution.
13# 3. The name of the author may not be used to endorse or promote products
14# derived from this software without specific prior written permission.
15#
16# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
17# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
19# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26#
27
28{
29 'includes': ['build/common.gypi'],
30
31 'conditions': [
32 ['os_posix == 1 and OS != "mac" and OS != "ios"', {
33 'conditions': [
34 ['sysroot!=""', {
35 'variables': {
36 'pkg-config': '../../../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
37 },
38 }, {
39 'variables': {
40 'pkg-config': 'pkg-config'
41 },
42 }],
43 ],
44 }],
45
46 ['OS=="linux" or OS=="android"', {
47 'targets': [
48 {
49 'target_name': 'libjingle_peerconnection_so',
50 'type': 'loadable_module',
51 'dependencies': [
52 'libjingle_peerconnection',
53 '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
54 ],
55 'sources': [
56 'app/webrtc/java/jni/peerconnection_jni.cc'
57 ],
58 'conditions': [
59 ['OS=="linux"', {
60 'defines': [
61 'HAVE_GTK',
62 ],
63 'include_dirs': [
64 '<(java_home)/include',
65 '<(java_home)/include/linux',
66 ],
67 'link_settings': {
68 'libraries': [
69 '<!@(pkg-config --libs-only-l gobject-2.0 gthread-2.0'
70 ' gtk+-2.0)',
71 ],
72 },
73 }],
74 ],
75 },
76 {
77 'target_name': 'libjingle_peerconnection_jar',
78 'type': 'none',
79 'actions': [
80 {
81 'variables': {
82 'java_src_dir': 'app/webrtc/java/src',
83 'webrtc_modules_dir': '<(DEPTH)/third_party/webrtc/modules',
84 'peerconnection_java_files': [
85 'app/webrtc/java/src/org/webrtc/AudioSource.java',
86 'app/webrtc/java/src/org/webrtc/AudioTrack.java',
87 'app/webrtc/java/src/org/webrtc/IceCandidate.java',
88 'app/webrtc/java/src/org/webrtc/MediaConstraints.java',
89 'app/webrtc/java/src/org/webrtc/MediaSource.java',
90 'app/webrtc/java/src/org/webrtc/MediaStream.java',
91 'app/webrtc/java/src/org/webrtc/MediaStreamTrack.java',
92 'app/webrtc/java/src/org/webrtc/PeerConnectionFactory.java',
93 'app/webrtc/java/src/org/webrtc/PeerConnection.java',
94 'app/webrtc/java/src/org/webrtc/SdpObserver.java',
95 'app/webrtc/java/src/org/webrtc/StatsObserver.java',
96 'app/webrtc/java/src/org/webrtc/StatsReport.java',
97 'app/webrtc/java/src/org/webrtc/SessionDescription.java',
98 'app/webrtc/java/src/org/webrtc/VideoCapturer.java',
99 'app/webrtc/java/src/org/webrtc/VideoRenderer.java',
100 'app/webrtc/java/src/org/webrtc/VideoSource.java',
101 'app/webrtc/java/src/org/webrtc/VideoTrack.java',
102 ],
103 # TODO(fischman): extract this into a webrtc gyp var that can be
104 # included here, or better yet, build a proper .jar in webrtc
105 # and include it here.
106 'android_java_files': [
107 '<(webrtc_modules_dir)/audio_device/android/org/webrtc/voiceengine/WebRTCAudioDevice.java',
108 '<(webrtc_modules_dir)/video_capture/android/java/org/webrtc/videoengine/CaptureCapabilityAndroid.java',
109 '<(webrtc_modules_dir)/video_capture/android/java/org/webrtc/videoengine/VideoCaptureAndroid.java',
110 '<(webrtc_modules_dir)/video_capture/android/java/org/webrtc/videoengine/VideoCaptureDeviceInfoAndroid.java',
111 '<(webrtc_modules_dir)/video_render/android/java/org/webrtc/videoengine/ViEAndroidGLES20.java',
112 '<(webrtc_modules_dir)/video_render/android/java/org/webrtc/videoengine/ViERenderer.java',
113 '<(webrtc_modules_dir)/video_render/android/java/org/webrtc/videoengine/ViESurfaceRenderer.java',
114 ],
115 },
116 'action_name': 'create_jar',
117 'inputs': [
118 'build/build_jar.sh',
119 '<@(java_files)',
120 ],
121 'outputs': [
122 '<(PRODUCT_DIR)/libjingle_peerconnection.jar',
123 ],
124 'conditions': [
125 ['OS=="android"', {
126 'variables': {
127 'java_files': ['<@(peerconnection_java_files)', '<@(android_java_files)'],
128 'build_classpath': '<(java_src_dir):<(DEPTH)/third_party/android_tools/sdk/platforms/android-<(android_sdk_version)/android.jar',
129 },
130 }, {
131 'variables': {
132 'java_files': ['<@(peerconnection_java_files)'],
133 'build_classpath': '<(java_src_dir)',
134 },
135 }],
136 ],
137 'action': [
138 'build/build_jar.sh', '<(java_home)', '<@(_outputs)',
139 '<(INTERMEDIATE_DIR)',
140 '<(build_classpath)',
141 '<@(java_files)'
142 ],
143 },
144 ],
145 'dependencies': [
146 'libjingle_peerconnection_so',
147 ],
148 },
149 ],
150 }],
151 ['libjingle_objc == 1', {
152 'targets': [
153 {
154 'target_name': 'libjingle_peerconnection_objc',
155 'type': 'static_library',
156 'dependencies': [
157 'libjingle_peerconnection',
158 ],
159 'sources': [
160 'app/webrtc/objc/RTCAudioTrack+Internal.h',
161 'app/webrtc/objc/RTCAudioTrack.mm',
162 'app/webrtc/objc/RTCEnumConverter.h',
163 'app/webrtc/objc/RTCEnumConverter.mm',
164 'app/webrtc/objc/RTCI420Frame.mm',
165 'app/webrtc/objc/RTCIceCandidate+Internal.h',
166 'app/webrtc/objc/RTCIceCandidate.mm',
167 'app/webrtc/objc/RTCIceServer+Internal.h',
168 'app/webrtc/objc/RTCIceServer.mm',
169 'app/webrtc/objc/RTCMediaConstraints+Internal.h',
170 'app/webrtc/objc/RTCMediaConstraints.mm',
171 'app/webrtc/objc/RTCMediaConstraintsNative.cc',
172 'app/webrtc/objc/RTCMediaConstraintsNative.h',
173 'app/webrtc/objc/RTCMediaSource+Internal.h',
174 'app/webrtc/objc/RTCMediaSource.mm',
175 'app/webrtc/objc/RTCMediaStream+Internal.h',
176 'app/webrtc/objc/RTCMediaStream.mm',
177 'app/webrtc/objc/RTCMediaStreamTrack+Internal.h',
178 'app/webrtc/objc/RTCMediaStreamTrack.mm',
179 'app/webrtc/objc/RTCPair.m',
180 'app/webrtc/objc/RTCPeerConnection+Internal.h',
181 'app/webrtc/objc/RTCPeerConnection.mm',
182 'app/webrtc/objc/RTCPeerConnectionFactory.mm',
183 'app/webrtc/objc/RTCPeerConnectionObserver.h',
184 'app/webrtc/objc/RTCPeerConnectionObserver.mm',
185 'app/webrtc/objc/RTCSessionDescription+Internal.h',
186 'app/webrtc/objc/RTCSessionDescription.mm',
187 'app/webrtc/objc/RTCVideoCapturer+Internal.h',
188 'app/webrtc/objc/RTCVideoCapturer.mm',
189 'app/webrtc/objc/RTCVideoRenderer+Internal.h',
190 'app/webrtc/objc/RTCVideoRenderer.mm',
191 'app/webrtc/objc/RTCVideoSource+Internal.h',
192 'app/webrtc/objc/RTCVideoSource.mm',
193 'app/webrtc/objc/RTCVideoTrack+Internal.h',
194 'app/webrtc/objc/RTCVideoTrack.mm',
195 'app/webrtc/objc/public/RTCAudioSource.h',
196 'app/webrtc/objc/public/RTCAudioTrack.h',
197 'app/webrtc/objc/public/RTCI420Frame.h',
198 'app/webrtc/objc/public/RTCIceCandidate.h',
199 'app/webrtc/objc/public/RTCIceServer.h',
200 'app/webrtc/objc/public/RTCMediaConstraints.h',
201 'app/webrtc/objc/public/RTCMediaSource.h',
202 'app/webrtc/objc/public/RTCMediaStream.h',
203 'app/webrtc/objc/public/RTCMediaStreamTrack.h',
204 'app/webrtc/objc/public/RTCPair.h',
205 'app/webrtc/objc/public/RTCPeerConnection.h',
206 'app/webrtc/objc/public/RTCPeerConnectionDelegate.h',
207 'app/webrtc/objc/public/RTCPeerConnectionFactory.h',
208 'app/webrtc/objc/public/RTCSessionDescription.h',
209 'app/webrtc/objc/public/RTCSessionDescriptonDelegate.h',
210 'app/webrtc/objc/public/RTCTypes.h',
211 'app/webrtc/objc/public/RTCVideoCapturer.h',
212 'app/webrtc/objc/public/RTCVideoRenderer.h',
213 'app/webrtc/objc/public/RTCVideoRendererDelegate.h',
214 'app/webrtc/objc/public/RTCVideoSource.h',
215 'app/webrtc/objc/public/RTCVideoTrack.h',
216 ],
217 'include_dirs': [
218 '<(DEPTH)/talk/app/webrtc',
219 '<(DEPTH)/talk/app/webrtc/objc',
220 '<(DEPTH)/talk/app/webrtc/objc/public',
221 ],
222 'link_settings': {
223 'libraries': [
224 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
225 ],
226 },
227 'xcode_settings': {
228 'CLANG_ENABLE_OBJC_ARC': 'YES',
229 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'NO',
230 'CLANG_LINK_OBJC_RUNTIME': 'YES',
231 },
232 }
233 ]
234 }],
235 ],
236
237 'targets': [
238 {
239 'target_name': 'libjingle',
240 'type': 'static_library',
241 'dependencies': [
242 '<(DEPTH)/third_party/expat/expat.gyp:expat',
243 '<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
244 ],
245 'export_dependent_settings': [
246 '<(DEPTH)/third_party/expat/expat.gyp:expat',
247 '<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
248 ],
249 'sources': [
250 'base/asyncfile.cc',
251 'base/asyncfile.h',
252 'base/asynchttprequest.cc',
253 'base/asynchttprequest.h',
254 'base/asyncpacketsocket.h',
255 'base/asyncsocket.cc',
256 'base/asyncsocket.h',
257 'base/asynctcpsocket.cc',
258 'base/asynctcpsocket.h',
259 'base/asyncudpsocket.cc',
260 'base/asyncudpsocket.h',
261 'base/atomicops.h',
262 'base/autodetectproxy.cc',
263 'base/autodetectproxy.h',
264 'base/bandwidthsmoother.cc',
265 'base/bandwidthsmoother.h',
266 'base/base64.cc',
267 'base/base64.h',
268 'base/basicdefs.h',
269 'base/basictypes.h',
270 'base/bind.h',
271 'base/buffer.h',
272 'base/bytebuffer.cc',
273 'base/bytebuffer.h',
274 'base/byteorder.h',
275 'base/checks.cc',
276 'base/checks.h',
277 'base/common.cc',
278 'base/common.h',
279 'base/constructormagic.h',
280 'base/cpumonitor.cc',
281 'base/cpumonitor.h',
282 'base/crc32.cc',
283 'base/crc32.h',
284 'base/criticalsection.h',
285 'base/cryptstring.h',
286 'base/diskcache.cc',
287 'base/diskcache.h',
288 'base/event.cc',
289 'base/event.h',
290 'base/filelock.cc',
291 'base/filelock.h',
292 'base/fileutils.cc',
293 'base/fileutils.h',
294 'base/fileutils_mock.h',
295 'base/firewallsocketserver.cc',
296 'base/firewallsocketserver.h',
297 'base/flags.cc',
298 'base/flags.h',
299 'base/gunit_prod.h',
300 'base/helpers.cc',
301 'base/helpers.h',
302 'base/host.cc',
303 'base/host.h',
304 'base/httpbase.cc',
305 'base/httpbase.h',
306 'base/httpclient.cc',
307 'base/httpclient.h',
308 'base/httpcommon-inl.h',
309 'base/httpcommon.cc',
310 'base/httpcommon.h',
311 'base/httprequest.cc',
312 'base/httprequest.h',
313 'base/httpserver.cc',
314 'base/httpserver.h',
315 'base/ifaddrs-android.cc',
316 'base/ifaddrs-android.h',
317 'base/ipaddress.cc',
318 'base/ipaddress.h',
319 'base/json.cc',
320 'base/json.h',
321 'base/linked_ptr.h',
322 'base/linuxfdwalk.h',
323 'base/logging.cc',
324 'base/logging.h',
325 'base/maccocoathreadhelper.h',
326 'base/maccocoathreadhelper.mm',
327 'base/mathutils.h',
328 'base/md5.cc',
329 'base/md5.h',
330 'base/md5digest.h',
331 'base/messagedigest.cc',
332 'base/messagedigest.h',
333 'base/messagehandler.cc',
334 'base/messagehandler.h',
335 'base/messagequeue.cc',
336 'base/messagequeue.h',
337 'base/multipart.cc',
338 'base/multipart.h',
339 'base/natserver.cc',
340 'base/natserver.h',
341 'base/natsocketfactory.cc',
342 'base/natsocketfactory.h',
343 'base/nattypes.cc',
344 'base/nattypes.h',
345 'base/nethelpers.cc',
346 'base/nethelpers.h',
347 'base/network.cc',
348 'base/network.h',
349 'base/nssidentity.cc',
350 'base/nssidentity.h',
351 'base/nssstreamadapter.cc',
352 'base/nssstreamadapter.h',
353 'base/nullsocketserver.h',
354 'base/optionsfile.cc',
355 'base/optionsfile.h',
356 'base/pathutils.cc',
357 'base/pathutils.h',
358 'base/physicalsocketserver.cc',
359 'base/physicalsocketserver.h',
360 'base/profiler.cc',
361 'base/profiler.h',
362 'base/proxydetect.cc',
363 'base/proxydetect.h',
364 'base/proxyinfo.cc',
365 'base/proxyinfo.h',
366 'base/proxyserver.cc',
367 'base/proxyserver.h',
368 'base/ratelimiter.cc',
369 'base/ratelimiter.h',
370 'base/ratetracker.cc',
371 'base/ratetracker.h',
372 'base/refcount.h',
373 'base/referencecountedsingletonfactory.h',
374 'base/rollingaccumulator.h',
375 'base/scoped_autorelease_pool.h',
376 'base/scoped_ptr.h',
377 'base/scoped_ref_ptr.h',
378 'base/sec_buffer.h',
379 'base/sha1.cc',
380 'base/sha1.h',
381 'base/sha1digest.h',
382 'base/sharedexclusivelock.cc',
383 'base/sharedexclusivelock.h',
384 'base/signalthread.cc',
385 'base/signalthread.h',
386 'base/sigslot.h',
387 'base/sigslotrepeater.h',
388 'base/socket.h',
389 'base/socketadapters.cc',
390 'base/socketadapters.h',
391 'base/socketaddress.cc',
392 'base/socketaddress.h',
393 'base/socketaddresspair.cc',
394 'base/socketaddresspair.h',
395 'base/socketfactory.h',
396 'base/socketpool.cc',
397 'base/socketpool.h',
398 'base/socketserver.h',
399 'base/socketstream.cc',
400 'base/socketstream.h',
401 'base/ssladapter.cc',
402 'base/ssladapter.h',
403 'base/sslconfig.h',
404 'base/sslfingerprint.h',
405 'base/sslidentity.cc',
406 'base/sslidentity.h',
407 'base/sslroots.h',
408 'base/sslsocketfactory.cc',
409 'base/sslsocketfactory.h',
410 'base/sslstreamadapter.cc',
411 'base/sslstreamadapter.h',
412 'base/sslstreamadapterhelper.cc',
413 'base/sslstreamadapterhelper.h',
414 'base/stream.cc',
415 'base/stream.h',
416 'base/stringdigest.h',
417 'base/stringencode.cc',
418 'base/stringencode.h',
419 'base/stringutils.cc',
420 'base/stringutils.h',
421 'base/systeminfo.cc',
422 'base/systeminfo.h',
423 'base/task.cc',
424 'base/task.h',
425 'base/taskparent.cc',
426 'base/taskparent.h',
427 'base/taskrunner.cc',
428 'base/taskrunner.h',
429 'base/testclient.cc',
430 'base/testclient.h',
431 'base/thread.cc',
432 'base/thread.h',
433 'base/timeutils.cc',
434 'base/timeutils.h',
435 'base/timing.cc',
436 'base/timing.h',
437 'base/transformadapter.cc',
438 'base/transformadapter.h',
439 'base/urlencode.cc',
440 'base/urlencode.h',
441 'base/versionparsing.cc',
442 'base/versionparsing.h',
443 'base/virtualsocketserver.cc',
444 'base/virtualsocketserver.h',
445 'base/window.h',
446 'base/windowpicker.h',
447 'base/windowpickerfactory.h',
448 'base/worker.cc',
449 'base/worker.h',
450 'xmllite/qname.cc',
451 'xmllite/qname.h',
452 'xmllite/xmlbuilder.cc',
453 'xmllite/xmlbuilder.h',
454 'xmllite/xmlconstants.cc',
455 'xmllite/xmlconstants.h',
456 'xmllite/xmlelement.cc',
457 'xmllite/xmlelement.h',
458 'xmllite/xmlnsstack.cc',
459 'xmllite/xmlnsstack.h',
460 'xmllite/xmlparser.cc',
461 'xmllite/xmlparser.h',
462 'xmllite/xmlprinter.cc',
463 'xmllite/xmlprinter.h',
464 'xmpp/asyncsocket.h',
465 'xmpp/chatroommodule.h',
466 'xmpp/chatroommoduleimpl.cc',
467 'xmpp/constants.cc',
468 'xmpp/constants.h',
469 'xmpp/discoitemsquerytask.cc',
470 'xmpp/discoitemsquerytask.h',
471 'xmpp/hangoutpubsubclient.cc',
472 'xmpp/hangoutpubsubclient.h',
473 'xmpp/iqtask.cc',
474 'xmpp/iqtask.h',
475 'xmpp/jid.cc',
476 'xmpp/jid.h',
477 'xmpp/module.h',
478 'xmpp/moduleimpl.cc',
479 'xmpp/moduleimpl.h',
480 'xmpp/mucroomconfigtask.cc',
481 'xmpp/mucroomconfigtask.h',
482 'xmpp/mucroomdiscoverytask.cc',
483 'xmpp/mucroomdiscoverytask.h',
484 'xmpp/mucroomlookuptask.cc',
485 'xmpp/mucroomlookuptask.h',
486 'xmpp/mucroomuniquehangoutidtask.cc',
487 'xmpp/mucroomuniquehangoutidtask.h',
488 'xmpp/pingtask.cc',
489 'xmpp/pingtask.h',
490 'xmpp/plainsaslhandler.h',
491 'xmpp/presenceouttask.cc',
492 'xmpp/presenceouttask.h',
493 'xmpp/presencereceivetask.cc',
494 'xmpp/presencereceivetask.h',
495 'xmpp/presencestatus.cc',
496 'xmpp/presencestatus.h',
497 'xmpp/prexmppauth.h',
498 'xmpp/pubsub_task.cc',
499 'xmpp/pubsub_task.h',
500 'xmpp/pubsubclient.cc',
501 'xmpp/pubsubclient.h',
502 'xmpp/pubsubtasks.cc',
503 'xmpp/pubsubtasks.h',
504 'xmpp/receivetask.cc',
505 'xmpp/receivetask.h',
506 'xmpp/rostermodule.h',
507 'xmpp/rostermoduleimpl.cc',
508 'xmpp/rostermoduleimpl.h',
509 'xmpp/saslcookiemechanism.h',
510 'xmpp/saslhandler.h',
511 'xmpp/saslmechanism.cc',
512 'xmpp/saslmechanism.h',
513 'xmpp/saslplainmechanism.h',
514 'xmpp/xmppauth.cc',
515 'xmpp/xmppauth.h',
516 'xmpp/xmppclient.cc',
517 'xmpp/xmppclient.h',
518 'xmpp/xmppclientsettings.h',
519 'xmpp/xmppengine.h',
520 'xmpp/xmppengineimpl.cc',
521 'xmpp/xmppengineimpl.h',
522 'xmpp/xmppengineimpl_iq.cc',
523 'xmpp/xmpplogintask.cc',
524 'xmpp/xmpplogintask.h',
525 'xmpp/xmpppump.cc',
526 'xmpp/xmpppump.h',
527 'xmpp/xmppsocket.cc',
528 'xmpp/xmppsocket.h',
529 'xmpp/xmppstanzaparser.cc',
530 'xmpp/xmppstanzaparser.h',
531 'xmpp/xmpptask.cc',
532 'xmpp/xmpptask.h',
533 'xmpp/xmppthread.cc',
534 'xmpp/xmppthread.h',
535 ],
536 'conditions': [
537 ['OS=="mac" or OS=="ios" or OS=="win"', {
538 'dependencies': [
539 # The chromium copy of nss should NOT be used on platforms that
540 # have NSS as system libraries, such as linux.
541 '<(DEPTH)/third_party/nss/nss.gyp:nss',
542 ],
543 }],
544 ['OS=="android"', {
545 'sources': [
546 'base/ifaddrs-android.cc',
547 ],
548 'link_settings': {
549 'libraries': [
550 '-llog',
551 '-lGLESv2',
552 ],
553 },
554 }],
555 ['OS=="linux" or OS=="android"', {
556 'sources': [
557 'base/linux.cc',
558 'base/linux.h',
559 ],
560 }],
561 ['OS=="linux"', {
562 'sources': [
563 'base/dbus.cc',
564 'base/dbus.h',
565 'base/libdbusglibsymboltable.cc',
566 'base/libdbusglibsymboltable.h',
567 'base/linuxfdwalk.c',
568 'base/linuxwindowpicker.cc',
569 'base/linuxwindowpicker.h',
570 ],
571 'link_settings': {
572 'libraries': [
573 '-lcrypto',
574 '-ldl',
575 '-lrt',
576 '-lssl',
577 '-lXext',
578 '-lX11',
579 '-lXcomposite',
580 '-lXrender',
581 '<!@(<(pkg-config) --libs-only-l nss | sed -e "s/-lssl3//")',
582 ],
583 },
584 'cflags': [
585 '<!@(<(pkg-config) --cflags nss)',
586 ],
587 'ldflags': [
588 '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
589 ],
590 }],
591 ['OS=="mac"', {
592 'conditions': [
593 [ 'libjingle_objc != 1', {
594 'sources': [
595 'base/macasyncsocket.cc',
596 'base/macasyncsocket.h',
597 'base/maccocoasocketserver.h',
598 'base/maccocoasocketserver.mm',
599 'base/macsocketserver.cc',
600 'base/macsocketserver.h',
601 ],
602 'link_settings' :{
603 'xcode_settings': {
604 'OTHER_LDFLAGS': [
605 '-framework Carbon',
606 ],
607 },
608 },
609 }, {
610 'defines': [
611 'CARBON_DEPRECATED=YES',
612 ],
613 }],
614 ],
615 'sources': [
616 'base/macconversion.cc',
617 'base/macconversion.h',
618 'base/macutils.cc',
619 'base/macutils.h',
620 'base/macwindowpicker.cc',
621 'base/macwindowpicker.h',
622 'base/scoped_autorelease_pool.mm',
623 ],
624 'link_settings': {
625 'libraries': [
626 '$(SDKROOT)/usr/lib/libcrypto.dylib',
627 '$(SDKROOT)/usr/lib/libssl.dylib',
628 ],
629 'xcode_settings': {
630 'OTHER_LDFLAGS': [
631 '-framework Cocoa',
632 '-framework IOKit',
633 '-framework Security',
634 '-framework SystemConfiguration',
635 ],
636 },
637 },
638 }],
639 ['OS=="ios"', {
640 # 'dependencies': [
641 # '<(DEPTH)/third_party/openssl/openssl.gyp:openssl',
642 # ],
643 # 'include_dirs': [
644 # '<(DEPTH)/third_party/openssl/openssl/include',
645 # ],
646 'sources': [
647 'base/scoped_autorelease_pool.mm',
648 ],
649 'xcode_settings': {
650 'OTHER_LDFLAGS': [
651 '-framework IOKit',
652 '-framework Security',
653 '-framework SystemConfiguration',
654 '-framework UIKit',
655 ],
656 },
657 'defines': [
658 'SSL_USE_NSS',
659 ],
660 }],
661 ['OS=="win"', {
662 'sources': [
663 'base/diskcache_win32.cc',
664 'base/diskcache_win32.h',
665 'base/schanneladapter.cc',
666 'base/schanneladapter.h',
667 'base/win32.cc',
668 'base/win32.h',
669 'base/win32filesystem.cc',
670 'base/win32filesystem.h',
671 'base/win32regkey.cc',
672 'base/win32regkey.h',
673 'base/win32securityerrors.cc',
674 'base/win32socketinit.cc',
675 'base/win32socketinit.h',
676 'base/win32socketserver.cc',
677 'base/win32socketserver.h',
678 'base/win32window.cc',
679 'base/win32window.h',
680 'base/win32windowpicker.cc',
681 'base/win32windowpicker.h',
682 'base/winfirewall.cc',
683 'base/winfirewall.h',
684 'base/winping.cc',
685 'base/winping.h',
686 ],
687 # Suppress warnings about WIN32_LEAN_AND_MEAN.
688 'msvs_disabled_warnings': [4005],
689 'msvs_settings': {
690 'VCLibrarianTool': {
691 'AdditionalDependencies': [
692 'crypt32.lib',
693 'iphlpapi.lib',
694 'secur32.lib',
695 ],
696 },
697 },
698 }],
699 ['os_posix==1', {
700 'sources': [
701 'base/latebindingsymboltable.cc',
702 'base/latebindingsymboltable.h',
703 'base/posix.cc',
704 'base/posix.h',
705 'base/unixfilesystem.cc',
706 'base/unixfilesystem.h',
707 ],
708 'conditions': [
709 ['OS=="linux" or OS=="android"', {
710 'dependencies': [
711 '<(DEPTH)/third_party/openssl/openssl.gyp:openssl',
712 ],
713 }],
714 ['OS!="ios"', {
715 'sources': [
716 'base/openssladapter.cc',
717 'base/openssladapter.h',
718 'base/openssldigest.cc',
719 'base/openssldigest.h',
720 'base/opensslidentity.cc',
721 'base/opensslidentity.h',
722 'base/opensslstreamadapter.cc',
723 'base/opensslstreamadapter.h',
724 ],
725 }],
726 ],
727 }],
728 ], # conditions
729 }, # target libjingle
730 {
731 'target_name': 'libjingle_sound',
732 'type': 'static_library',
733 'dependencies': [
734 'libjingle',
735 ],
736 'sources': [
737 'sound/automaticallychosensoundsystem.h',
738 'sound/nullsoundsystem.cc',
739 'sound/nullsoundsystem.h',
740 'sound/nullsoundsystemfactory.cc',
741 'sound/nullsoundsystemfactory.h',
742 'sound/platformsoundsystem.cc',
743 'sound/platformsoundsystem.h',
744 'sound/platformsoundsystemfactory.cc',
745 'sound/platformsoundsystemfactory.h',
746 'sound/sounddevicelocator.h',
747 'sound/soundinputstreaminterface.h',
748 'sound/soundoutputstreaminterface.h',
749 'sound/soundsystemfactory.h',
750 'sound/soundsysteminterface.cc',
751 'sound/soundsysteminterface.h',
752 'sound/soundsystemproxy.cc',
753 'sound/soundsystemproxy.h',
754 ],
755 'conditions': [
756 ['OS=="linux"', {
757 'sources': [
758 'sound/alsasoundsystem.cc',
759 'sound/alsasoundsystem.h',
760 'sound/alsasymboltable.cc',
761 'sound/alsasymboltable.h',
762 'sound/linuxsoundsystem.cc',
763 'sound/linuxsoundsystem.h',
764 'sound/pulseaudiosoundsystem.cc',
765 'sound/pulseaudiosoundsystem.h',
766 'sound/pulseaudiosymboltable.cc',
767 'sound/pulseaudiosymboltable.h',
768 ],
769 }],
770 ],
771 }, # target libjingle_sound
772 {
773 'target_name': 'libjingle_media',
774 'type': 'static_library',
775 'dependencies': [
776 '<(DEPTH)/third_party/libyuv/libyuv.gyp:libyuv',
777 '<(DEPTH)/third_party/webrtc/modules/modules.gyp:video_capture_module',
778 '<(DEPTH)/third_party/webrtc/modules/modules.gyp:video_render_module',
779 '<(DEPTH)/third_party/webrtc/video_engine/video_engine.gyp:video_engine_core',
780 '<(DEPTH)/third_party/webrtc/voice_engine/voice_engine.gyp:voice_engine',
781 '<(DEPTH)/third_party/webrtc/system_wrappers/source/system_wrappers.gyp:system_wrappers',
782 'libjingle',
783 'libjingle_sound',
784 ],
785 'direct_dependent_settings': {
786 'include_dirs': [
787 '<(DEPTH)/third_party/libyuv/include',
788 ],
789 },
790 'sources': [
791 'media/base/audioframe.h',
792 'media/base/audiorenderer.h',
793 'media/base/capturemanager.cc',
794 'media/base/capturemanager.h',
795 'media/base/capturerenderadapter.cc',
796 'media/base/capturerenderadapter.h',
797 'media/base/codec.cc',
798 'media/base/codec.h',
799 'media/base/constants.cc',
800 'media/base/constants.h',
801 'media/base/cpuid.cc',
802 'media/base/cpuid.h',
803 'media/base/cryptoparams.h',
804 'media/base/filemediaengine.cc',
805 'media/base/filemediaengine.h',
806 'media/base/hybriddataengine.h',
807 'media/base/hybridvideoengine.cc',
808 'media/base/hybridvideoengine.h',
809 'media/base/mediachannel.h',
810 'media/base/mediacommon.h',
811 'media/base/mediaengine.cc',
812 'media/base/mediaengine.h',
813 'media/base/mutedvideocapturer.cc',
814 'media/base/mutedvideocapturer.h',
815 'media/base/rtpdataengine.cc',
816 'media/base/rtpdataengine.h',
817 'media/base/rtpdump.cc',
818 'media/base/rtpdump.h',
819 'media/base/rtputils.cc',
820 'media/base/rtputils.h',
821 'media/base/screencastid.h',
822 'media/base/streamparams.cc',
823 'media/base/streamparams.h',
824 'media/base/videoadapter.cc',
825 'media/base/videoadapter.h',
826 'media/base/videocapturer.cc',
827 'media/base/videocapturer.h',
828 'media/base/videocommon.cc',
829 'media/base/videocommon.h',
830 'media/base/videoframe.cc',
831 'media/base/videoframe.h',
832 'media/base/videoprocessor.h',
833 'media/base/videorenderer.h',
834 'media/base/voiceprocessor.h',
835 'media/devices/deviceinfo.h',
836 'media/devices/devicemanager.cc',
837 'media/devices/devicemanager.h',
838 'media/devices/dummydevicemanager.h',
839 'media/devices/filevideocapturer.cc',
840 'media/devices/filevideocapturer.h',
841 'media/devices/videorendererfactory.h',
842 'media/other/linphonemediaengine.h',
843 # TODO(ronghuawu): Enable when SCTP is ready.
844 # 'media/sctp/sctpdataengine.cc',
845 # 'media/sctp/sctpdataengine.h',
846 'media/webrtc/webrtccommon.h',
847 'media/webrtc/webrtcexport.h',
848 'media/webrtc/webrtcmediaengine.h',
849 'media/webrtc/webrtcpassthroughrender.cc',
850 'media/webrtc/webrtcpassthroughrender.h',
851 'media/webrtc/webrtcvideocapturer.cc',
852 'media/webrtc/webrtcvideocapturer.h',
853 'media/webrtc/webrtcvideodecoderfactory.h',
854 'media/webrtc/webrtcvideoencoderfactory.h',
855 'media/webrtc/webrtcvideoengine.cc',
856 'media/webrtc/webrtcvideoengine.h',
857 'media/webrtc/webrtcvideoframe.cc',
858 'media/webrtc/webrtcvideoframe.h',
859 'media/webrtc/webrtcvie.h',
860 'media/webrtc/webrtcvoe.h',
861 'media/webrtc/webrtcvoiceengine.cc',
862 'media/webrtc/webrtcvoiceengine.h',
863 ],
864 'conditions': [
865 ['OS=="linux"', {
866 'sources': [
867 'media/devices/gtkvideorenderer.cc',
868 'media/devices/gtkvideorenderer.h',
869 'media/devices/libudevsymboltable.cc',
870 'media/devices/libudevsymboltable.h',
871 'media/devices/linuxdeviceinfo.cc',
872 'media/devices/linuxdevicemanager.cc',
873 'media/devices/linuxdevicemanager.h',
874 'media/devices/v4llookup.cc',
875 'media/devices/v4llookup.h',
876 ],
877 'include_dirs': [
878 'third_party/libudev'
879 ],
880 'cflags': [
881 '<!@(pkg-config --cflags gobject-2.0 gthread-2.0 gtk+-2.0)',
882 ],
883 'libraries': [
884 '-lrt',
885 '-lXext',
886 '-lX11',
887 ],
888 }],
889 ['OS=="win"', {
890 'sources': [
891 'media/devices/gdivideorenderer.cc',
892 'media/devices/gdivideorenderer.h',
893 'media/devices/win32deviceinfo.cc',
894 'media/devices/win32devicemanager.cc',
895 'media/devices/win32devicemanager.h',
896 ],
897 'msvs_settings': {
898 'VCLibrarianTool': {
899 'AdditionalDependencies': [
900 'd3d9.lib',
901 'gdi32.lib',
902 'strmiids.lib',
903 'winmm.lib',
904 ],
905 },
906 },
907 }],
908 ['OS=="mac"', {
909 'sources': [
910 'media/devices/macdeviceinfo.cc',
911 'media/devices/macdevicemanager.cc',
912 'media/devices/macdevicemanager.h',
913 'media/devices/macdevicemanagermm.mm',
914 ],
915 'conditions': [
916 # TODO(hughv): Investigate if this is needed.
917 [ 'libjingle_objc != 1', {
918 'sources': [
919 'media/devices/carbonvideorenderer.cc',
920 'media/devices/carbonvideorenderer.h',
921 ],
922 }],
923 ],
924 'xcode_settings': {
925 'WARNING_CFLAGS': [
926 # TODO(ronghuawu): Update macdevicemanager.cc to stop using
927 # deprecated functions and remove this flag.
928 '-Wno-deprecated-declarations',
929 ],
930 },
931 'link_settings': {
932 'xcode_settings': {
933 'OTHER_LDFLAGS': [
934 '-framework Cocoa',
935 '-framework CoreAudio',
936 '-framework CoreVideo',
937 '-framework OpenGL',
938 '-framework QTKit',
939 ],
940 },
941 },
942 }],
943 ['OS=="ios"', {
944 'sources': [
945 'media/devices/iosdeviceinfo.cc',
946 'media/devices/mobiledevicemanager.cc',
947 ],
948 'include_dirs': [
949 # TODO(sjlee) Remove when vp8 is building for iOS. vp8 pulls in
950 # libjpeg which pulls in libyuv which currently disabled.
951 '../third_party/libyuv/include',
952 ],
953 }],
954 ['OS=="android"', {
955 'sources': [
956 'media/devices/mobiledevicemanager.cc',
957 ],
958 }],
959 ],
960 }, # target libjingle_media
961 {
962 'target_name': 'libjingle_p2p',
963 'type': 'static_library',
964 'dependencies': [
965 '<(DEPTH)/third_party/libsrtp/libsrtp.gyp:libsrtp',
966 'libjingle',
967 'libjingle_media',
968 ],
969 'include_dirs': [
970 '<(DEPTH)/third_party/gtest/include',
971 ],
972 'direct_dependent_settings': {
973 'include_dirs': [
974 '<(DEPTH)/third_party/gtest/include',
975 ],
976 },
977 'defines': [
978 # TODO(ronghuawu): enable SCTP when it's ready.
979 # 'HAVE_SCTP',
980 ],
981 'sources': [
982 'p2p/base/asyncstuntcpsocket.cc',
983 'p2p/base/asyncstuntcpsocket.h',
984 'p2p/base/basicpacketsocketfactory.cc',
985 'p2p/base/basicpacketsocketfactory.h',
986 'p2p/base/candidate.h',
987 'p2p/base/common.h',
988 'p2p/base/constants.cc',
989 'p2p/base/constants.h',
990 'p2p/base/dtlstransportchannel.cc',
991 'p2p/base/dtlstransportchannel.h',
992 'p2p/base/p2ptransport.cc',
993 'p2p/base/p2ptransport.h',
994 'p2p/base/p2ptransportchannel.cc',
995 'p2p/base/p2ptransportchannel.h',
996 'p2p/base/packetsocketfactory.h',
997 'p2p/base/parsing.cc',
998 'p2p/base/parsing.h',
999 'p2p/base/port.cc',
1000 'p2p/base/port.h',
1001 'p2p/base/portallocator.cc',
1002 'p2p/base/portallocator.h',
1003 'p2p/base/portallocatorsessionproxy.cc',
1004 'p2p/base/portallocatorsessionproxy.h',
1005 'p2p/base/portinterface.h',
1006 'p2p/base/portproxy.cc',
1007 'p2p/base/portproxy.h',
1008 'p2p/base/pseudotcp.cc',
1009 'p2p/base/pseudotcp.h',
1010 'p2p/base/rawtransport.cc',
1011 'p2p/base/rawtransport.h',
1012 'p2p/base/rawtransportchannel.cc',
1013 'p2p/base/rawtransportchannel.h',
1014 'p2p/base/relayport.cc',
1015 'p2p/base/relayport.h',
1016 'p2p/base/relayserver.cc',
1017 'p2p/base/relayserver.h',
1018 'p2p/base/session.cc',
1019 'p2p/base/session.h',
1020 'p2p/base/sessionclient.h',
1021 'p2p/base/sessiondescription.cc',
1022 'p2p/base/sessiondescription.h',
1023 'p2p/base/sessionid.h',
1024 'p2p/base/sessionmanager.cc',
1025 'p2p/base/sessionmanager.h',
1026 'p2p/base/sessionmessages.cc',
1027 'p2p/base/sessionmessages.h',
1028 'p2p/base/stun.cc',
1029 'p2p/base/stun.h',
1030 'p2p/base/stunport.cc',
1031 'p2p/base/stunport.h',
1032 'p2p/base/stunrequest.cc',
1033 'p2p/base/stunrequest.h',
1034 'p2p/base/stunserver.cc',
1035 'p2p/base/stunserver.h',
1036 'p2p/base/tcpport.cc',
1037 'p2p/base/tcpport.h',
1038 'p2p/base/transport.cc',
1039 'p2p/base/transport.h',
1040 'p2p/base/transportchannel.cc',
1041 'p2p/base/transportchannel.h',
1042 'p2p/base/transportchannelimpl.h',
1043 'p2p/base/transportchannelproxy.cc',
1044 'p2p/base/transportchannelproxy.h',
1045 'p2p/base/transportdescription.h',
1046 'p2p/base/transportdescriptionfactory.cc',
1047 'p2p/base/transportdescriptionfactory.h',
1048 'p2p/base/transportinfo.h',
1049 'p2p/base/turnport.cc',
1050 'p2p/base/turnport.h',
1051 'p2p/base/turnserver.cc',
1052 'p2p/base/turnserver.h',
1053 'p2p/base/udpport.h',
1054 'p2p/client/autoportallocator.h',
1055 'p2p/client/basicportallocator.cc',
1056 'p2p/client/basicportallocator.h',
1057 'p2p/client/connectivitychecker.cc',
1058 'p2p/client/connectivitychecker.h',
1059 'p2p/client/httpportallocator.cc',
1060 'p2p/client/httpportallocator.h',
1061 'p2p/client/sessionmanagertask.h',
1062 'p2p/client/sessionsendtask.h',
1063 'p2p/client/socketmonitor.cc',
1064 'p2p/client/socketmonitor.h',
1065 'session/tunnel/pseudotcpchannel.cc',
1066 'session/tunnel/pseudotcpchannel.h',
1067 'session/tunnel/tunnelsessionclient.cc',
1068 'session/tunnel/tunnelsessionclient.h',
1069 'session/tunnel/securetunnelsessionclient.cc',
1070 'session/tunnel/securetunnelsessionclient.h',
1071 'session/media/audiomonitor.cc',
1072 'session/media/audiomonitor.h',
1073 'session/media/call.cc',
1074 'session/media/call.h',
1075 'session/media/channel.cc',
1076 'session/media/channel.h',
1077 'session/media/channelmanager.cc',
1078 'session/media/channelmanager.h',
1079 'session/media/currentspeakermonitor.cc',
1080 'session/media/currentspeakermonitor.h',
1081 'session/media/mediamessages.cc',
1082 'session/media/mediamessages.h',
1083 'session/media/mediamonitor.cc',
1084 'session/media/mediamonitor.h',
1085 'session/media/mediarecorder.cc',
1086 'session/media/mediarecorder.h',
1087 'session/media/mediasession.cc',
1088 'session/media/mediasession.h',
1089 'session/media/mediasessionclient.cc',
1090 'session/media/mediasessionclient.h',
1091 'session/media/mediasink.h',
1092 'session/media/rtcpmuxfilter.cc',
1093 'session/media/rtcpmuxfilter.h',
1094 'session/media/soundclip.cc',
1095 'session/media/soundclip.h',
1096 'session/media/srtpfilter.cc',
1097 'session/media/srtpfilter.h',
1098 'session/media/ssrcmuxfilter.cc',
1099 'session/media/ssrcmuxfilter.h',
1100 'session/media/typingmonitor.cc',
1101 'session/media/typingmonitor.h',
1102 'session/media/voicechannel.h',
1103 ],
1104 }, # target libjingle_p2p
1105 {
1106 'target_name': 'libjingle_peerconnection',
1107 'type': 'static_library',
1108 'dependencies': [
1109 'libjingle',
1110 'libjingle_media',
1111 'libjingle_p2p',
1112 ],
1113 'sources': [
1114 'app/webrtc/audiotrack.cc',
1115 'app/webrtc/audiotrack.h',
1116 'app/webrtc/audiotrackrenderer.cc',
1117 'app/webrtc/audiotrackrenderer.h',
1118 'app/webrtc/datachannel.cc',
1119 'app/webrtc/datachannel.h',
1120 'app/webrtc/datachannelinterface.h',
1121 'app/webrtc/dtmfsender.cc',
1122 'app/webrtc/dtmfsender.h',
1123 'app/webrtc/dtmfsenderinterface.h',
1124 'app/webrtc/fakeportallocatorfactory.h',
1125 'app/webrtc/jsep.h',
1126 'app/webrtc/jsepicecandidate.cc',
1127 'app/webrtc/jsepicecandidate.h',
1128 'app/webrtc/jsepsessiondescription.cc',
1129 'app/webrtc/jsepsessiondescription.h',
1130 'app/webrtc/localaudiosource.cc',
1131 'app/webrtc/localaudiosource.h',
1132 'app/webrtc/localvideosource.cc',
1133 'app/webrtc/localvideosource.h',
1134 'app/webrtc/mediaconstraintsinterface.cc',
1135 'app/webrtc/mediaconstraintsinterface.h',
1136 'app/webrtc/mediastream.cc',
1137 'app/webrtc/mediastream.h',
1138 'app/webrtc/mediastreamhandler.cc',
1139 'app/webrtc/mediastreamhandler.h',
1140 'app/webrtc/mediastreaminterface.h',
1141 'app/webrtc/mediastreamprovider.h',
1142 'app/webrtc/mediastreamproxy.h',
1143 'app/webrtc/mediastreamsignaling.cc',
1144 'app/webrtc/mediastreamsignaling.h',
1145 'app/webrtc/mediastreamtrack.h',
1146 'app/webrtc/mediastreamtrackproxy.h',
1147 'app/webrtc/notifier.h',
1148 'app/webrtc/peerconnection.cc',
1149 'app/webrtc/peerconnection.h',
1150 'app/webrtc/peerconnectionfactory.cc',
1151 'app/webrtc/peerconnectionfactory.h',
1152 'app/webrtc/peerconnectioninterface.h',
1153 'app/webrtc/peerconnectionproxy.h',
1154 'app/webrtc/portallocatorfactory.cc',
1155 'app/webrtc/portallocatorfactory.h',
1156 'app/webrtc/proxy.h',
1157 'app/webrtc/statscollector.cc',
1158 'app/webrtc/statscollector.h',
1159 'app/webrtc/statstypes.h',
1160 'app/webrtc/streamcollection.h',
1161 'app/webrtc/videosourceinterface.h',
1162 'app/webrtc/videosourceproxy.h',
1163 'app/webrtc/videotrack.cc',
1164 'app/webrtc/videotrack.h',
1165 'app/webrtc/videotrackrenderers.cc',
1166 'app/webrtc/videotrackrenderers.h',
1167 'app/webrtc/webrtcsdp.cc',
1168 'app/webrtc/webrtcsdp.h',
1169 'app/webrtc/webrtcsession.cc',
1170 'app/webrtc/webrtcsession.h',
1171 ],
1172 }, # target libjingle_peerconnection
1173 ],
1174}