Home | History | Annotate | Download | only in talk
      1 #
      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   'conditions': [
     31     ['os_posix == 1 and OS != "mac" and OS != "ios"', {
     32      'conditions': [
     33        ['sysroot!=""', {
     34          'variables': {
     35            'pkg-config': '../../../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
     36          },
     37        }, {
     38          'variables': {
     39            'pkg-config': 'pkg-config'
     40          },
     41        }],
     42      ],
     43     }],
     44     ['OS=="linux" or OS=="android"', {
     45       'targets': [
     46         {
     47           'target_name': 'libjingle_peerconnection_so',
     48           'type': 'loadable_module',
     49           'dependencies': [
     50             'libjingle_peerconnection',
     51             '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
     52           ],
     53           'sources': [
     54             'app/webrtc/java/jni/peerconnection_jni.cc'
     55           ],
     56           'include_dirs': [
     57             '<(DEPTH)/third_party/libyuv/include',
     58           ],
     59           'conditions': [
     60             ['OS=="linux"', {
     61               'defines': [
     62                 'HAVE_GTK',
     63               ],
     64               'include_dirs': [
     65                 '<(java_home)/include',
     66                 '<(java_home)/include/linux',
     67               ],
     68               'link_settings': {
     69                 'libraries': [
     70                   '<!@(pkg-config --libs-only-l gobject-2.0 gthread-2.0'
     71                       ' gtk+-2.0)',
     72                 ],
     73               },
     74             }],
     75           ],
     76         },
     77         {
     78           'target_name': 'libjingle_peerconnection_jar',
     79           'type': 'none',
     80           'actions': [
     81             {
     82               'variables': {
     83                 'java_src_dir': 'app/webrtc/java/src',
     84                 'webrtc_modules_dir': '<(webrtc_root)/modules',
     85                 'build_jar_log': '<(INTERMEDIATE_DIR)/build_jar.log',
     86                 'peerconnection_java_files': [
     87                   'app/webrtc/java/src/org/webrtc/AudioSource.java',
     88                   'app/webrtc/java/src/org/webrtc/AudioTrack.java',
     89                   'app/webrtc/java/src/org/webrtc/DataChannel.java',
     90                   'app/webrtc/java/src/org/webrtc/IceCandidate.java',
     91                   'app/webrtc/java/src/org/webrtc/Logging.java',
     92                   'app/webrtc/java/src/org/webrtc/MediaConstraints.java',
     93                   'app/webrtc/java/src/org/webrtc/MediaSource.java',
     94                   'app/webrtc/java/src/org/webrtc/MediaStream.java',
     95                   'app/webrtc/java/src/org/webrtc/MediaStreamTrack.java',
     96                   'app/webrtc/java/src/org/webrtc/PeerConnectionFactory.java',
     97                   'app/webrtc/java/src/org/webrtc/PeerConnection.java',
     98                   'app/webrtc/java/src/org/webrtc/SdpObserver.java',
     99                   'app/webrtc/java/src/org/webrtc/StatsObserver.java',
    100                   'app/webrtc/java/src/org/webrtc/StatsReport.java',
    101                   'app/webrtc/java/src/org/webrtc/SessionDescription.java',
    102                   'app/webrtc/java/src/org/webrtc/VideoCapturer.java',
    103                   'app/webrtc/java/src/org/webrtc/VideoRenderer.java',
    104                   'app/webrtc/java/src/org/webrtc/VideoSource.java',
    105                   'app/webrtc/java/src/org/webrtc/VideoTrack.java',
    106                 ],
    107                 # TODO(fischman): extract this into a webrtc gyp var that can be
    108                 # included here, or better yet, build a proper .jar in webrtc
    109                 # and include it here.
    110                 'android_java_files': [
    111                   'app/webrtc/java/android/org/webrtc/VideoRendererGui.java',
    112                   'app/webrtc/java/src/org/webrtc/MediaCodecVideoEncoder.java',
    113                   'app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java',
    114                   '<(webrtc_modules_dir)/audio_device/android/java/src/org/webrtc/voiceengine/AudioManagerAndroid.java',
    115                   '<(webrtc_modules_dir)/video_capture/android/java/src/org/webrtc/videoengine/VideoCaptureAndroid.java',
    116                   '<(webrtc_modules_dir)/video_capture/android/java/src/org/webrtc/videoengine/VideoCaptureDeviceInfoAndroid.java',
    117                   '<(webrtc_modules_dir)/video_render/android/java/src/org/webrtc/videoengine/ViEAndroidGLES20.java',
    118                   '<(webrtc_modules_dir)/video_render/android/java/src/org/webrtc/videoengine/ViERenderer.java',
    119                   '<(webrtc_modules_dir)/video_render/android/java/src/org/webrtc/videoengine/ViESurfaceRenderer.java',
    120                   '<(webrtc_modules_dir)/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java',
    121                   '<(webrtc_modules_dir)/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java',
    122                 ],
    123               },
    124               'action_name': 'create_jar',
    125               'inputs': [
    126                 'build/build_jar.sh',
    127                 '<@(java_files)',
    128               ],
    129               'outputs': [
    130                 '<(PRODUCT_DIR)/libjingle_peerconnection.jar',
    131               ],
    132               'conditions': [
    133                 ['OS=="android"', {
    134                   'variables': {
    135                     'java_files': ['<@(peerconnection_java_files)', '<@(android_java_files)'],
    136                     'build_classpath': '<(java_src_dir):<(DEPTH)/third_party/android_tools/sdk/platforms/android-<(android_sdk_version)/android.jar',
    137                   },
    138                 }, {
    139                   'variables': {
    140                     'java_files': ['<@(peerconnection_java_files)'],
    141                     'build_classpath': '<(java_src_dir)',
    142                   },
    143                 }],
    144               ],
    145               'action': [
    146                 'bash', '-ec',
    147                 'mkdir -p <(INTERMEDIATE_DIR) && '
    148                 '{ build/build_jar.sh <(java_home) <@(_outputs) '
    149                 '      <(INTERMEDIATE_DIR)/build_jar.tmp '
    150                 '      <(build_classpath) <@(java_files) '
    151                 '      > <(build_jar_log) 2>&1 || '
    152                 '  { cat <(build_jar_log) ; exit 1; } }'
    153               ],
    154             },
    155           ],
    156           'dependencies': [
    157             'libjingle_peerconnection_so',
    158           ],
    159         },
    160       ],
    161     }],
    162     ['OS=="ios" or (OS=="mac" and target_arch!="ia32" and mac_sdk>="10.7")', {
    163       # The >= 10.7 above is required for ARC.
    164       'targets': [
    165         {
    166           'target_name': 'libjingle_peerconnection_objc',
    167           'type': 'static_library',
    168           'dependencies': [
    169             'libjingle_peerconnection',
    170           ],
    171           'sources': [
    172             'app/webrtc/objc/RTCAudioTrack+Internal.h',
    173             'app/webrtc/objc/RTCAudioTrack.mm',
    174             'app/webrtc/objc/RTCDataChannel+Internal.h',
    175             'app/webrtc/objc/RTCDataChannel.mm',
    176             'app/webrtc/objc/RTCEnumConverter.h',
    177             'app/webrtc/objc/RTCEnumConverter.mm',
    178             'app/webrtc/objc/RTCI420Frame+Internal.h',
    179             'app/webrtc/objc/RTCI420Frame.mm',
    180             'app/webrtc/objc/RTCICECandidate+Internal.h',
    181             'app/webrtc/objc/RTCICECandidate.mm',
    182             'app/webrtc/objc/RTCICEServer+Internal.h',
    183             'app/webrtc/objc/RTCICEServer.mm',
    184             'app/webrtc/objc/RTCMediaConstraints+Internal.h',
    185             'app/webrtc/objc/RTCMediaConstraints.mm',
    186             'app/webrtc/objc/RTCMediaConstraintsNative.cc',
    187             'app/webrtc/objc/RTCMediaConstraintsNative.h',
    188             'app/webrtc/objc/RTCMediaSource+Internal.h',
    189             'app/webrtc/objc/RTCMediaSource.mm',
    190             'app/webrtc/objc/RTCMediaStream+Internal.h',
    191             'app/webrtc/objc/RTCMediaStream.mm',
    192             'app/webrtc/objc/RTCMediaStreamTrack+Internal.h',
    193             'app/webrtc/objc/RTCMediaStreamTrack.mm',
    194             'app/webrtc/objc/RTCOpenGLVideoRenderer.mm',
    195             'app/webrtc/objc/RTCPair.m',
    196             'app/webrtc/objc/RTCPeerConnection+Internal.h',
    197             'app/webrtc/objc/RTCPeerConnection.mm',
    198             'app/webrtc/objc/RTCPeerConnectionFactory.mm',
    199             'app/webrtc/objc/RTCPeerConnectionObserver.h',
    200             'app/webrtc/objc/RTCPeerConnectionObserver.mm',
    201             'app/webrtc/objc/RTCSessionDescription+Internal.h',
    202             'app/webrtc/objc/RTCSessionDescription.mm',
    203             'app/webrtc/objc/RTCStatsReport+Internal.h',
    204             'app/webrtc/objc/RTCStatsReport.mm',
    205             'app/webrtc/objc/RTCVideoCapturer+Internal.h',
    206             'app/webrtc/objc/RTCVideoCapturer.mm',
    207             'app/webrtc/objc/RTCVideoRenderer+Internal.h',
    208             'app/webrtc/objc/RTCVideoRenderer.mm',
    209             'app/webrtc/objc/RTCVideoSource+Internal.h',
    210             'app/webrtc/objc/RTCVideoSource.mm',
    211             'app/webrtc/objc/RTCVideoTrack+Internal.h',
    212             'app/webrtc/objc/RTCVideoTrack.mm',
    213             'app/webrtc/objc/public/RTCAudioSource.h',
    214             'app/webrtc/objc/public/RTCAudioTrack.h',
    215             'app/webrtc/objc/public/RTCDataChannel.h',
    216             'app/webrtc/objc/public/RTCI420Frame.h',
    217             'app/webrtc/objc/public/RTCICECandidate.h',
    218             'app/webrtc/objc/public/RTCICEServer.h',
    219             'app/webrtc/objc/public/RTCMediaConstraints.h',
    220             'app/webrtc/objc/public/RTCMediaSource.h',
    221             'app/webrtc/objc/public/RTCMediaStream.h',
    222             'app/webrtc/objc/public/RTCMediaStreamTrack.h',
    223             'app/webrtc/objc/public/RTCOpenGLVideoRenderer.h',
    224             'app/webrtc/objc/public/RTCPair.h',
    225             'app/webrtc/objc/public/RTCPeerConnection.h',
    226             'app/webrtc/objc/public/RTCPeerConnectionDelegate.h',
    227             'app/webrtc/objc/public/RTCPeerConnectionFactory.h',
    228             'app/webrtc/objc/public/RTCSessionDescription.h',
    229             'app/webrtc/objc/public/RTCSessionDescriptionDelegate.h',
    230             'app/webrtc/objc/public/RTCStatsDelegate.h',
    231             'app/webrtc/objc/public/RTCStatsReport.h',
    232             'app/webrtc/objc/public/RTCTypes.h',
    233             'app/webrtc/objc/public/RTCVideoCapturer.h',
    234             'app/webrtc/objc/public/RTCVideoRenderer.h',
    235             'app/webrtc/objc/public/RTCVideoSource.h',
    236             'app/webrtc/objc/public/RTCVideoTrack.h',
    237           ],
    238           'direct_dependent_settings': {
    239             'include_dirs': [
    240               '<(DEPTH)/talk/app/webrtc/objc/public',
    241             ],
    242           },
    243           'include_dirs': [
    244             '<(DEPTH)/talk/app/webrtc',
    245             '<(DEPTH)/talk/app/webrtc/objc',
    246             '<(DEPTH)/talk/app/webrtc/objc/public',
    247           ],
    248           'link_settings': {
    249             'libraries': [
    250               '-lstdc++',
    251             ],
    252           },
    253           'xcode_settings': {
    254             'CLANG_ENABLE_OBJC_ARC': 'YES',
    255             # common.gypi enables this for mac but we want this to be disabled
    256             # like it is for ios.
    257             'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'NO',
    258           },
    259           'conditions': [
    260             ['OS=="ios"', {
    261               'sources': [
    262                 'app/webrtc/objc/RTCEAGLVideoView+Internal.h',
    263                 'app/webrtc/objc/RTCEAGLVideoView.m',
    264                 'app/webrtc/objc/public/RTCEAGLVideoView.h',
    265               ],
    266               'link_settings': {
    267                 'xcode_settings': {
    268                   'OTHER_LDFLAGS': [
    269                     '-framework CoreGraphics',
    270                     '-framework GLKit',
    271                   ],
    272                 },
    273               },
    274             }],
    275             ['OS=="mac"', {
    276               'sources': [
    277                 'app/webrtc/objc/RTCNSGLVideoView.m',
    278                 'app/webrtc/objc/public/RTCNSGLVideoView.h',
    279               ],
    280               'xcode_settings': {
    281                 # Need to build against 10.7 framework for full ARC support
    282                 # on OSX.
    283                 'MACOSX_DEPLOYMENT_TARGET' : '10.7',
    284               },
    285               'link_settings': {
    286                 'xcode_settings': {
    287                   'OTHER_LDFLAGS': [
    288                     '-framework Cocoa',
    289                   ],
    290                 },
    291               },
    292             }],
    293           ],
    294         },  # target libjingle_peerconnection_objc
    295       ],
    296     }],
    297   ],
    298 
    299   'targets': [
    300     {
    301       'target_name': 'libjingle',
    302       'type': 'static_library',
    303       'dependencies': [
    304         '<(DEPTH)/third_party/expat/expat.gyp:expat',
    305         '<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
    306         '<(webrtc_root)/base/base.gyp:rtc_base',
    307       ],
    308       'export_dependent_settings': [
    309         '<(DEPTH)/third_party/expat/expat.gyp:expat',
    310         '<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
    311       ],
    312       'sources': [
    313         'xmpp/asyncsocket.h',
    314         'xmpp/chatroommodule.h',
    315         'xmpp/chatroommoduleimpl.cc',
    316         'xmpp/constants.cc',
    317         'xmpp/constants.h',
    318         'xmpp/discoitemsquerytask.cc',
    319         'xmpp/discoitemsquerytask.h',
    320         'xmpp/hangoutpubsubclient.cc',
    321         'xmpp/hangoutpubsubclient.h',
    322         'xmpp/iqtask.cc',
    323         'xmpp/iqtask.h',
    324         'xmpp/jid.cc',
    325         'xmpp/jid.h',
    326         'xmpp/module.h',
    327         'xmpp/moduleimpl.cc',
    328         'xmpp/moduleimpl.h',
    329         'xmpp/mucroomconfigtask.cc',
    330         'xmpp/mucroomconfigtask.h',
    331         'xmpp/mucroomdiscoverytask.cc',
    332         'xmpp/mucroomdiscoverytask.h',
    333         'xmpp/mucroomlookuptask.cc',
    334         'xmpp/mucroomlookuptask.h',
    335         'xmpp/mucroomuniquehangoutidtask.cc',
    336         'xmpp/mucroomuniquehangoutidtask.h',
    337         'xmpp/pingtask.cc',
    338         'xmpp/pingtask.h',
    339         'xmpp/plainsaslhandler.h',
    340         'xmpp/presenceouttask.cc',
    341         'xmpp/presenceouttask.h',
    342         'xmpp/presencereceivetask.cc',
    343         'xmpp/presencereceivetask.h',
    344         'xmpp/presencestatus.cc',
    345         'xmpp/presencestatus.h',
    346         'xmpp/prexmppauth.h',
    347         'xmpp/pubsub_task.cc',
    348         'xmpp/pubsub_task.h',
    349         'xmpp/pubsubclient.cc',
    350         'xmpp/pubsubclient.h',
    351         'xmpp/pubsubstateclient.cc',
    352         'xmpp/pubsubstateclient.h',
    353         'xmpp/pubsubtasks.cc',
    354         'xmpp/pubsubtasks.h',
    355         'xmpp/receivetask.cc',
    356         'xmpp/receivetask.h',
    357         'xmpp/rostermodule.h',
    358         'xmpp/rostermoduleimpl.cc',
    359         'xmpp/rostermoduleimpl.h',
    360         'xmpp/saslcookiemechanism.h',
    361         'xmpp/saslhandler.h',
    362         'xmpp/saslmechanism.cc',
    363         'xmpp/saslmechanism.h',
    364         'xmpp/saslplainmechanism.h',
    365         'xmpp/xmppauth.cc',
    366         'xmpp/xmppauth.h',
    367         'xmpp/xmppclient.cc',
    368         'xmpp/xmppclient.h',
    369         'xmpp/xmppclientsettings.h',
    370         'xmpp/xmppengine.h',
    371         'xmpp/xmppengineimpl.cc',
    372         'xmpp/xmppengineimpl.h',
    373         'xmpp/xmppengineimpl_iq.cc',
    374         'xmpp/xmpplogintask.cc',
    375         'xmpp/xmpplogintask.h',
    376         'xmpp/xmpppump.cc',
    377         'xmpp/xmpppump.h',
    378         'xmpp/xmppsocket.cc',
    379         'xmpp/xmppsocket.h',
    380         'xmpp/xmppstanzaparser.cc',
    381         'xmpp/xmppstanzaparser.h',
    382         'xmpp/xmpptask.cc',
    383         'xmpp/xmpptask.h',
    384         'xmpp/xmppthread.cc',
    385         'xmpp/xmppthread.h',
    386       ],
    387     },  # target libjingle
    388     {
    389       'target_name': 'libjingle_media',
    390       'type': 'static_library',
    391       'include_dirs': [
    392         # TODO(jiayl): move this into the direct_dependent_settings of
    393         # usrsctp.gyp.
    394         '<(DEPTH)/third_party/usrsctp',
    395       ],
    396       'dependencies': [
    397         '<(DEPTH)/third_party/libyuv/libyuv.gyp:libyuv',
    398         '<(DEPTH)/third_party/usrsctp/usrsctp.gyp:usrsctplib',
    399         '<(webrtc_root)/modules/modules.gyp:video_render_module',
    400         '<(webrtc_root)/webrtc.gyp:webrtc',
    401         '<(webrtc_root)/voice_engine/voice_engine.gyp:voice_engine',
    402         '<(webrtc_root)/sound/sound.gyp:rtc_sound',
    403         '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
    404         '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:field_trial_default',
    405         '<(webrtc_root)/libjingle/xmllite/xmllite.gyp:rtc_xmllite',
    406         'libjingle',
    407       ],
    408       'direct_dependent_settings': {
    409         'include_dirs': [
    410           '<(DEPTH)/third_party/libyuv/include',
    411         ],
    412       },
    413       'sources': [
    414         'media/base/audioframe.h',
    415         'media/base/audiorenderer.h',
    416         'media/base/capturemanager.cc',
    417         'media/base/capturemanager.h',
    418         'media/base/capturerenderadapter.cc',
    419         'media/base/capturerenderadapter.h',
    420         'media/base/codec.cc',
    421         'media/base/codec.h',
    422         'media/base/constants.cc',
    423         'media/base/constants.h',
    424         'media/base/cpuid.cc',
    425         'media/base/cpuid.h',
    426         'media/base/cryptoparams.h',
    427         'media/base/device.h',
    428         'media/base/fakescreencapturerfactory.h',
    429         'media/base/filemediaengine.cc',
    430         'media/base/filemediaengine.h',
    431         'media/base/hybriddataengine.h',
    432         'media/base/mediachannel.h',
    433         'media/base/mediacommon.h',
    434         'media/base/mediaengine.cc',
    435         'media/base/mediaengine.h',
    436         'media/base/rtpdataengine.cc',
    437         'media/base/rtpdataengine.h',
    438         'media/base/rtpdump.cc',
    439         'media/base/rtpdump.h',
    440         'media/base/rtputils.cc',
    441         'media/base/rtputils.h',
    442         'media/base/screencastid.h',
    443         'media/base/streamparams.cc',
    444         'media/base/streamparams.h',
    445         'media/base/videoadapter.cc',
    446         'media/base/videoadapter.h',
    447         'media/base/videocapturer.cc',
    448         'media/base/videocapturer.h',
    449         'media/base/videocapturerfactory.h',
    450         'media/base/videocommon.cc',
    451         'media/base/videocommon.h',
    452         'media/base/videoframe.cc',
    453         'media/base/videoframe.h',
    454         'media/base/videoframefactory.h',
    455         'media/base/videoprocessor.h',
    456         'media/base/videorenderer.h',
    457         'media/base/voiceprocessor.h',
    458         'media/base/yuvframegenerator.cc',
    459         'media/base/yuvframegenerator.h',
    460         'media/devices/deviceinfo.h',
    461         'media/devices/devicemanager.cc',
    462         'media/devices/devicemanager.h',
    463         'media/devices/dummydevicemanager.h',
    464         'media/devices/filevideocapturer.cc',
    465         'media/devices/filevideocapturer.h',
    466         'media/devices/videorendererfactory.h',
    467         'media/devices/yuvframescapturer.cc',
    468         'media/devices/yuvframescapturer.h',
    469         'media/other/linphonemediaengine.h',
    470         'media/sctp/sctpdataengine.cc',
    471         'media/sctp/sctpdataengine.h',
    472         'media/webrtc/webrtccommon.h',
    473         'media/webrtc/webrtcexport.h',
    474         'media/webrtc/webrtcmediaengine.cc',
    475         'media/webrtc/webrtcmediaengine.h',
    476         'media/webrtc/webrtcmediaengine.cc',
    477         'media/webrtc/webrtcpassthroughrender.cc',
    478         'media/webrtc/webrtcpassthroughrender.h',
    479         'media/webrtc/webrtctexturevideoframe.cc',
    480         'media/webrtc/webrtctexturevideoframe.h',
    481         'media/webrtc/webrtcvideocapturer.cc',
    482         'media/webrtc/webrtcvideocapturerfactory.h',
    483         'media/webrtc/webrtcvideocapturerfactory.cc',
    484         'media/webrtc/webrtcvideocapturer.h',
    485         'media/webrtc/webrtcvideodecoderfactory.h',
    486         'media/webrtc/webrtcvideoencoderfactory.h',
    487         'media/webrtc/webrtcvideoengine.cc',
    488         'media/webrtc/webrtcvideoengine.h',
    489         'media/webrtc/webrtcvideoengine2.cc',
    490         'media/webrtc/webrtcvideoengine2.h',
    491         'media/webrtc/webrtcvideoframe.cc',
    492         'media/webrtc/webrtcvideoframe.h',
    493         'media/webrtc/webrtcvideoframefactory.cc',
    494         'media/webrtc/webrtcvideoframefactory.h',
    495         'media/webrtc/webrtcvie.h',
    496         'media/webrtc/webrtcvoe.h',
    497         'media/webrtc/webrtcvoiceengine.cc',
    498         'media/webrtc/webrtcvoiceengine.h',
    499       ],
    500       'conditions': [
    501         ['build_with_chromium==1', {
    502 	  'dependencies': [
    503             '<(webrtc_root)/modules/modules.gyp:video_capture_module_impl',
    504             '<(webrtc_root)/modules/modules.gyp:video_render_module_impl',
    505 	  ],
    506 	}, {
    507 	  'dependencies': [
    508             '<(webrtc_root)/modules/modules.gyp:video_capture_module_internal_impl',
    509             '<(webrtc_root)/modules/modules.gyp:video_render_module_internal_impl',
    510 	  ],
    511 	}],
    512         ['OS=="linux"', {
    513           'sources': [
    514             'media/devices/gtkvideorenderer.cc',
    515             'media/devices/gtkvideorenderer.h',
    516             'media/devices/libudevsymboltable.cc',
    517             'media/devices/libudevsymboltable.h',
    518             'media/devices/linuxdeviceinfo.cc',
    519             'media/devices/linuxdevicemanager.cc',
    520             'media/devices/linuxdevicemanager.h',
    521             'media/devices/v4llookup.cc',
    522             'media/devices/v4llookup.h',
    523           ],
    524           'include_dirs': [
    525             'third_party/libudev'
    526           ],
    527           'cflags': [
    528             '<!@(pkg-config --cflags gobject-2.0 gthread-2.0 gtk+-2.0)',
    529           ],
    530           'libraries': [
    531             '-lrt',
    532             '-lXext',
    533             '-lX11',
    534           ],
    535         }],
    536         ['OS=="win"', {
    537           'sources': [
    538             'media/devices/gdivideorenderer.cc',
    539             'media/devices/gdivideorenderer.h',
    540             'media/devices/win32deviceinfo.cc',
    541             'media/devices/win32devicemanager.cc',
    542             'media/devices/win32devicemanager.h',
    543           ],
    544           'msvs_settings': {
    545             'VCLibrarianTool': {
    546               'AdditionalDependencies': [
    547                 'd3d9.lib',
    548                 'gdi32.lib',
    549                 'strmiids.lib',
    550                 'winmm.lib',
    551               ],
    552             },
    553           },
    554         }],
    555         ['OS=="mac"', {
    556           'sources': [
    557             'media/devices/macdeviceinfo.cc',
    558             'media/devices/macdevicemanager.cc',
    559             'media/devices/macdevicemanager.h',
    560             'media/devices/macdevicemanagermm.mm',
    561           ],
    562           'conditions': [
    563             ['target_arch=="ia32"', {
    564               'sources': [
    565                 'media/devices/carbonvideorenderer.cc',
    566                 'media/devices/carbonvideorenderer.h',
    567               ],
    568               'link_settings': {
    569                 'xcode_settings': {
    570                   'OTHER_LDFLAGS': [
    571                     '-framework Carbon',
    572                   ],
    573                 },
    574               },
    575             }],
    576           ],
    577           'xcode_settings': {
    578             'WARNING_CFLAGS': [
    579               # TODO(ronghuawu): Update macdevicemanager.cc to stop using
    580               # deprecated functions and remove this flag.
    581               '-Wno-deprecated-declarations',
    582             ],
    583           },
    584           'link_settings': {
    585             'xcode_settings': {
    586               'OTHER_LDFLAGS': [
    587                 '-weak_framework AVFoundation',
    588                 '-framework Cocoa',
    589                 '-framework CoreAudio',
    590                 '-framework CoreVideo',
    591                 '-framework OpenGL',
    592                 '-framework QTKit',
    593               ],
    594             },
    595           },
    596         }],
    597         ['OS=="ios"', {
    598           'sources': [
    599             'media/devices/mobiledevicemanager.cc',
    600           ],
    601           'include_dirs': [
    602             # TODO(sjlee) Remove when vp8 is building for iOS.  vp8 pulls in
    603             # libjpeg which pulls in libyuv which currently disabled.
    604             '../third_party/libyuv/include',
    605           ],
    606         }],
    607         ['OS=="android"', {
    608           'sources': [
    609             'media/devices/mobiledevicemanager.cc',
    610           ],
    611         }],
    612       ],
    613     },  # target libjingle_media
    614     {
    615       'target_name': 'libjingle_p2p',
    616       'type': 'static_library',
    617       'dependencies': [
    618         '<(DEPTH)/third_party/libsrtp/libsrtp.gyp:libsrtp',
    619         'libjingle',
    620         'libjingle_media',
    621       ],
    622       'include_dirs': [
    623         '<(DEPTH)/testing/gtest/include',
    624       ],
    625       'direct_dependent_settings': {
    626         'include_dirs': [
    627           '<(DEPTH)/testing/gtest/include',
    628         ],
    629       },
    630       'sources': [
    631         'p2p/base/asyncstuntcpsocket.cc',
    632         'p2p/base/asyncstuntcpsocket.h',
    633         'p2p/base/basicpacketsocketfactory.cc',
    634         'p2p/base/basicpacketsocketfactory.h',
    635         'p2p/base/candidate.h',
    636         'p2p/base/common.h',
    637         'p2p/base/constants.cc',
    638         'p2p/base/constants.h',
    639         'p2p/base/dtlstransportchannel.cc',
    640         'p2p/base/dtlstransportchannel.h',
    641         'p2p/base/p2ptransport.cc',
    642         'p2p/base/p2ptransport.h',
    643         'p2p/base/p2ptransportchannel.cc',
    644         'p2p/base/p2ptransportchannel.h',
    645         'p2p/base/packetsocketfactory.h',
    646         'p2p/base/parsing.cc',
    647         'p2p/base/parsing.h',
    648         'p2p/base/port.cc',
    649         'p2p/base/port.h',
    650         'p2p/base/portallocator.cc',
    651         'p2p/base/portallocator.h',
    652         'p2p/base/portallocatorsessionproxy.cc',
    653         'p2p/base/portallocatorsessionproxy.h',
    654         'p2p/base/portinterface.h',
    655         'p2p/base/portproxy.cc',
    656         'p2p/base/portproxy.h',
    657         'p2p/base/pseudotcp.cc',
    658         'p2p/base/pseudotcp.h',
    659         'p2p/base/rawtransport.cc',
    660         'p2p/base/rawtransport.h',
    661         'p2p/base/rawtransportchannel.cc',
    662         'p2p/base/rawtransportchannel.h',
    663         'p2p/base/relayport.cc',
    664         'p2p/base/relayport.h',
    665         'p2p/base/relayserver.cc',
    666         'p2p/base/relayserver.h',
    667         'p2p/base/session.cc',
    668         'p2p/base/session.h',
    669         'p2p/base/sessionclient.h',
    670         'p2p/base/sessiondescription.cc',
    671         'p2p/base/sessiondescription.h',
    672         'p2p/base/sessionid.h',
    673         'p2p/base/sessionmanager.cc',
    674         'p2p/base/sessionmanager.h',
    675         'p2p/base/sessionmessages.cc',
    676         'p2p/base/sessionmessages.h',
    677         'p2p/base/stun.cc',
    678         'p2p/base/stun.h',
    679         'p2p/base/stunport.cc',
    680         'p2p/base/stunport.h',
    681         'p2p/base/stunrequest.cc',
    682         'p2p/base/stunrequest.h',
    683         'p2p/base/stunserver.cc',
    684         'p2p/base/stunserver.h',
    685         'p2p/base/tcpport.cc',
    686         'p2p/base/tcpport.h',
    687         'p2p/base/transport.cc',
    688         'p2p/base/transport.h',
    689         'p2p/base/transportchannel.cc',
    690         'p2p/base/transportchannel.h',
    691         'p2p/base/transportchannelimpl.h',
    692         'p2p/base/transportchannelproxy.cc',
    693         'p2p/base/transportchannelproxy.h',
    694         'p2p/base/transportdescription.cc',
    695         'p2p/base/transportdescription.h',
    696         'p2p/base/transportdescriptionfactory.cc',
    697         'p2p/base/transportdescriptionfactory.h',
    698         'p2p/base/transportinfo.h',
    699         'p2p/base/turnport.cc',
    700         'p2p/base/turnport.h',
    701         'p2p/base/turnserver.cc',
    702         'p2p/base/turnserver.h',
    703         'p2p/base/udpport.h',
    704         'p2p/client/autoportallocator.h',
    705         'p2p/client/basicportallocator.cc',
    706         'p2p/client/basicportallocator.h',
    707         'p2p/client/connectivitychecker.cc',
    708         'p2p/client/connectivitychecker.h',
    709         'p2p/client/httpportallocator.cc',
    710         'p2p/client/httpportallocator.h',
    711         'p2p/client/sessionmanagertask.h',
    712         'p2p/client/sessionsendtask.h',
    713         'p2p/client/socketmonitor.cc',
    714         'p2p/client/socketmonitor.h',
    715         'session/tunnel/pseudotcpchannel.cc',
    716         'session/tunnel/pseudotcpchannel.h',
    717         'session/tunnel/tunnelsessionclient.cc',
    718         'session/tunnel/tunnelsessionclient.h',
    719         'session/tunnel/securetunnelsessionclient.cc',
    720         'session/tunnel/securetunnelsessionclient.h',
    721         'session/media/audiomonitor.cc',
    722         'session/media/audiomonitor.h',
    723         'session/media/bundlefilter.cc',
    724         'session/media/bundlefilter.h',
    725         'session/media/call.cc',
    726         'session/media/call.h',
    727         'session/media/channel.cc',
    728         'session/media/channel.h',
    729         'session/media/channelmanager.cc',
    730         'session/media/channelmanager.h',
    731         'session/media/currentspeakermonitor.cc',
    732         'session/media/currentspeakermonitor.h',
    733         'session/media/mediamessages.cc',
    734         'session/media/mediamessages.h',
    735         'session/media/mediamonitor.cc',
    736         'session/media/mediamonitor.h',
    737         'session/media/mediarecorder.cc',
    738         'session/media/mediarecorder.h',
    739         'session/media/mediasession.cc',
    740         'session/media/mediasession.h',
    741         'session/media/mediasessionclient.cc',
    742         'session/media/mediasessionclient.h',
    743         'session/media/mediasink.h',
    744         'session/media/rtcpmuxfilter.cc',
    745         'session/media/rtcpmuxfilter.h',
    746         'session/media/soundclip.cc',
    747         'session/media/soundclip.h',
    748         'session/media/srtpfilter.cc',
    749         'session/media/srtpfilter.h',
    750         'session/media/typingmonitor.cc',
    751         'session/media/typingmonitor.h',
    752         'session/media/voicechannel.h',
    753       ],
    754     },  # target libjingle_p2p
    755     {
    756       'target_name': 'libjingle_peerconnection',
    757       'type': 'static_library',
    758       'dependencies': [
    759         'libjingle',
    760         'libjingle_media',
    761         'libjingle_p2p',
    762       ],
    763       'sources': [
    764         'app/webrtc/audiotrack.cc',
    765         'app/webrtc/audiotrack.h',
    766         'app/webrtc/audiotrackrenderer.cc',
    767         'app/webrtc/audiotrackrenderer.h',
    768         'app/webrtc/datachannel.cc',
    769         'app/webrtc/datachannel.h',
    770         'app/webrtc/datachannelinterface.h',
    771         'app/webrtc/dtmfsender.cc',
    772         'app/webrtc/dtmfsender.h',
    773         'app/webrtc/dtmfsenderinterface.h',
    774         'app/webrtc/fakeportallocatorfactory.h',
    775         'app/webrtc/jsep.h',
    776         'app/webrtc/jsepicecandidate.cc',
    777         'app/webrtc/jsepicecandidate.h',
    778         'app/webrtc/jsepsessiondescription.cc',
    779         'app/webrtc/jsepsessiondescription.h',
    780         'app/webrtc/localaudiosource.cc',
    781         'app/webrtc/localaudiosource.h',
    782         'app/webrtc/mediaconstraintsinterface.cc',
    783         'app/webrtc/mediaconstraintsinterface.h',
    784         'app/webrtc/mediastream.cc',
    785         'app/webrtc/mediastream.h',
    786         'app/webrtc/mediastreamhandler.cc',
    787         'app/webrtc/mediastreamhandler.h',
    788         'app/webrtc/mediastreaminterface.h',
    789         'app/webrtc/mediastreamprovider.h',
    790         'app/webrtc/mediastreamproxy.h',
    791         'app/webrtc/mediastreamsignaling.cc',
    792         'app/webrtc/mediastreamsignaling.h',
    793         'app/webrtc/mediastreamtrack.h',
    794         'app/webrtc/mediastreamtrackproxy.h',
    795         'app/webrtc/notifier.h',
    796         'app/webrtc/peerconnection.cc',
    797         'app/webrtc/peerconnection.h',
    798         'app/webrtc/peerconnectionfactory.cc',
    799         'app/webrtc/peerconnectionfactory.h',
    800         'app/webrtc/peerconnectioninterface.h',
    801         'app/webrtc/peerconnectionproxy.h',
    802         'app/webrtc/portallocatorfactory.cc',
    803         'app/webrtc/portallocatorfactory.h',
    804         'app/webrtc/proxy.h',
    805         'app/webrtc/remoteaudiosource.cc',
    806         'app/webrtc/remoteaudiosource.h',
    807         'app/webrtc/remotevideocapturer.cc',
    808         'app/webrtc/remotevideocapturer.h',
    809         'app/webrtc/sctputils.cc',
    810         'app/webrtc/sctputils.h',
    811         'app/webrtc/statscollector.cc',
    812         'app/webrtc/statscollector.h',
    813         'app/webrtc/statstypes.h',
    814         'app/webrtc/streamcollection.h',
    815         'app/webrtc/videosource.cc',
    816         'app/webrtc/videosource.h',
    817         'app/webrtc/videosourceinterface.h',
    818         'app/webrtc/videosourceproxy.h',
    819         'app/webrtc/videotrack.cc',
    820         'app/webrtc/videotrack.h',
    821         'app/webrtc/videotrackrenderers.cc',
    822         'app/webrtc/videotrackrenderers.h',
    823         'app/webrtc/webrtcsdp.cc',
    824         'app/webrtc/webrtcsdp.h',
    825         'app/webrtc/webrtcsession.cc',
    826         'app/webrtc/webrtcsession.h',
    827         'app/webrtc/webrtcsessiondescriptionfactory.cc',
    828         'app/webrtc/webrtcsessiondescriptionfactory.h',
    829       ],
    830     },  # target libjingle_peerconnection
    831   ],
    832 }
    833