# # libjingle # Copyright 2012, Google Inc. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # 3. The name of the author may not be used to endorse or promote products # derived from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # { 'includes': ['build/common.gypi'], 'conditions': [ ['os_posix == 1 and OS != "mac" and OS != "ios"', { 'conditions': [ ['sysroot!=""', { 'variables': { 'pkg-config': '../../../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"', }, }, { 'variables': { 'pkg-config': 'pkg-config' }, }], ], }], ['OS=="linux" or OS=="android"', { 'targets': [ { 'target_name': 'libjingle_peerconnection_so', 'type': 'loadable_module', 'dependencies': [ 'libjingle_peerconnection', '<(DEPTH)/third_party/icu/icu.gyp:icuuc', ], 'sources': [ 'app/webrtc/java/jni/peerconnection_jni.cc' ], 'include_dirs': [ '<(DEPTH)/third_party/libyuv/include', ], 'conditions': [ ['OS=="linux"', { 'defines': [ 'HAVE_GTK', ], 'include_dirs': [ '<(java_home)/include', '<(java_home)/include/linux', ], 'link_settings': { 'libraries': [ ' <(build_jar_log) 2>&1 || ' ' { cat <(build_jar_log) ; exit 1; } }' ], }, ], 'dependencies': [ 'libjingle_peerconnection_so', ], }, ], }], ['OS=="ios" or (OS=="mac" and target_arch!="ia32" and mac_sdk>="10.7")', { # The >= 10.7 above is required for ARC. 'targets': [ { 'target_name': 'libjingle_peerconnection_objc', 'type': 'static_library', 'dependencies': [ 'libjingle_peerconnection', ], 'sources': [ 'app/webrtc/objc/RTCAudioTrack+Internal.h', 'app/webrtc/objc/RTCAudioTrack.mm', 'app/webrtc/objc/RTCDataChannel+Internal.h', 'app/webrtc/objc/RTCDataChannel.mm', 'app/webrtc/objc/RTCEnumConverter.h', 'app/webrtc/objc/RTCEnumConverter.mm', 'app/webrtc/objc/RTCI420Frame+Internal.h', 'app/webrtc/objc/RTCI420Frame.mm', 'app/webrtc/objc/RTCICECandidate+Internal.h', 'app/webrtc/objc/RTCICECandidate.mm', 'app/webrtc/objc/RTCICEServer+Internal.h', 'app/webrtc/objc/RTCICEServer.mm', 'app/webrtc/objc/RTCMediaConstraints+Internal.h', 'app/webrtc/objc/RTCMediaConstraints.mm', 'app/webrtc/objc/RTCMediaConstraintsNative.cc', 'app/webrtc/objc/RTCMediaConstraintsNative.h', 'app/webrtc/objc/RTCMediaSource+Internal.h', 'app/webrtc/objc/RTCMediaSource.mm', 'app/webrtc/objc/RTCMediaStream+Internal.h', 'app/webrtc/objc/RTCMediaStream.mm', 'app/webrtc/objc/RTCMediaStreamTrack+Internal.h', 'app/webrtc/objc/RTCMediaStreamTrack.mm', 'app/webrtc/objc/RTCOpenGLVideoRenderer.mm', 'app/webrtc/objc/RTCPair.m', 'app/webrtc/objc/RTCPeerConnection+Internal.h', 'app/webrtc/objc/RTCPeerConnection.mm', 'app/webrtc/objc/RTCPeerConnectionFactory.mm', 'app/webrtc/objc/RTCPeerConnectionObserver.h', 'app/webrtc/objc/RTCPeerConnectionObserver.mm', 'app/webrtc/objc/RTCSessionDescription+Internal.h', 'app/webrtc/objc/RTCSessionDescription.mm', 'app/webrtc/objc/RTCStatsReport+Internal.h', 'app/webrtc/objc/RTCStatsReport.mm', 'app/webrtc/objc/RTCVideoCapturer+Internal.h', 'app/webrtc/objc/RTCVideoCapturer.mm', 'app/webrtc/objc/RTCVideoRenderer+Internal.h', 'app/webrtc/objc/RTCVideoRenderer.mm', 'app/webrtc/objc/RTCVideoSource+Internal.h', 'app/webrtc/objc/RTCVideoSource.mm', 'app/webrtc/objc/RTCVideoTrack+Internal.h', 'app/webrtc/objc/RTCVideoTrack.mm', 'app/webrtc/objc/public/RTCAudioSource.h', 'app/webrtc/objc/public/RTCAudioTrack.h', 'app/webrtc/objc/public/RTCDataChannel.h', 'app/webrtc/objc/public/RTCI420Frame.h', 'app/webrtc/objc/public/RTCICECandidate.h', 'app/webrtc/objc/public/RTCICEServer.h', 'app/webrtc/objc/public/RTCMediaConstraints.h', 'app/webrtc/objc/public/RTCMediaSource.h', 'app/webrtc/objc/public/RTCMediaStream.h', 'app/webrtc/objc/public/RTCMediaStreamTrack.h', 'app/webrtc/objc/public/RTCOpenGLVideoRenderer.h', 'app/webrtc/objc/public/RTCPair.h', 'app/webrtc/objc/public/RTCPeerConnection.h', 'app/webrtc/objc/public/RTCPeerConnectionDelegate.h', 'app/webrtc/objc/public/RTCPeerConnectionFactory.h', 'app/webrtc/objc/public/RTCSessionDescription.h', 'app/webrtc/objc/public/RTCSessionDescriptionDelegate.h', 'app/webrtc/objc/public/RTCStatsDelegate.h', 'app/webrtc/objc/public/RTCStatsReport.h', 'app/webrtc/objc/public/RTCTypes.h', 'app/webrtc/objc/public/RTCVideoCapturer.h', 'app/webrtc/objc/public/RTCVideoRenderer.h', 'app/webrtc/objc/public/RTCVideoSource.h', 'app/webrtc/objc/public/RTCVideoTrack.h', ], 'direct_dependent_settings': { 'include_dirs': [ '<(DEPTH)/talk/app/webrtc/objc/public', ], }, 'include_dirs': [ '<(DEPTH)/talk/app/webrtc', '<(DEPTH)/talk/app/webrtc/objc', '<(DEPTH)/talk/app/webrtc/objc/public', ], 'link_settings': { 'libraries': [ '-lstdc++', ], }, 'xcode_settings': { 'CLANG_ENABLE_OBJC_ARC': 'YES', # common.gypi enables this for mac but we want this to be disabled # like it is for ios. 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'NO', }, 'conditions': [ ['OS=="ios"', { 'sources': [ 'app/webrtc/objc/RTCEAGLVideoView+Internal.h', 'app/webrtc/objc/RTCEAGLVideoView.m', 'app/webrtc/objc/public/RTCEAGLVideoView.h', ], 'link_settings': { 'xcode_settings': { 'OTHER_LDFLAGS': [ '-framework CoreGraphics', '-framework GLKit', ], }, }, }], ['OS=="mac"', { 'sources': [ 'app/webrtc/objc/RTCNSGLVideoView.m', 'app/webrtc/objc/public/RTCNSGLVideoView.h', ], 'xcode_settings': { # Need to build against 10.7 framework for full ARC support # on OSX. 'MACOSX_DEPLOYMENT_TARGET' : '10.7', }, 'link_settings': { 'xcode_settings': { 'OTHER_LDFLAGS': [ '-framework Cocoa', ], }, }, }], ], }, # target libjingle_peerconnection_objc ], }], ], 'targets': [ { 'target_name': 'libjingle', 'type': 'static_library', 'dependencies': [ '<(DEPTH)/third_party/expat/expat.gyp:expat', '<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp', '<(webrtc_root)/base/base.gyp:rtc_base', ], 'export_dependent_settings': [ '<(DEPTH)/third_party/expat/expat.gyp:expat', '<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp', ], 'sources': [ 'xmpp/asyncsocket.h', 'xmpp/chatroommodule.h', 'xmpp/chatroommoduleimpl.cc', 'xmpp/constants.cc', 'xmpp/constants.h', 'xmpp/discoitemsquerytask.cc', 'xmpp/discoitemsquerytask.h', 'xmpp/hangoutpubsubclient.cc', 'xmpp/hangoutpubsubclient.h', 'xmpp/iqtask.cc', 'xmpp/iqtask.h', 'xmpp/jid.cc', 'xmpp/jid.h', 'xmpp/module.h', 'xmpp/moduleimpl.cc', 'xmpp/moduleimpl.h', 'xmpp/mucroomconfigtask.cc', 'xmpp/mucroomconfigtask.h', 'xmpp/mucroomdiscoverytask.cc', 'xmpp/mucroomdiscoverytask.h', 'xmpp/mucroomlookuptask.cc', 'xmpp/mucroomlookuptask.h', 'xmpp/mucroomuniquehangoutidtask.cc', 'xmpp/mucroomuniquehangoutidtask.h', 'xmpp/pingtask.cc', 'xmpp/pingtask.h', 'xmpp/plainsaslhandler.h', 'xmpp/presenceouttask.cc', 'xmpp/presenceouttask.h', 'xmpp/presencereceivetask.cc', 'xmpp/presencereceivetask.h', 'xmpp/presencestatus.cc', 'xmpp/presencestatus.h', 'xmpp/prexmppauth.h', 'xmpp/pubsub_task.cc', 'xmpp/pubsub_task.h', 'xmpp/pubsubclient.cc', 'xmpp/pubsubclient.h', 'xmpp/pubsubstateclient.cc', 'xmpp/pubsubstateclient.h', 'xmpp/pubsubtasks.cc', 'xmpp/pubsubtasks.h', 'xmpp/receivetask.cc', 'xmpp/receivetask.h', 'xmpp/rostermodule.h', 'xmpp/rostermoduleimpl.cc', 'xmpp/rostermoduleimpl.h', 'xmpp/saslcookiemechanism.h', 'xmpp/saslhandler.h', 'xmpp/saslmechanism.cc', 'xmpp/saslmechanism.h', 'xmpp/saslplainmechanism.h', 'xmpp/xmppauth.cc', 'xmpp/xmppauth.h', 'xmpp/xmppclient.cc', 'xmpp/xmppclient.h', 'xmpp/xmppclientsettings.h', 'xmpp/xmppengine.h', 'xmpp/xmppengineimpl.cc', 'xmpp/xmppengineimpl.h', 'xmpp/xmppengineimpl_iq.cc', 'xmpp/xmpplogintask.cc', 'xmpp/xmpplogintask.h', 'xmpp/xmpppump.cc', 'xmpp/xmpppump.h', 'xmpp/xmppsocket.cc', 'xmpp/xmppsocket.h', 'xmpp/xmppstanzaparser.cc', 'xmpp/xmppstanzaparser.h', 'xmpp/xmpptask.cc', 'xmpp/xmpptask.h', 'xmpp/xmppthread.cc', 'xmpp/xmppthread.h', ], }, # target libjingle { 'target_name': 'libjingle_media', 'type': 'static_library', 'include_dirs': [ # TODO(jiayl): move this into the direct_dependent_settings of # usrsctp.gyp. '<(DEPTH)/third_party/usrsctp', ], 'dependencies': [ '<(DEPTH)/third_party/libyuv/libyuv.gyp:libyuv', '<(DEPTH)/third_party/usrsctp/usrsctp.gyp:usrsctplib', '<(webrtc_root)/modules/modules.gyp:video_capture_module', '<(webrtc_root)/modules/modules.gyp:video_render_module', '<(webrtc_root)/webrtc.gyp:webrtc', '<(webrtc_root)/voice_engine/voice_engine.gyp:voice_engine', '<(webrtc_root)/sound/sound.gyp:rtc_sound', '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers', '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:field_trial_default', '<(webrtc_root)/libjingle/xmllite/xmllite.gyp:rtc_xmllite', 'libjingle', ], 'direct_dependent_settings': { 'include_dirs': [ '<(DEPTH)/third_party/libyuv/include', ], }, 'sources': [ 'media/base/audioframe.h', 'media/base/audiorenderer.h', 'media/base/capturemanager.cc', 'media/base/capturemanager.h', 'media/base/capturerenderadapter.cc', 'media/base/capturerenderadapter.h', 'media/base/codec.cc', 'media/base/codec.h', 'media/base/constants.cc', 'media/base/constants.h', 'media/base/cpuid.cc', 'media/base/cpuid.h', 'media/base/cryptoparams.h', 'media/base/device.h', 'media/base/fakescreencapturerfactory.h', 'media/base/filemediaengine.cc', 'media/base/filemediaengine.h', 'media/base/hybriddataengine.h', 'media/base/mediachannel.h', 'media/base/mediacommon.h', 'media/base/mediaengine.cc', 'media/base/mediaengine.h', 'media/base/rtpdataengine.cc', 'media/base/rtpdataengine.h', 'media/base/rtpdump.cc', 'media/base/rtpdump.h', 'media/base/rtputils.cc', 'media/base/rtputils.h', 'media/base/screencastid.h', 'media/base/streamparams.cc', 'media/base/streamparams.h', 'media/base/videoadapter.cc', 'media/base/videoadapter.h', 'media/base/videocapturer.cc', 'media/base/videocapturer.h', 'media/base/videocapturerfactory.h', 'media/base/videocommon.cc', 'media/base/videocommon.h', 'media/base/videoframe.cc', 'media/base/videoframe.h', 'media/base/videoframefactory.h', 'media/base/videoprocessor.h', 'media/base/videorenderer.h', 'media/base/voiceprocessor.h', 'media/base/yuvframegenerator.cc', 'media/base/yuvframegenerator.h', 'media/devices/deviceinfo.h', 'media/devices/devicemanager.cc', 'media/devices/devicemanager.h', 'media/devices/dummydevicemanager.h', 'media/devices/filevideocapturer.cc', 'media/devices/filevideocapturer.h', 'media/devices/videorendererfactory.h', 'media/devices/yuvframescapturer.cc', 'media/devices/yuvframescapturer.h', 'media/other/linphonemediaengine.h', 'media/sctp/sctpdataengine.cc', 'media/sctp/sctpdataengine.h', 'media/webrtc/webrtccommon.h', 'media/webrtc/webrtcexport.h', 'media/webrtc/webrtcmediaengine.cc', 'media/webrtc/webrtcmediaengine.h', 'media/webrtc/webrtcmediaengine.cc', 'media/webrtc/webrtcpassthroughrender.cc', 'media/webrtc/webrtcpassthroughrender.h', 'media/webrtc/webrtctexturevideoframe.cc', 'media/webrtc/webrtctexturevideoframe.h', 'media/webrtc/webrtcvideocapturer.cc', 'media/webrtc/webrtcvideocapturerfactory.h', 'media/webrtc/webrtcvideocapturerfactory.cc', 'media/webrtc/webrtcvideocapturer.h', 'media/webrtc/webrtcvideodecoderfactory.h', 'media/webrtc/webrtcvideoencoderfactory.h', 'media/webrtc/webrtcvideoengine.cc', 'media/webrtc/webrtcvideoengine.h', 'media/webrtc/webrtcvideoengine2.cc', 'media/webrtc/webrtcvideoengine2.h', 'media/webrtc/webrtcvideoframe.cc', 'media/webrtc/webrtcvideoframe.h', 'media/webrtc/webrtcvideoframefactory.cc', 'media/webrtc/webrtcvideoframefactory.h', 'media/webrtc/webrtcvie.h', 'media/webrtc/webrtcvoe.h', 'media/webrtc/webrtcvoiceengine.cc', 'media/webrtc/webrtcvoiceengine.h', ], 'conditions': [ ['OS=="linux"', { 'sources': [ 'media/devices/gtkvideorenderer.cc', 'media/devices/gtkvideorenderer.h', 'media/devices/libudevsymboltable.cc', 'media/devices/libudevsymboltable.h', 'media/devices/linuxdeviceinfo.cc', 'media/devices/linuxdevicemanager.cc', 'media/devices/linuxdevicemanager.h', 'media/devices/v4llookup.cc', 'media/devices/v4llookup.h', ], 'include_dirs': [ 'third_party/libudev' ], 'cflags': [ '