blob: 4fe8ce845884faf8014450b9431e77a9ef45b03b [file] [log] [blame]
hjonaa32c3e2015-12-13 19:58:11 -08001# 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 Kjellander15583c12016-02-10 10:53:12 +010012 ['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 Kjellander15583c12016-02-10 10:53:12 +010046 '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 Kjellander15583c12016-02-10 10:53:12 +010077 },
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 }],
hjon6b039952016-02-25 12:32:58 -0800125 ['OS=="ios" or (OS=="mac" and mac_deployment_target=="10.7")', {
hjonaa32c3e2015-12-13 19:58:11 -0800126 'targets': [
127 {
128 'target_name': 'rtc_api_objc',
129 'type': 'static_library',
hjon6b039952016-02-25 12:32:58 -0800130 'includes': [
131 '../build/objc_common.gypi',
132 ],
hjonaa32c3e2015-12-13 19:58:11 -0800133 'dependencies': [
134 '<(webrtc_root)/base/base.gyp:rtc_base_objc',
Henrik Kjellander15583c12016-02-10 10:53:12 +0100135 'libjingle_peerconnection',
hjonaa32c3e2015-12-13 19:58:11 -0800136 ],
137 'sources': [
Jon Hjelle2bf9a5f2016-01-21 16:14:11 -0800138 'objc/RTCAudioTrack+Private.h',
139 'objc/RTCAudioTrack.h',
140 'objc/RTCAudioTrack.mm',
hjon6d49a8e2016-01-26 13:06:42 -0800141 'objc/RTCConfiguration+Private.h',
142 'objc/RTCConfiguration.h',
143 'objc/RTCConfiguration.mm',
hjone373dc22016-01-22 14:04:27 -0800144 'objc/RTCDataChannel+Private.h',
145 'objc/RTCDataChannel.h',
146 'objc/RTCDataChannel.mm',
hjonda2183c2016-01-27 13:42:28 -0800147 'objc/RTCDataChannelConfiguration+Private.h',
148 'objc/RTCDataChannelConfiguration.h',
149 'objc/RTCDataChannelConfiguration.mm',
Jon Hjelle29d5e572016-01-06 11:49:11 -0800150 'objc/RTCIceCandidate+Private.h',
151 'objc/RTCIceCandidate.h',
152 'objc/RTCIceCandidate.mm',
hjonaa32c3e2015-12-13 19:58:11 -0800153 'objc/RTCIceServer+Private.h',
154 'objc/RTCIceServer.h',
155 'objc/RTCIceServer.mm',
hjon6f5ca082016-01-07 09:29:29 -0800156 'objc/RTCMediaConstraints+Private.h',
157 'objc/RTCMediaConstraints.h',
158 'objc/RTCMediaConstraints.mm',
Jon Hjelle2bf9a5f2016-01-21 16:14:11 -0800159 'objc/RTCMediaStream+Private.h',
160 'objc/RTCMediaStream.h',
161 'objc/RTCMediaStream.mm',
Jon Hjelle81028792016-01-11 13:16:13 -0800162 'objc/RTCMediaStreamTrack+Private.h',
163 'objc/RTCMediaStreamTrack.h',
164 'objc/RTCMediaStreamTrack.mm',
Jon Hjellee799bad2016-01-11 13:47:11 -0800165 'objc/RTCOpenGLVideoRenderer.h',
166 'objc/RTCOpenGLVideoRenderer.mm',
hjonf396f602016-02-11 16:19:06 -0800167 'objc/RTCPeerConnection+DataChannel.mm',
168 'objc/RTCPeerConnection+Private.h',
169 'objc/RTCPeerConnection+Stats.mm',
170 'objc/RTCPeerConnection.h',
171 'objc/RTCPeerConnection.mm',
Jon Hjelleda99da82016-01-20 13:40:30 -0800172 'objc/RTCPeerConnectionFactory+Private.h',
173 'objc/RTCPeerConnectionFactory.h',
174 'objc/RTCPeerConnectionFactory.mm',
Jon Hjelle67e83d62016-01-06 12:05:22 -0800175 'objc/RTCSessionDescription+Private.h',
176 'objc/RTCSessionDescription.h',
177 'objc/RTCSessionDescription.mm',
Jon Hjellea2c353f2016-01-11 13:11:38 -0800178 'objc/RTCStatsReport+Private.h',
179 'objc/RTCStatsReport.h',
180 'objc/RTCStatsReport.mm',
Jon Hjelle78234952016-01-11 09:47:07 -0800181 'objc/RTCVideoFrame+Private.h',
182 'objc/RTCVideoFrame.h',
183 'objc/RTCVideoFrame.mm',
Jon Hjellee799bad2016-01-11 13:47:11 -0800184 'objc/RTCVideoRenderer.h',
Jon Hjelle891a4462016-01-21 11:42:05 -0800185 'objc/RTCVideoRendererAdapter+Private.h',
186 'objc/RTCVideoRendererAdapter.h',
187 'objc/RTCVideoRendererAdapter.mm',
Jon Hjelle065aacc2016-01-20 13:25:44 -0800188 'objc/RTCVideoSource+Private.h',
189 'objc/RTCVideoSource.h',
190 'objc/RTCVideoSource.mm',
Jon Hjelleca91e382016-01-21 15:36:47 -0800191 'objc/RTCVideoTrack+Private.h',
192 'objc/RTCVideoTrack.h',
193 'objc/RTCVideoTrack.mm',
Jon Hjellee799bad2016-01-11 13:47:11 -0800194 ],
195 'conditions': [
196 ['OS=="ios"', {
197 'sources': [
hjon6b039952016-02-25 12:32:58 -0800198 'objc/RTCAVFoundationVideoSource+Private.h',
199 'objc/RTCAVFoundationVideoSource.h',
200 'objc/RTCAVFoundationVideoSource.mm',
Jon Hjellee799bad2016-01-11 13:47:11 -0800201 'objc/RTCEAGLVideoView.h',
202 'objc/RTCEAGLVideoView.m',
hjon6b039952016-02-25 12:32:58 -0800203 'objc/avfoundationvideocapturer.h',
204 'objc/avfoundationvideocapturer.mm',
Jon Hjellee799bad2016-01-11 13:47:11 -0800205 ],
206 'all_dependent_settings': {
207 'xcode_settings': {
208 'OTHER_LDFLAGS': [
209 '-framework CoreGraphics',
210 '-framework GLKit',
211 '-framework OpenGLES',
212 '-framework QuartzCore',
213 ]
214 }
kjellandera96e2d72016-02-04 23:52:28 -0800215 },
216 # TODO(kjellander): Make the code compile without disabling these.
217 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307
218 'cflags': [
219 '-Wno-return-type',
220 ],
221 'xcode_settings': {
222 'WARNING_CFLAGS': [
223 '-Wno-return-type',
224 ],
225 },
Jon Hjellee799bad2016-01-11 13:47:11 -0800226 }],
227 ['OS=="mac"', {
228 'sources': [
229 'objc/RTCNSGLVideoView.h',
230 'objc/RTCNSGLVideoView.m',
231 ],
232 }],
hjonaa32c3e2015-12-13 19:58:11 -0800233 ],
hjonaa32c3e2015-12-13 19:58:11 -0800234 }
235 ],
Henrik Kjellander15583c12016-02-10 10:53:12 +0100236 }], # OS=="ios"
237 ], # conditions
238 'targets': [
239 {
240 'target_name': 'libjingle_peerconnection',
241 'type': 'static_library',
242 'dependencies': [
243 '<(webrtc_root)/media/media.gyp:rtc_media',
kjellander@webrtc.org9b8df252016-02-12 06:47:59 +0100244 '<(webrtc_root)/pc/pc.gyp:rtc_pc',
Henrik Kjellander15583c12016-02-10 10:53:12 +0100245 ],
246 'sources': [
247 'audiotrack.cc',
248 'audiotrack.h',
249 'datachannel.cc',
250 'datachannel.h',
251 'datachannelinterface.h',
252 'dtlsidentitystore.cc',
253 'dtlsidentitystore.h',
254 'dtmfsender.cc',
255 'dtmfsender.h',
256 'dtmfsenderinterface.h',
257 'jsep.h',
258 'jsepicecandidate.cc',
259 'jsepicecandidate.h',
260 'jsepsessiondescription.cc',
261 'jsepsessiondescription.h',
262 'localaudiosource.cc',
263 'localaudiosource.h',
264 'mediaconstraintsinterface.cc',
265 'mediaconstraintsinterface.h',
266 'mediacontroller.cc',
267 'mediacontroller.h',
268 'mediastream.cc',
269 'mediastream.h',
270 'mediastreaminterface.h',
271 'mediastreamobserver.cc',
272 'mediastreamobserver.h',
273 'mediastreamprovider.h',
274 'mediastreamproxy.h',
275 'mediastreamtrack.h',
276 'mediastreamtrackproxy.h',
277 'notifier.h',
278 'peerconnection.cc',
279 'peerconnection.h',
280 'peerconnectionfactory.cc',
281 'peerconnectionfactory.h',
282 'peerconnectionfactoryproxy.h',
283 'peerconnectioninterface.h',
284 'peerconnectionproxy.h',
285 'proxy.h',
286 'remoteaudiosource.cc',
287 'remoteaudiosource.h',
288 'remotevideocapturer.cc',
289 'remotevideocapturer.h',
290 'rtpreceiver.cc',
291 'rtpreceiver.h',
292 'rtpreceiverinterface.h',
293 'rtpsender.cc',
294 'rtpsender.h',
295 'rtpsenderinterface.h',
296 'sctputils.cc',
297 'sctputils.h',
298 'statscollector.cc',
299 'statscollector.h',
300 'statstypes.cc',
301 'statstypes.h',
302 'streamcollection.h',
303 'videosource.cc',
304 'videosource.h',
305 'videosourceinterface.h',
306 'videosourceproxy.h',
307 'videotrack.cc',
308 'videotrack.h',
309 'videotrackrenderers.cc',
310 'videotrackrenderers.h',
311 'webrtcsdp.cc',
312 'webrtcsdp.h',
313 'webrtcsession.cc',
314 'webrtcsession.h',
315 'webrtcsessiondescriptionfactory.cc',
316 'webrtcsessiondescriptionfactory.h',
317 ],
318 # TODO(kjellander): Make the code compile without disabling these flags.
319 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307
320 'cflags': [
321 '-Wno-sign-compare',
322 ],
323 'cflags_cc!': [
324 '-Wnon-virtual-dtor',
325 '-Woverloaded-virtual',
326 ],
327 'conditions': [
328 ['clang==1', {
329 'cflags!': [
330 '-Wextra',
331 ],
332 'xcode_settings': {
333 'WARNING_CFLAGS!': ['-Wextra'],
334 },
335 }, {
336 'cflags': [
337 '-Wno-maybe-uninitialized', # Only exists for GCC.
338 ],
339 }],
340 ['OS=="win"', {
341 # Disable warning for signed/unsigned mismatch.
342 'msvs_settings': {
343 'VCCLCompilerTool': {
344 'AdditionalOptions!': ['/we4389'],
345 },
346 },
347 }],
348 ['OS=="win" and clang==1', {
349 'msvs_settings': {
350 'VCCLCompilerTool': {
351 'AdditionalOptions': [
352 '-Wno-sign-compare',
353 ],
354 },
355 },
356 }],
357 ],
358 }, # target libjingle_peerconnection
359 ], # targets
hjonaa32c3e2015-12-13 19:58:11 -0800360}