hjon | aa32c3e | 2015-12-13 19:58:11 -0800 | [diff] [blame] | 1 | # Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
| 2 | # |
| 3 | # Use of this source code is governed by a BSD-style license |
| 4 | # that can be found in the LICENSE file in the root of the source |
| 5 | # tree. An additional intellectual property rights grant can be found |
| 6 | # in the file PATENTS. All contributing project authors may |
| 7 | # be found in the AUTHORS file in the root of the source tree. |
| 8 | |
| 9 | { |
| 10 | 'includes': [ '../build/common.gypi', ], |
| 11 | 'conditions': [ |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 12 | ['os_posix == 1 and OS != "mac" and OS != "ios"', { |
| 13 | 'conditions': [ |
| 14 | ['sysroot!=""', { |
| 15 | 'variables': { |
| 16 | 'pkg-config': '../../../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"', |
| 17 | }, |
| 18 | }, { |
| 19 | 'variables': { |
| 20 | 'pkg-config': 'pkg-config' |
| 21 | }, |
| 22 | }], |
| 23 | ], |
| 24 | }], |
| 25 | ['OS=="android"', { |
| 26 | 'targets': [ |
| 27 | { |
| 28 | 'target_name': 'libjingle_peerconnection_jni', |
| 29 | 'type': 'static_library', |
| 30 | 'dependencies': [ |
| 31 | '<(webrtc_root)/system_wrappers/system_wrappers.gyp:field_trial_default', |
| 32 | 'libjingle_peerconnection', |
| 33 | ], |
| 34 | 'sources': [ |
| 35 | 'androidvideocapturer.cc', |
| 36 | 'androidvideocapturer.h', |
| 37 | 'java/jni/androidmediacodeccommon.h', |
| 38 | 'java/jni/androidmediadecoder_jni.cc', |
| 39 | 'java/jni/androidmediadecoder_jni.h', |
| 40 | 'java/jni/androidmediaencoder_jni.cc', |
| 41 | 'java/jni/androidmediaencoder_jni.h', |
| 42 | 'java/jni/androidnetworkmonitor_jni.cc', |
| 43 | 'java/jni/androidnetworkmonitor_jni.h', |
| 44 | 'java/jni/androidvideocapturer_jni.cc', |
| 45 | 'java/jni/androidvideocapturer_jni.h', |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 46 | 'java/jni/surfacetexturehelper_jni.cc', |
| 47 | 'java/jni/surfacetexturehelper_jni.h', |
| 48 | 'java/jni/classreferenceholder.cc', |
| 49 | 'java/jni/classreferenceholder.h', |
| 50 | 'java/jni/jni_helpers.cc', |
| 51 | 'java/jni/jni_helpers.h', |
| 52 | 'java/jni/native_handle_impl.cc', |
| 53 | 'java/jni/native_handle_impl.h', |
| 54 | 'java/jni/peerconnection_jni.cc', |
| 55 | ], |
| 56 | 'include_dirs': [ |
| 57 | '<(libyuv_dir)/include', |
| 58 | ], |
| 59 | # TODO(kjellander): Make the code compile without disabling these flags. |
| 60 | # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307 |
| 61 | 'cflags': [ |
| 62 | '-Wno-sign-compare', |
| 63 | '-Wno-unused-variable', |
| 64 | ], |
| 65 | 'cflags!': [ |
| 66 | '-Wextra', |
| 67 | ], |
| 68 | 'cflags_cc!': [ |
| 69 | '-Wnon-virtual-dtor', |
| 70 | '-Woverloaded-virtual', |
| 71 | ], |
| 72 | 'msvs_disabled_warnings': [ |
| 73 | 4245, # conversion from 'int' to 'size_t', signed/unsigned mismatch. |
| 74 | 4267, # conversion from 'size_t' to 'int', possible loss of data. |
| 75 | 4389, # signed/unsigned mismatch. |
| 76 | ], |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 77 | }, |
| 78 | { |
| 79 | 'target_name': 'libjingle_peerconnection_so', |
| 80 | 'type': 'shared_library', |
| 81 | 'dependencies': [ |
| 82 | 'libjingle_peerconnection', |
| 83 | 'libjingle_peerconnection_jni', |
| 84 | ], |
| 85 | 'sources': [ |
| 86 | 'java/jni/jni_onload.cc', |
| 87 | ], |
| 88 | 'variables': { |
| 89 | # This library uses native JNI exports; tell GYP so that the |
| 90 | # required symbols will be kept. |
| 91 | 'use_native_jni_exports': 1, |
| 92 | }, |
| 93 | }, |
| 94 | { |
| 95 | # |libjingle_peerconnection_java| builds a jar file with name |
| 96 | # libjingle_peerconnection_java.jar using Chrome's build system. |
| 97 | # It includes all Java files needed to setup a PeeerConnection call |
| 98 | # from Android. |
| 99 | 'target_name': 'libjingle_peerconnection_java', |
| 100 | 'type': 'none', |
| 101 | 'dependencies': [ |
| 102 | 'libjingle_peerconnection_so', |
| 103 | ], |
| 104 | 'variables': { |
| 105 | # Designate as Chromium code and point to our lint settings to |
| 106 | # enable linting of the WebRTC code (this is the only way to make |
| 107 | # lint_action invoke the Android linter). |
| 108 | 'android_manifest_path': '<(webrtc_root)/build/android/AndroidManifest.xml', |
| 109 | 'suppressions_file': '<(webrtc_root)/build/android/suppressions.xml', |
| 110 | 'chromium_code': 1, |
| 111 | 'java_in_dir': 'java', |
| 112 | 'webrtc_base_dir': '<(webrtc_root)/base', |
| 113 | 'webrtc_modules_dir': '<(webrtc_root)/modules', |
| 114 | 'additional_src_dirs' : [ |
| 115 | 'java/android', |
| 116 | '<(webrtc_base_dir)/java/src', |
| 117 | '<(webrtc_modules_dir)/audio_device/android/java/src', |
| 118 | '<(webrtc_modules_dir)/video_render/android/java/src', |
| 119 | ], |
| 120 | }, |
| 121 | 'includes': ['../../build/java.gypi'], |
| 122 | }, # libjingle_peerconnection_java |
| 123 | ] |
| 124 | }], |
hjon | 6b03995 | 2016-02-25 12:32:58 -0800 | [diff] [blame] | 125 | ['OS=="ios" or (OS=="mac" and mac_deployment_target=="10.7")', { |
hjon | aa32c3e | 2015-12-13 19:58:11 -0800 | [diff] [blame] | 126 | 'targets': [ |
| 127 | { |
| 128 | 'target_name': 'rtc_api_objc', |
| 129 | 'type': 'static_library', |
hjon | 6b03995 | 2016-02-25 12:32:58 -0800 | [diff] [blame] | 130 | 'includes': [ |
| 131 | '../build/objc_common.gypi', |
| 132 | ], |
hjon | aa32c3e | 2015-12-13 19:58:11 -0800 | [diff] [blame] | 133 | 'dependencies': [ |
| 134 | '<(webrtc_root)/base/base.gyp:rtc_base_objc', |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 135 | 'libjingle_peerconnection', |
hjon | aa32c3e | 2015-12-13 19:58:11 -0800 | [diff] [blame] | 136 | ], |
| 137 | 'sources': [ |
Jon Hjelle | 2bf9a5f | 2016-01-21 16:14:11 -0800 | [diff] [blame] | 138 | 'objc/RTCAudioTrack+Private.h', |
| 139 | 'objc/RTCAudioTrack.h', |
| 140 | 'objc/RTCAudioTrack.mm', |
hjon | 6d49a8e | 2016-01-26 13:06:42 -0800 | [diff] [blame] | 141 | 'objc/RTCConfiguration+Private.h', |
| 142 | 'objc/RTCConfiguration.h', |
| 143 | 'objc/RTCConfiguration.mm', |
hjon | e373dc2 | 2016-01-22 14:04:27 -0800 | [diff] [blame] | 144 | 'objc/RTCDataChannel+Private.h', |
| 145 | 'objc/RTCDataChannel.h', |
| 146 | 'objc/RTCDataChannel.mm', |
hjon | da2183c | 2016-01-27 13:42:28 -0800 | [diff] [blame] | 147 | 'objc/RTCDataChannelConfiguration+Private.h', |
| 148 | 'objc/RTCDataChannelConfiguration.h', |
| 149 | 'objc/RTCDataChannelConfiguration.mm', |
Jon Hjelle | 29d5e57 | 2016-01-06 11:49:11 -0800 | [diff] [blame] | 150 | 'objc/RTCIceCandidate+Private.h', |
| 151 | 'objc/RTCIceCandidate.h', |
| 152 | 'objc/RTCIceCandidate.mm', |
hjon | aa32c3e | 2015-12-13 19:58:11 -0800 | [diff] [blame] | 153 | 'objc/RTCIceServer+Private.h', |
| 154 | 'objc/RTCIceServer.h', |
| 155 | 'objc/RTCIceServer.mm', |
hjon | 6f5ca08 | 2016-01-07 09:29:29 -0800 | [diff] [blame] | 156 | 'objc/RTCMediaConstraints+Private.h', |
| 157 | 'objc/RTCMediaConstraints.h', |
| 158 | 'objc/RTCMediaConstraints.mm', |
Jon Hjelle | 2bf9a5f | 2016-01-21 16:14:11 -0800 | [diff] [blame] | 159 | 'objc/RTCMediaStream+Private.h', |
| 160 | 'objc/RTCMediaStream.h', |
| 161 | 'objc/RTCMediaStream.mm', |
Jon Hjelle | 8102879 | 2016-01-11 13:16:13 -0800 | [diff] [blame] | 162 | 'objc/RTCMediaStreamTrack+Private.h', |
| 163 | 'objc/RTCMediaStreamTrack.h', |
| 164 | 'objc/RTCMediaStreamTrack.mm', |
Jon Hjelle | e799bad | 2016-01-11 13:47:11 -0800 | [diff] [blame] | 165 | 'objc/RTCOpenGLVideoRenderer.h', |
| 166 | 'objc/RTCOpenGLVideoRenderer.mm', |
hjon | f396f60 | 2016-02-11 16:19:06 -0800 | [diff] [blame] | 167 | 'objc/RTCPeerConnection+DataChannel.mm', |
| 168 | 'objc/RTCPeerConnection+Private.h', |
| 169 | 'objc/RTCPeerConnection+Stats.mm', |
| 170 | 'objc/RTCPeerConnection.h', |
| 171 | 'objc/RTCPeerConnection.mm', |
Jon Hjelle | da99da8 | 2016-01-20 13:40:30 -0800 | [diff] [blame] | 172 | 'objc/RTCPeerConnectionFactory+Private.h', |
| 173 | 'objc/RTCPeerConnectionFactory.h', |
| 174 | 'objc/RTCPeerConnectionFactory.mm', |
Jon Hjelle | 67e83d6 | 2016-01-06 12:05:22 -0800 | [diff] [blame] | 175 | 'objc/RTCSessionDescription+Private.h', |
| 176 | 'objc/RTCSessionDescription.h', |
| 177 | 'objc/RTCSessionDescription.mm', |
Jon Hjelle | a2c353f | 2016-01-11 13:11:38 -0800 | [diff] [blame] | 178 | 'objc/RTCStatsReport+Private.h', |
| 179 | 'objc/RTCStatsReport.h', |
| 180 | 'objc/RTCStatsReport.mm', |
Jon Hjelle | 7823495 | 2016-01-11 09:47:07 -0800 | [diff] [blame] | 181 | 'objc/RTCVideoFrame+Private.h', |
| 182 | 'objc/RTCVideoFrame.h', |
| 183 | 'objc/RTCVideoFrame.mm', |
Jon Hjelle | e799bad | 2016-01-11 13:47:11 -0800 | [diff] [blame] | 184 | 'objc/RTCVideoRenderer.h', |
Jon Hjelle | 891a446 | 2016-01-21 11:42:05 -0800 | [diff] [blame] | 185 | 'objc/RTCVideoRendererAdapter+Private.h', |
| 186 | 'objc/RTCVideoRendererAdapter.h', |
| 187 | 'objc/RTCVideoRendererAdapter.mm', |
Jon Hjelle | 065aacc | 2016-01-20 13:25:44 -0800 | [diff] [blame] | 188 | 'objc/RTCVideoSource+Private.h', |
| 189 | 'objc/RTCVideoSource.h', |
| 190 | 'objc/RTCVideoSource.mm', |
Jon Hjelle | ca91e38 | 2016-01-21 15:36:47 -0800 | [diff] [blame] | 191 | 'objc/RTCVideoTrack+Private.h', |
| 192 | 'objc/RTCVideoTrack.h', |
| 193 | 'objc/RTCVideoTrack.mm', |
Jon Hjelle | e799bad | 2016-01-11 13:47:11 -0800 | [diff] [blame] | 194 | ], |
hjon | a2f7798 | 2016-03-04 07:09:09 -0800 | [diff] [blame] | 195 | # TODO(hjon): Make this compile without linking to libstdc++ |
| 196 | # See https://bugs.chromium.org/p/webrtc/issues/detail?id=5593 |
| 197 | 'link_settings': { |
| 198 | 'libraries': [ |
| 199 | '-lstdc++', |
| 200 | ], |
| 201 | }, |
Jon Hjelle | e799bad | 2016-01-11 13:47:11 -0800 | [diff] [blame] | 202 | 'conditions': [ |
| 203 | ['OS=="ios"', { |
| 204 | 'sources': [ |
hjon | 6b03995 | 2016-02-25 12:32:58 -0800 | [diff] [blame] | 205 | 'objc/RTCAVFoundationVideoSource+Private.h', |
| 206 | 'objc/RTCAVFoundationVideoSource.h', |
| 207 | 'objc/RTCAVFoundationVideoSource.mm', |
Jon Hjelle | e799bad | 2016-01-11 13:47:11 -0800 | [diff] [blame] | 208 | 'objc/RTCEAGLVideoView.h', |
| 209 | 'objc/RTCEAGLVideoView.m', |
hjon | 6b03995 | 2016-02-25 12:32:58 -0800 | [diff] [blame] | 210 | 'objc/avfoundationvideocapturer.h', |
| 211 | 'objc/avfoundationvideocapturer.mm', |
Jon Hjelle | e799bad | 2016-01-11 13:47:11 -0800 | [diff] [blame] | 212 | ], |
| 213 | 'all_dependent_settings': { |
| 214 | 'xcode_settings': { |
| 215 | 'OTHER_LDFLAGS': [ |
| 216 | '-framework CoreGraphics', |
| 217 | '-framework GLKit', |
| 218 | '-framework OpenGLES', |
| 219 | '-framework QuartzCore', |
| 220 | ] |
| 221 | } |
kjellander | a96e2d7 | 2016-02-04 23:52:28 -0800 | [diff] [blame] | 222 | }, |
| 223 | # TODO(kjellander): Make the code compile without disabling these. |
| 224 | # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307 |
| 225 | 'cflags': [ |
| 226 | '-Wno-return-type', |
| 227 | ], |
| 228 | 'xcode_settings': { |
| 229 | 'WARNING_CFLAGS': [ |
| 230 | '-Wno-return-type', |
| 231 | ], |
| 232 | }, |
Jon Hjelle | e799bad | 2016-01-11 13:47:11 -0800 | [diff] [blame] | 233 | }], |
| 234 | ['OS=="mac"', { |
| 235 | 'sources': [ |
| 236 | 'objc/RTCNSGLVideoView.h', |
| 237 | 'objc/RTCNSGLVideoView.m', |
| 238 | ], |
solenberg | 8ad582d | 2016-03-16 09:34:56 -0700 | [diff] [blame^] | 239 | 'link_settings': { |
| 240 | 'xcode_settings': { |
| 241 | 'OTHER_LDFLAGS': [ |
| 242 | '-framework OpenGL', |
| 243 | ], |
| 244 | }, |
| 245 | }, |
Jon Hjelle | e799bad | 2016-01-11 13:47:11 -0800 | [diff] [blame] | 246 | }], |
hjon | aa32c3e | 2015-12-13 19:58:11 -0800 | [diff] [blame] | 247 | ], |
hjon | aa32c3e | 2015-12-13 19:58:11 -0800 | [diff] [blame] | 248 | } |
| 249 | ], |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 250 | }], # OS=="ios" |
| 251 | ], # conditions |
| 252 | 'targets': [ |
| 253 | { |
| 254 | 'target_name': 'libjingle_peerconnection', |
| 255 | 'type': 'static_library', |
| 256 | 'dependencies': [ |
| 257 | '<(webrtc_root)/media/media.gyp:rtc_media', |
kjellander@webrtc.org | 9b8df25 | 2016-02-12 06:47:59 +0100 | [diff] [blame] | 258 | '<(webrtc_root)/pc/pc.gyp:rtc_pc', |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 259 | ], |
| 260 | 'sources': [ |
| 261 | 'audiotrack.cc', |
| 262 | 'audiotrack.h', |
| 263 | 'datachannel.cc', |
| 264 | 'datachannel.h', |
| 265 | 'datachannelinterface.h', |
| 266 | 'dtlsidentitystore.cc', |
| 267 | 'dtlsidentitystore.h', |
| 268 | 'dtmfsender.cc', |
| 269 | 'dtmfsender.h', |
| 270 | 'dtmfsenderinterface.h', |
| 271 | 'jsep.h', |
| 272 | 'jsepicecandidate.cc', |
| 273 | 'jsepicecandidate.h', |
| 274 | 'jsepsessiondescription.cc', |
| 275 | 'jsepsessiondescription.h', |
| 276 | 'localaudiosource.cc', |
| 277 | 'localaudiosource.h', |
| 278 | 'mediaconstraintsinterface.cc', |
| 279 | 'mediaconstraintsinterface.h', |
| 280 | 'mediacontroller.cc', |
| 281 | 'mediacontroller.h', |
| 282 | 'mediastream.cc', |
| 283 | 'mediastream.h', |
| 284 | 'mediastreaminterface.h', |
| 285 | 'mediastreamobserver.cc', |
| 286 | 'mediastreamobserver.h', |
| 287 | 'mediastreamprovider.h', |
| 288 | 'mediastreamproxy.h', |
| 289 | 'mediastreamtrack.h', |
| 290 | 'mediastreamtrackproxy.h', |
| 291 | 'notifier.h', |
| 292 | 'peerconnection.cc', |
| 293 | 'peerconnection.h', |
| 294 | 'peerconnectionfactory.cc', |
| 295 | 'peerconnectionfactory.h', |
| 296 | 'peerconnectionfactoryproxy.h', |
| 297 | 'peerconnectioninterface.h', |
| 298 | 'peerconnectionproxy.h', |
| 299 | 'proxy.h', |
| 300 | 'remoteaudiosource.cc', |
| 301 | 'remoteaudiosource.h', |
| 302 | 'remotevideocapturer.cc', |
| 303 | 'remotevideocapturer.h', |
| 304 | 'rtpreceiver.cc', |
| 305 | 'rtpreceiver.h', |
| 306 | 'rtpreceiverinterface.h', |
| 307 | 'rtpsender.cc', |
| 308 | 'rtpsender.h', |
| 309 | 'rtpsenderinterface.h', |
| 310 | 'sctputils.cc', |
| 311 | 'sctputils.h', |
| 312 | 'statscollector.cc', |
| 313 | 'statscollector.h', |
| 314 | 'statstypes.cc', |
| 315 | 'statstypes.h', |
| 316 | 'streamcollection.h', |
perkj | a3ede6c | 2016-03-08 01:27:48 +0100 | [diff] [blame] | 317 | 'videocapturertracksource.cc', |
| 318 | 'videocapturertracksource.h', |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 319 | 'videosourceinterface.h', |
| 320 | 'videosourceproxy.h', |
| 321 | 'videotrack.cc', |
| 322 | 'videotrack.h', |
| 323 | 'videotrackrenderers.cc', |
| 324 | 'videotrackrenderers.h', |
perkj | 745b297 | 2016-03-08 02:54:58 +0100 | [diff] [blame] | 325 | 'videotracksource.cc', |
| 326 | 'videotracksource.h', |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 327 | 'webrtcsdp.cc', |
| 328 | 'webrtcsdp.h', |
| 329 | 'webrtcsession.cc', |
| 330 | 'webrtcsession.h', |
| 331 | 'webrtcsessiondescriptionfactory.cc', |
| 332 | 'webrtcsessiondescriptionfactory.h', |
| 333 | ], |
| 334 | # TODO(kjellander): Make the code compile without disabling these flags. |
| 335 | # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307 |
| 336 | 'cflags': [ |
| 337 | '-Wno-sign-compare', |
| 338 | ], |
| 339 | 'cflags_cc!': [ |
| 340 | '-Wnon-virtual-dtor', |
| 341 | '-Woverloaded-virtual', |
| 342 | ], |
| 343 | 'conditions': [ |
| 344 | ['clang==1', { |
| 345 | 'cflags!': [ |
| 346 | '-Wextra', |
| 347 | ], |
| 348 | 'xcode_settings': { |
| 349 | 'WARNING_CFLAGS!': ['-Wextra'], |
| 350 | }, |
| 351 | }, { |
| 352 | 'cflags': [ |
| 353 | '-Wno-maybe-uninitialized', # Only exists for GCC. |
| 354 | ], |
| 355 | }], |
| 356 | ['OS=="win"', { |
| 357 | # Disable warning for signed/unsigned mismatch. |
| 358 | 'msvs_settings': { |
| 359 | 'VCCLCompilerTool': { |
| 360 | 'AdditionalOptions!': ['/we4389'], |
| 361 | }, |
| 362 | }, |
| 363 | }], |
| 364 | ['OS=="win" and clang==1', { |
| 365 | 'msvs_settings': { |
| 366 | 'VCCLCompilerTool': { |
| 367 | 'AdditionalOptions': [ |
| 368 | '-Wno-sign-compare', |
| 369 | ], |
| 370 | }, |
| 371 | }, |
| 372 | }], |
| 373 | ], |
| 374 | }, # target libjingle_peerconnection |
| 375 | ], # targets |
hjon | aa32c3e | 2015-12-13 19:58:11 -0800 | [diff] [blame] | 376 | } |