blob: 9ef10cebf6880fc4eea77a23d60f9aeafd9140df [file] [log] [blame]
Peter Boströmfa566d62015-11-11 12:11:15 +00001# Copyright (c) 2012 The WebRTC Project Authors. All rights reserved.
henrike@webrtc.org451745e2013-12-12 16:55:37 +00002#
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{
Peter Boströmfa566d62015-11-11 12:11:15 +00009 'includes': [
10 '../talk/build/common.gypi',
11 ],
tkchinbad7b092016-03-11 20:45:16 -080012
henrike@webrtc.org451745e2013-12-12 16:55:37 +000013 'conditions': [
Peter Boströmfa566d62015-11-11 12:11:15 +000014 ['OS=="linux" or OS=="win"', {
15 'targets': [
16 {
tkchinbad7b092016-03-11 20:45:16 -080017 'target_name': 'relayserver',
18 'type': 'executable',
19 'dependencies': [
20 '<(webrtc_root)/base/base.gyp:rtc_base_approved',
21 '<(webrtc_root)/pc/pc.gyp:rtc_pc',
22 ],
23 'sources': [
24 'examples/relayserver/relayserver_main.cc',
25 ],
26 }, # target relayserver
27 {
28 'target_name': 'stunserver',
29 'type': 'executable',
30 'dependencies': [
31 '<(webrtc_root)/base/base.gyp:rtc_base_approved',
32 '<(webrtc_root)/pc/pc.gyp:rtc_pc',
33 ],
34 'sources': [
35 'examples/stunserver/stunserver_main.cc',
36 ],
37 }, # target stunserver
38 {
39 'target_name': 'turnserver',
40 'type': 'executable',
41 'dependencies': [
42 '<(webrtc_root)/base/base.gyp:rtc_base_approved',
43 '<(webrtc_root)/pc/pc.gyp:rtc_pc',
44 ],
45 'sources': [
46 'examples/turnserver/turnserver_main.cc',
47 ],
48 }, # target turnserver
49 {
50 'target_name': 'peerconnection_server',
51 'type': 'executable',
52 'sources': [
53 'examples/peerconnection/server/data_socket.cc',
54 'examples/peerconnection/server/data_socket.h',
55 'examples/peerconnection/server/main.cc',
56 'examples/peerconnection/server/peer_channel.cc',
57 'examples/peerconnection/server/peer_channel.h',
58 'examples/peerconnection/server/utils.cc',
59 'examples/peerconnection/server/utils.h',
60 ],
61 'dependencies': [
62 '<(webrtc_root)/base/base.gyp:rtc_base_approved',
63 '<(webrtc_root)/common.gyp:webrtc_common',
64 '<(webrtc_root)/tools/internal_tools.gyp:command_line_parser',
65 ],
66 # TODO(ronghuawu): crbug.com/167187 fix size_t to int truncations.
67 'msvs_disabled_warnings': [ 4309, ],
68 }, # target peerconnection_server
69 {
Peter Boströmfa566d62015-11-11 12:11:15 +000070 'target_name': 'peerconnection_client',
71 'type': 'executable',
72 'sources': [
73 'examples/peerconnection/client/conductor.cc',
74 'examples/peerconnection/client/conductor.h',
75 'examples/peerconnection/client/defaults.cc',
76 'examples/peerconnection/client/defaults.h',
77 'examples/peerconnection/client/peer_connection_client.cc',
78 'examples/peerconnection/client/peer_connection_client.h',
79 ],
80 'dependencies': [
Henrik Kjellander15583c12016-02-10 10:53:12 +010081 'api/api.gyp:libjingle_peerconnection',
Peter Boströmfa566d62015-11-11 12:11:15 +000082 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:field_trial_default',
Peter Boströmfa566d62015-11-11 12:11:15 +000083 ],
84 'conditions': [
85 ['build_json==1', {
86 'dependencies': [
87 '<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
88 ],
89 }],
90 # TODO(ronghuawu): Move these files to a win/ directory then they
91 # can be excluded automatically.
92 ['OS=="win"', {
93 'sources': [
94 'examples/peerconnection/client/flagdefs.h',
95 'examples/peerconnection/client/main.cc',
96 'examples/peerconnection/client/main_wnd.cc',
97 'examples/peerconnection/client/main_wnd.h',
98 ],
99 'msvs_settings': {
100 'VCLinkerTool': {
101 'SubSystem': '2', # Windows
102 },
103 },
104 }], # OS=="win"
kjellander7cae30c2015-12-16 14:05:29 -0800105 ['OS=="win" and clang==1', {
106 'msvs_settings': {
107 'VCCLCompilerTool': {
108 'AdditionalOptions': [
109 # Disable warnings failing when compiling with Clang on Windows.
110 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
111 '-Wno-reorder',
112 '-Wno-unused-function',
113 ],
114 },
115 },
116 }], # OS=="win" and clang==1
Peter Boströmfa566d62015-11-11 12:11:15 +0000117 ['OS=="linux"', {
118 'sources': [
119 'examples/peerconnection/client/linux/main.cc',
120 'examples/peerconnection/client/linux/main_wnd.cc',
121 'examples/peerconnection/client/linux/main_wnd.h',
122 ],
123 'cflags': [
124 '<!@(pkg-config --cflags glib-2.0 gobject-2.0 gtk+-2.0)',
125 ],
126 'link_settings': {
127 'ldflags': [
128 '<!@(pkg-config --libs-only-L --libs-only-other glib-2.0'
129 ' gobject-2.0 gthread-2.0 gtk+-2.0)',
130 ],
131 'libraries': [
132 '<!@(pkg-config --libs-only-l glib-2.0 gobject-2.0'
133 ' gthread-2.0 gtk+-2.0)',
134 '-lX11',
135 '-lXcomposite',
136 '-lXext',
137 '-lXrender',
138 ],
139 },
140 }], # OS=="linux"
Henrik Kjellander235aaa72016-02-18 21:52:21 +0100141 ['OS=="linux" and target_arch=="ia32"', {
142 'cflags': [
143 '-Wno-sentinel',
144 ],
145 }], # OS=="linux" and target_arch=="ia32"
Peter Boströmfa566d62015-11-11 12:11:15 +0000146 ], # conditions
147 }, # target peerconnection_client
148 ], # targets
149 }], # OS=="linux" or OS=="win"
150
tkchin76356842015-12-02 16:42:18 -0800151 ['OS=="ios" or (OS=="mac" and target_arch!="ia32")', {
Peter Boströmfa566d62015-11-11 12:11:15 +0000152 'targets': [
153 {
154 'target_name': 'apprtc_common',
155 'type': 'static_library',
156 'dependencies': [
tkchin9eeb6242016-04-27 01:54:20 -0700157 '<(webrtc_root)/sdk/sdk.gyp:rtc_sdk_common_objc',
Peter Boströmfa566d62015-11-11 12:11:15 +0000158 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:field_trial_default',
Peter Boströmfa566d62015-11-11 12:11:15 +0000159 ],
160 'sources': [
161 'examples/objc/AppRTCDemo/common/ARDUtilities.h',
162 'examples/objc/AppRTCDemo/common/ARDUtilities.m',
163 ],
164 'include_dirs': [
165 'examples/objc/AppRTCDemo/common',
166 ],
167 'direct_dependent_settings': {
168 'include_dirs': [
169 'examples/objc/AppRTCDemo/common',
170 ],
171 },
172 'conditions': [
kjellander@webrtc.org66a99282016-02-18 20:30:14 +0100173 ['OS=="ios"', {
174 'xcode_settings': {
175 'WARNING_CFLAGS': [
176 # Suppress compiler warnings about deprecated that triggered
177 # when moving from ios_deployment_target 7.0 to 9.0.
178 # See webrtc:5549 for more details.
179 '-Wno-deprecated-declarations',
180 ],
181 },
182 }],
Peter Boströmfa566d62015-11-11 12:11:15 +0000183 ['OS=="mac"', {
184 'xcode_settings': {
185 'MACOSX_DEPLOYMENT_TARGET' : '10.8',
186 },
187 }],
188 ],
hjon79858f82016-03-13 22:08:26 -0700189 'xcode_settings': {
190 'CLANG_ENABLE_OBJC_ARC': 'YES',
191 },
Peter Boströmfa566d62015-11-11 12:11:15 +0000192 'link_settings': {
193 'xcode_settings': {
194 'OTHER_LDFLAGS': [
195 '-framework QuartzCore',
196 ],
197 },
198 },
199 },
200 {
201 'target_name': 'apprtc_signaling',
202 'type': 'static_library',
203 'dependencies': [
tkchin9eeb6242016-04-27 01:54:20 -0700204 '<(webrtc_root)/sdk/sdk.gyp:rtc_sdk_peerconnection_objc',
Peter Boströmfa566d62015-11-11 12:11:15 +0000205 'apprtc_common',
Peter Boströmfa566d62015-11-11 12:11:15 +0000206 'socketrocket',
207 ],
208 'sources': [
209 'examples/objc/AppRTCDemo/ARDAppClient.h',
210 'examples/objc/AppRTCDemo/ARDAppClient.m',
211 'examples/objc/AppRTCDemo/ARDAppClient+Internal.h',
212 'examples/objc/AppRTCDemo/ARDAppEngineClient.h',
213 'examples/objc/AppRTCDemo/ARDAppEngineClient.m',
214 'examples/objc/AppRTCDemo/ARDBitrateTracker.h',
215 'examples/objc/AppRTCDemo/ARDBitrateTracker.m',
216 'examples/objc/AppRTCDemo/ARDCEODTURNClient.h',
217 'examples/objc/AppRTCDemo/ARDCEODTURNClient.m',
218 'examples/objc/AppRTCDemo/ARDJoinResponse.h',
219 'examples/objc/AppRTCDemo/ARDJoinResponse.m',
220 'examples/objc/AppRTCDemo/ARDJoinResponse+Internal.h',
221 'examples/objc/AppRTCDemo/ARDMessageResponse.h',
222 'examples/objc/AppRTCDemo/ARDMessageResponse.m',
223 'examples/objc/AppRTCDemo/ARDMessageResponse+Internal.h',
224 'examples/objc/AppRTCDemo/ARDRoomServerClient.h',
225 'examples/objc/AppRTCDemo/ARDSDPUtils.h',
226 'examples/objc/AppRTCDemo/ARDSDPUtils.m',
227 'examples/objc/AppRTCDemo/ARDSignalingChannel.h',
228 'examples/objc/AppRTCDemo/ARDSignalingMessage.h',
229 'examples/objc/AppRTCDemo/ARDSignalingMessage.m',
230 'examples/objc/AppRTCDemo/ARDStatsBuilder.h',
231 'examples/objc/AppRTCDemo/ARDStatsBuilder.m',
232 'examples/objc/AppRTCDemo/ARDTURNClient.h',
233 'examples/objc/AppRTCDemo/ARDWebSocketChannel.h',
234 'examples/objc/AppRTCDemo/ARDWebSocketChannel.m',
hjon79858f82016-03-13 22:08:26 -0700235 'examples/objc/AppRTCDemo/RTCIceCandidate+JSON.h',
236 'examples/objc/AppRTCDemo/RTCIceCandidate+JSON.m',
237 'examples/objc/AppRTCDemo/RTCIceServer+JSON.h',
238 'examples/objc/AppRTCDemo/RTCIceServer+JSON.m',
Peter Boströmfa566d62015-11-11 12:11:15 +0000239 'examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.h',
240 'examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.m',
241 'examples/objc/AppRTCDemo/RTCSessionDescription+JSON.h',
242 'examples/objc/AppRTCDemo/RTCSessionDescription+JSON.m',
243 ],
244 'include_dirs': [
245 'examples/objc/AppRTCDemo',
246 ],
247 'direct_dependent_settings': {
248 'include_dirs': [
249 'examples/objc/AppRTCDemo',
250 ],
251 },
252 'export_dependent_settings': [
tkchin9eeb6242016-04-27 01:54:20 -0700253 '<(webrtc_root)/sdk/sdk.gyp:rtc_sdk_peerconnection_objc',
Peter Boströmfa566d62015-11-11 12:11:15 +0000254 ],
255 'conditions': [
kjellander@webrtc.org66a99282016-02-18 20:30:14 +0100256 ['OS=="ios"', {
257 'xcode_settings': {
258 'WARNING_CFLAGS': [
259 # Suppress compiler warnings about deprecated that triggered
260 # when moving from ios_deployment_target 7.0 to 9.0.
261 # See webrtc:5549 for more details.
262 '-Wno-deprecated-declarations',
263 ],
264 },
265 }],
Peter Boströmfa566d62015-11-11 12:11:15 +0000266 ['OS=="mac"', {
267 'xcode_settings': {
268 'MACOSX_DEPLOYMENT_TARGET' : '10.8',
269 },
270 }],
271 ],
hjon79858f82016-03-13 22:08:26 -0700272 'xcode_settings': {
273 'CLANG_ENABLE_OBJC_ARC': 'YES',
274 },
Peter Boströmfa566d62015-11-11 12:11:15 +0000275 },
276 {
277 'target_name': 'AppRTCDemo',
278 'type': 'executable',
279 'product_name': 'AppRTCDemo',
280 'mac_bundle': 1,
281 'dependencies': [
282 'apprtc_common',
283 'apprtc_signaling',
284 ],
285 'conditions': [
286 ['OS=="ios"', {
287 'mac_bundle_resources': [
tkchin0ce3bf92016-03-12 16:52:04 -0800288 'examples/objc/AppRTCDemo/ios/resources/Roboto-Regular.ttf',
Peter Boströmfa566d62015-11-11 12:11:15 +0000289 'examples/objc/AppRTCDemo/ios/resources/iPhone5@2x.png',
290 'examples/objc/AppRTCDemo/ios/resources/iPhone6@2x.png',
291 'examples/objc/AppRTCDemo/ios/resources/iPhone6p@3x.png',
Peter Boströmfa566d62015-11-11 12:11:15 +0000292 'examples/objc/AppRTCDemo/ios/resources/ic_call_end_black_24dp.png',
293 'examples/objc/AppRTCDemo/ios/resources/ic_call_end_black_24dp@2x.png',
294 'examples/objc/AppRTCDemo/ios/resources/ic_clear_black_24dp.png',
295 'examples/objc/AppRTCDemo/ios/resources/ic_clear_black_24dp@2x.png',
tkchin0ce3bf92016-03-12 16:52:04 -0800296 'examples/objc/AppRTCDemo/ios/resources/ic_surround_sound_black_24dp.png',
297 'examples/objc/AppRTCDemo/ios/resources/ic_surround_sound_black_24dp@2x.png',
Peter Boströmfa566d62015-11-11 12:11:15 +0000298 'examples/objc/AppRTCDemo/ios/resources/ic_switch_video_black_24dp.png',
299 'examples/objc/AppRTCDemo/ios/resources/ic_switch_video_black_24dp@2x.png',
Zeke Chin615fabb2016-02-24 10:58:52 -0800300 'examples/objc/AppRTCDemo/ios/resources/mozart.mp3',
Peter Boströmfa566d62015-11-11 12:11:15 +0000301 'examples/objc/Icon.png',
302 ],
303 'sources': [
304 'examples/objc/AppRTCDemo/ios/ARDAppDelegate.h',
305 'examples/objc/AppRTCDemo/ios/ARDAppDelegate.m',
306 'examples/objc/AppRTCDemo/ios/ARDMainView.h',
307 'examples/objc/AppRTCDemo/ios/ARDMainView.m',
308 'examples/objc/AppRTCDemo/ios/ARDMainViewController.h',
309 'examples/objc/AppRTCDemo/ios/ARDMainViewController.m',
310 'examples/objc/AppRTCDemo/ios/ARDStatsView.h',
311 'examples/objc/AppRTCDemo/ios/ARDStatsView.m',
312 'examples/objc/AppRTCDemo/ios/ARDVideoCallView.h',
313 'examples/objc/AppRTCDemo/ios/ARDVideoCallView.m',
314 'examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.h',
315 'examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.m',
316 'examples/objc/AppRTCDemo/ios/AppRTCDemo-Prefix.pch',
317 'examples/objc/AppRTCDemo/ios/UIImage+ARDUtilities.h',
318 'examples/objc/AppRTCDemo/ios/UIImage+ARDUtilities.m',
319 'examples/objc/AppRTCDemo/ios/main.m',
320 ],
321 'xcode_settings': {
322 'INFOPLIST_FILE': 'examples/objc/AppRTCDemo/ios/Info.plist',
kjellander@webrtc.org66a99282016-02-18 20:30:14 +0100323 'WARNING_CFLAGS': [
324 # Suppress compiler warnings about deprecated that triggered
325 # when moving from ios_deployment_target 7.0 to 9.0.
326 # See webrtc:5549 for more details.
327 '-Wno-deprecated-declarations',
328 ],
Peter Boströmfa566d62015-11-11 12:11:15 +0000329 },
330 }],
331 ['OS=="mac"', {
332 'sources': [
333 'examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.h',
334 'examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.m',
335 'examples/objc/AppRTCDemo/mac/APPRTCViewController.h',
336 'examples/objc/AppRTCDemo/mac/APPRTCViewController.m',
337 'examples/objc/AppRTCDemo/mac/main.m',
338 ],
339 'xcode_settings': {
340 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'NO',
341 'INFOPLIST_FILE': 'examples/objc/AppRTCDemo/mac/Info.plist',
342 'MACOSX_DEPLOYMENT_TARGET' : '10.8',
343 'OTHER_LDFLAGS': [
344 '-framework AVFoundation',
345 ],
346 },
347 }],
348 ['target_arch=="ia32"', {
349 'dependencies' : [
350 '<(DEPTH)/testing/iossim/iossim.gyp:iossim#host',
351 ],
352 }],
353 ],
hjon79858f82016-03-13 22:08:26 -0700354 'xcode_settings': {
355 'CLANG_ENABLE_OBJC_ARC': 'YES',
356 },
Peter Boströmfa566d62015-11-11 12:11:15 +0000357 }, # target AppRTCDemo
358 {
359 # TODO(tkchin): move this into the real third party location and
360 # have it mirrored on chrome infra.
361 'target_name': 'socketrocket',
362 'type': 'static_library',
363 'sources': [
364 'examples/objc/AppRTCDemo/third_party/SocketRocket/SRWebSocket.h',
365 'examples/objc/AppRTCDemo/third_party/SocketRocket/SRWebSocket.m',
366 ],
367 'conditions': [
368 ['OS=="mac"', {
369 'xcode_settings': {
370 # SocketRocket autosynthesizes some properties. Disable the
371 # warning so we can compile successfully.
372 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'NO',
373 'MACOSX_DEPLOYMENT_TARGET' : '10.8',
374 # SRWebSocket.m uses code with partial availability.
375 # https://code.google.com/p/webrtc/issues/detail?id=4695
376 'WARNING_CFLAGS!': ['-Wpartial-availability'],
377 },
378 }],
379 ],
380 'direct_dependent_settings': {
381 'include_dirs': [
382 'examples/objc/AppRTCDemo/third_party/SocketRocket',
383 ],
384 },
385 'xcode_settings': {
386 'CLANG_ENABLE_OBJC_ARC': 'YES',
387 'WARNING_CFLAGS': [
388 '-Wno-deprecated-declarations',
tkchin76356842015-12-02 16:42:18 -0800389 '-Wno-nonnull',
Peter Boströmfa566d62015-11-11 12:11:15 +0000390 ],
391 },
392 'link_settings': {
393 'xcode_settings': {
394 'OTHER_LDFLAGS': [
395 '-framework CFNetwork',
396 '-licucore',
397 ],
398 },
399 }
400 }, # target socketrocket
401 ], # targets
tkchin76356842015-12-02 16:42:18 -0800402 }], # OS=="ios" or (OS=="mac" and target_arch!="ia32")
Peter Boströmfa566d62015-11-11 12:11:15 +0000403
henrike@webrtc.org451745e2013-12-12 16:55:37 +0000404 ['OS=="android"', {
405 'targets': [
406 {
Peter Boströmfa566d62015-11-11 12:11:15 +0000407 'target_name': 'AppRTCDemo',
henrike@webrtc.org451745e2013-12-12 16:55:37 +0000408 'type': 'none',
409 'dependencies': [
Henrik Kjellander15583c12016-02-10 10:53:12 +0100410 'api/api.gyp:libjingle_peerconnection_java',
Sami Kalliomäki57f95dc2016-05-16 16:21:28 +0200411 '<(DEPTH)/third_party/android_tools/android_tools.gyp:android_support_design_javalib'
henrike@webrtc.org451745e2013-12-12 16:55:37 +0000412 ],
Peter Boströmfa566d62015-11-11 12:11:15 +0000413 'variables': {
414 'apk_name': 'AppRTCDemo',
415 'java_in_dir': 'examples/androidapp',
416 'has_java_resources': 1,
417 'resource_dir': 'examples/androidapp/res',
418 'R_package': 'org.appspot.apprtc',
419 'R_package_relpath': 'org/appspot/apprtc',
420 'input_jars_paths': [
421 'examples/androidapp/third_party/autobanh/autobanh.jar',
Sami Kalliomäki57f95dc2016-05-16 16:21:28 +0200422 '<(DEPTH)/third_party/android_tools/sdk/extras/android/support/v4/android-support-v4.jar',
Peter Boströmfa566d62015-11-11 12:11:15 +0000423 ],
424 'library_dexed_jars_paths': [
425 'examples/androidapp/third_party/autobanh/autobanh.jar',
Sami Kalliomäki57f95dc2016-05-16 16:21:28 +0200426 '<(DEPTH)/third_party/android_tools/sdk/extras/android/support/v4/android-support-v4.jar',
Peter Boströmfa566d62015-11-11 12:11:15 +0000427 ],
428 'native_lib_target': 'libjingle_peerconnection_so',
429 'add_to_dependents_classpaths':1,
430 },
431 'includes': [ '../build/java_apk.gypi' ],
432 }, # target AppRTCDemo
433
434 {
435 # AppRTCDemo creates a .jar as a side effect. Any java targets
436 # that need that .jar in their classpath should depend on this target,
437 # AppRTCDemo_apk. Dependents of AppRTCDemo_apk receive its
438 # jar path in the variable 'apk_output_jar_path'.
439 # This target should only be used by targets which instrument
440 # AppRTCDemo_apk.
441 'target_name': 'AppRTCDemo_apk',
442 'type': 'none',
443 'dependencies': [
444 'AppRTCDemo',
445 ],
446 'includes': [ '../build/apk_fake_jar.gypi' ],
447 }, # target AppRTCDemo_apk
448
449 {
450 'target_name': 'AppRTCDemoTest',
451 'type': 'none',
452 'dependencies': [
453 'AppRTCDemo_apk',
454 ],
455 'variables': {
456 'apk_name': 'AppRTCDemoTest',
457 'java_in_dir': 'examples/androidtests',
458 'is_test_apk': 1,
agrievebabf8ee2016-04-08 06:54:23 -0700459 'test_type': 'instrumentation',
460 'test_runner_path': '<(DEPTH)/webrtc/build/android/test_runner.py',
Peter Boströmfa566d62015-11-11 12:11:15 +0000461 },
agrievebabf8ee2016-04-08 06:54:23 -0700462 'includes': [
463 '../build/java_apk.gypi',
464 '../build/android/test_runner.gypi',
465 ],
henrike@webrtc.org451745e2013-12-12 16:55:37 +0000466 },
Peter Boströmfa566d62015-11-11 12:11:15 +0000467 ], # targets
468 }], # OS=="android"
henrike@webrtc.org451745e2013-12-12 16:55:37 +0000469 ],
470}