blob: 6e9f3b45ed52475d3f5cb727979c4a67f931a356 [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 ],
12 'targets': [
13 {
14 'target_name': 'relayserver',
15 'type': 'executable',
16 'dependencies': [
kjellandera96e2d72016-02-04 23:52:28 -080017 '<(webrtc_root)/base/base.gyp:rtc_base',
kjellander@webrtc.org9b8df252016-02-12 06:47:59 +010018 '<(webrtc_root)/pc/pc.gyp:rtc_pc',
Peter Boströmfa566d62015-11-11 12:11:15 +000019 ],
20 'sources': [
21 'examples/relayserver/relayserver_main.cc',
22 ],
23 }, # target relayserver
24 {
25 'target_name': 'stunserver',
26 'type': 'executable',
27 'dependencies': [
kjellandera96e2d72016-02-04 23:52:28 -080028 '<(webrtc_root)/base/base.gyp:rtc_base',
kjellander@webrtc.org9b8df252016-02-12 06:47:59 +010029 '<(webrtc_root)/pc/pc.gyp:rtc_pc',
Peter Boströmfa566d62015-11-11 12:11:15 +000030 ],
31 'sources': [
32 'examples/stunserver/stunserver_main.cc',
33 ],
34 }, # target stunserver
35 {
36 'target_name': 'turnserver',
37 'type': 'executable',
38 'dependencies': [
kjellandera96e2d72016-02-04 23:52:28 -080039 '<(webrtc_root)/base/base.gyp:rtc_base',
kjellander@webrtc.org9b8df252016-02-12 06:47:59 +010040 '<(webrtc_root)/pc/pc.gyp:rtc_pc',
Peter Boströmfa566d62015-11-11 12:11:15 +000041 ],
42 'sources': [
43 'examples/turnserver/turnserver_main.cc',
44 ],
45 }, # target turnserver
46 {
47 'target_name': 'peerconnection_server',
48 'type': 'executable',
49 'sources': [
50 'examples/peerconnection/server/data_socket.cc',
51 'examples/peerconnection/server/data_socket.h',
52 'examples/peerconnection/server/main.cc',
53 'examples/peerconnection/server/peer_channel.cc',
54 'examples/peerconnection/server/peer_channel.h',
55 'examples/peerconnection/server/utils.cc',
56 'examples/peerconnection/server/utils.h',
57 ],
58 'dependencies': [
kjellandera96e2d72016-02-04 23:52:28 -080059 '<(webrtc_root)/base/base.gyp:rtc_base',
Peter Boströmfa566d62015-11-11 12:11:15 +000060 '<(webrtc_root)/common.gyp:webrtc_common',
Peter Boströmfa566d62015-11-11 12:11:15 +000061 ],
62 # TODO(ronghuawu): crbug.com/167187 fix size_t to int truncations.
63 'msvs_disabled_warnings': [ 4309, ],
64 }, # target peerconnection_server
65 ],
henrike@webrtc.org451745e2013-12-12 16:55:37 +000066 'conditions': [
Peter Boströmfa566d62015-11-11 12:11:15 +000067 ['OS=="linux" or OS=="win"', {
68 'targets': [
69 {
70 '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"
141 ], # conditions
142 }, # target peerconnection_client
143 ], # targets
144 }], # OS=="linux" or OS=="win"
145
tkchin76356842015-12-02 16:42:18 -0800146 ['OS=="ios" or (OS=="mac" and target_arch!="ia32")', {
Peter Boströmfa566d62015-11-11 12:11:15 +0000147 'targets': [
148 {
149 'target_name': 'apprtc_common',
150 'type': 'static_library',
151 'dependencies': [
152 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:field_trial_default',
kjellander@webrtc.org9b8df252016-02-12 06:47:59 +0100153 '../talk/app/webrtc/legacy_objc_api.gyp:libjingle_peerconnection_objc',
Peter Boströmfa566d62015-11-11 12:11:15 +0000154 ],
155 'sources': [
156 'examples/objc/AppRTCDemo/common/ARDUtilities.h',
157 'examples/objc/AppRTCDemo/common/ARDUtilities.m',
158 ],
159 'include_dirs': [
160 'examples/objc/AppRTCDemo/common',
161 ],
162 'direct_dependent_settings': {
163 'include_dirs': [
164 'examples/objc/AppRTCDemo/common',
165 ],
166 },
167 'conditions': [
kjellander@webrtc.org66a99282016-02-18 20:30:14 +0100168 ['OS=="ios"', {
169 'xcode_settings': {
170 'WARNING_CFLAGS': [
171 # Suppress compiler warnings about deprecated that triggered
172 # when moving from ios_deployment_target 7.0 to 9.0.
173 # See webrtc:5549 for more details.
174 '-Wno-deprecated-declarations',
175 ],
176 },
177 }],
Peter Boströmfa566d62015-11-11 12:11:15 +0000178 ['OS=="mac"', {
179 'xcode_settings': {
180 'MACOSX_DEPLOYMENT_TARGET' : '10.8',
181 },
182 }],
183 ],
184 'link_settings': {
185 'xcode_settings': {
186 'OTHER_LDFLAGS': [
187 '-framework QuartzCore',
188 ],
189 },
190 },
191 },
192 {
193 'target_name': 'apprtc_signaling',
194 'type': 'static_library',
195 'dependencies': [
196 'apprtc_common',
kjellander@webrtc.org9b8df252016-02-12 06:47:59 +0100197 '../talk/app/webrtc/legacy_objc_api.gyp:libjingle_peerconnection_objc',
Peter Boströmfa566d62015-11-11 12:11:15 +0000198 'socketrocket',
199 ],
200 'sources': [
201 'examples/objc/AppRTCDemo/ARDAppClient.h',
202 'examples/objc/AppRTCDemo/ARDAppClient.m',
203 'examples/objc/AppRTCDemo/ARDAppClient+Internal.h',
204 'examples/objc/AppRTCDemo/ARDAppEngineClient.h',
205 'examples/objc/AppRTCDemo/ARDAppEngineClient.m',
206 'examples/objc/AppRTCDemo/ARDBitrateTracker.h',
207 'examples/objc/AppRTCDemo/ARDBitrateTracker.m',
208 'examples/objc/AppRTCDemo/ARDCEODTURNClient.h',
209 'examples/objc/AppRTCDemo/ARDCEODTURNClient.m',
210 'examples/objc/AppRTCDemo/ARDJoinResponse.h',
211 'examples/objc/AppRTCDemo/ARDJoinResponse.m',
212 'examples/objc/AppRTCDemo/ARDJoinResponse+Internal.h',
213 'examples/objc/AppRTCDemo/ARDMessageResponse.h',
214 'examples/objc/AppRTCDemo/ARDMessageResponse.m',
215 'examples/objc/AppRTCDemo/ARDMessageResponse+Internal.h',
216 'examples/objc/AppRTCDemo/ARDRoomServerClient.h',
217 'examples/objc/AppRTCDemo/ARDSDPUtils.h',
218 'examples/objc/AppRTCDemo/ARDSDPUtils.m',
219 'examples/objc/AppRTCDemo/ARDSignalingChannel.h',
220 'examples/objc/AppRTCDemo/ARDSignalingMessage.h',
221 'examples/objc/AppRTCDemo/ARDSignalingMessage.m',
222 'examples/objc/AppRTCDemo/ARDStatsBuilder.h',
223 'examples/objc/AppRTCDemo/ARDStatsBuilder.m',
224 'examples/objc/AppRTCDemo/ARDTURNClient.h',
225 'examples/objc/AppRTCDemo/ARDWebSocketChannel.h',
226 'examples/objc/AppRTCDemo/ARDWebSocketChannel.m',
227 'examples/objc/AppRTCDemo/RTCICECandidate+JSON.h',
228 'examples/objc/AppRTCDemo/RTCICECandidate+JSON.m',
229 'examples/objc/AppRTCDemo/RTCICEServer+JSON.h',
230 'examples/objc/AppRTCDemo/RTCICEServer+JSON.m',
231 'examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.h',
232 'examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.m',
233 'examples/objc/AppRTCDemo/RTCSessionDescription+JSON.h',
234 'examples/objc/AppRTCDemo/RTCSessionDescription+JSON.m',
235 ],
236 'include_dirs': [
237 'examples/objc/AppRTCDemo',
238 ],
239 'direct_dependent_settings': {
240 'include_dirs': [
241 'examples/objc/AppRTCDemo',
242 ],
243 },
244 'export_dependent_settings': [
kjellander@webrtc.org9b8df252016-02-12 06:47:59 +0100245 '../talk/app/webrtc/legacy_objc_api.gyp:libjingle_peerconnection_objc',
Peter Boströmfa566d62015-11-11 12:11:15 +0000246 ],
247 'conditions': [
kjellander@webrtc.org66a99282016-02-18 20:30:14 +0100248 ['OS=="ios"', {
249 'xcode_settings': {
250 'WARNING_CFLAGS': [
251 # Suppress compiler warnings about deprecated that triggered
252 # when moving from ios_deployment_target 7.0 to 9.0.
253 # See webrtc:5549 for more details.
254 '-Wno-deprecated-declarations',
255 ],
256 },
257 }],
Peter Boströmfa566d62015-11-11 12:11:15 +0000258 ['OS=="mac"', {
259 'xcode_settings': {
260 'MACOSX_DEPLOYMENT_TARGET' : '10.8',
261 },
262 }],
263 ],
264 },
265 {
266 'target_name': 'AppRTCDemo',
267 'type': 'executable',
268 'product_name': 'AppRTCDemo',
269 'mac_bundle': 1,
270 'dependencies': [
271 'apprtc_common',
272 'apprtc_signaling',
273 ],
274 'conditions': [
275 ['OS=="ios"', {
276 'mac_bundle_resources': [
277 'examples/objc/AppRTCDemo/ios/resources/iPhone5@2x.png',
278 'examples/objc/AppRTCDemo/ios/resources/iPhone6@2x.png',
279 'examples/objc/AppRTCDemo/ios/resources/iPhone6p@3x.png',
280 'examples/objc/AppRTCDemo/ios/resources/Roboto-Regular.ttf',
281 'examples/objc/AppRTCDemo/ios/resources/ic_call_end_black_24dp.png',
282 'examples/objc/AppRTCDemo/ios/resources/ic_call_end_black_24dp@2x.png',
283 'examples/objc/AppRTCDemo/ios/resources/ic_clear_black_24dp.png',
284 'examples/objc/AppRTCDemo/ios/resources/ic_clear_black_24dp@2x.png',
285 'examples/objc/AppRTCDemo/ios/resources/ic_switch_video_black_24dp.png',
286 'examples/objc/AppRTCDemo/ios/resources/ic_switch_video_black_24dp@2x.png',
287 'examples/objc/Icon.png',
288 ],
289 'sources': [
290 'examples/objc/AppRTCDemo/ios/ARDAppDelegate.h',
291 'examples/objc/AppRTCDemo/ios/ARDAppDelegate.m',
292 'examples/objc/AppRTCDemo/ios/ARDMainView.h',
293 'examples/objc/AppRTCDemo/ios/ARDMainView.m',
294 'examples/objc/AppRTCDemo/ios/ARDMainViewController.h',
295 'examples/objc/AppRTCDemo/ios/ARDMainViewController.m',
296 'examples/objc/AppRTCDemo/ios/ARDStatsView.h',
297 'examples/objc/AppRTCDemo/ios/ARDStatsView.m',
298 'examples/objc/AppRTCDemo/ios/ARDVideoCallView.h',
299 'examples/objc/AppRTCDemo/ios/ARDVideoCallView.m',
300 'examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.h',
301 'examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.m',
302 'examples/objc/AppRTCDemo/ios/AppRTCDemo-Prefix.pch',
303 'examples/objc/AppRTCDemo/ios/UIImage+ARDUtilities.h',
304 'examples/objc/AppRTCDemo/ios/UIImage+ARDUtilities.m',
305 'examples/objc/AppRTCDemo/ios/main.m',
306 ],
307 'xcode_settings': {
308 'INFOPLIST_FILE': 'examples/objc/AppRTCDemo/ios/Info.plist',
kjellander@webrtc.org66a99282016-02-18 20:30:14 +0100309 'WARNING_CFLAGS': [
310 # Suppress compiler warnings about deprecated that triggered
311 # when moving from ios_deployment_target 7.0 to 9.0.
312 # See webrtc:5549 for more details.
313 '-Wno-deprecated-declarations',
314 ],
Peter Boströmfa566d62015-11-11 12:11:15 +0000315 },
316 }],
317 ['OS=="mac"', {
318 'sources': [
319 'examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.h',
320 'examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.m',
321 'examples/objc/AppRTCDemo/mac/APPRTCViewController.h',
322 'examples/objc/AppRTCDemo/mac/APPRTCViewController.m',
323 'examples/objc/AppRTCDemo/mac/main.m',
324 ],
325 'xcode_settings': {
326 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'NO',
327 'INFOPLIST_FILE': 'examples/objc/AppRTCDemo/mac/Info.plist',
328 'MACOSX_DEPLOYMENT_TARGET' : '10.8',
329 'OTHER_LDFLAGS': [
330 '-framework AVFoundation',
331 ],
332 },
333 }],
334 ['target_arch=="ia32"', {
335 'dependencies' : [
336 '<(DEPTH)/testing/iossim/iossim.gyp:iossim#host',
337 ],
338 }],
339 ],
340 }, # target AppRTCDemo
341 {
342 # TODO(tkchin): move this into the real third party location and
343 # have it mirrored on chrome infra.
344 'target_name': 'socketrocket',
345 'type': 'static_library',
346 'sources': [
347 'examples/objc/AppRTCDemo/third_party/SocketRocket/SRWebSocket.h',
348 'examples/objc/AppRTCDemo/third_party/SocketRocket/SRWebSocket.m',
349 ],
350 'conditions': [
351 ['OS=="mac"', {
352 'xcode_settings': {
353 # SocketRocket autosynthesizes some properties. Disable the
354 # warning so we can compile successfully.
355 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'NO',
356 'MACOSX_DEPLOYMENT_TARGET' : '10.8',
357 # SRWebSocket.m uses code with partial availability.
358 # https://code.google.com/p/webrtc/issues/detail?id=4695
359 'WARNING_CFLAGS!': ['-Wpartial-availability'],
360 },
361 }],
362 ],
363 'direct_dependent_settings': {
364 'include_dirs': [
365 'examples/objc/AppRTCDemo/third_party/SocketRocket',
366 ],
367 },
368 'xcode_settings': {
369 'CLANG_ENABLE_OBJC_ARC': 'YES',
370 'WARNING_CFLAGS': [
371 '-Wno-deprecated-declarations',
tkchin76356842015-12-02 16:42:18 -0800372 '-Wno-nonnull',
Peter Boströmfa566d62015-11-11 12:11:15 +0000373 ],
374 },
375 'link_settings': {
376 'xcode_settings': {
377 'OTHER_LDFLAGS': [
378 '-framework CFNetwork',
379 '-licucore',
380 ],
381 },
382 }
383 }, # target socketrocket
384 ], # targets
tkchin76356842015-12-02 16:42:18 -0800385 }], # OS=="ios" or (OS=="mac" and target_arch!="ia32")
Peter Boströmfa566d62015-11-11 12:11:15 +0000386
henrike@webrtc.org451745e2013-12-12 16:55:37 +0000387 ['OS=="android"', {
388 'targets': [
389 {
Peter Boströmfa566d62015-11-11 12:11:15 +0000390 'target_name': 'AppRTCDemo',
henrike@webrtc.org451745e2013-12-12 16:55:37 +0000391 'type': 'none',
392 'dependencies': [
Henrik Kjellander15583c12016-02-10 10:53:12 +0100393 'api/api.gyp:libjingle_peerconnection_java',
henrike@webrtc.org451745e2013-12-12 16:55:37 +0000394 ],
Peter Boströmfa566d62015-11-11 12:11:15 +0000395 'variables': {
396 'apk_name': 'AppRTCDemo',
397 'java_in_dir': 'examples/androidapp',
398 'has_java_resources': 1,
399 'resource_dir': 'examples/androidapp/res',
400 'R_package': 'org.appspot.apprtc',
401 'R_package_relpath': 'org/appspot/apprtc',
402 'input_jars_paths': [
403 'examples/androidapp/third_party/autobanh/autobanh.jar',
404 ],
405 'library_dexed_jars_paths': [
406 'examples/androidapp/third_party/autobanh/autobanh.jar',
407 ],
408 'native_lib_target': 'libjingle_peerconnection_so',
409 'add_to_dependents_classpaths':1,
410 },
411 'includes': [ '../build/java_apk.gypi' ],
412 }, # target AppRTCDemo
413
414 {
415 # AppRTCDemo creates a .jar as a side effect. Any java targets
416 # that need that .jar in their classpath should depend on this target,
417 # AppRTCDemo_apk. Dependents of AppRTCDemo_apk receive its
418 # jar path in the variable 'apk_output_jar_path'.
419 # This target should only be used by targets which instrument
420 # AppRTCDemo_apk.
421 'target_name': 'AppRTCDemo_apk',
422 'type': 'none',
423 'dependencies': [
424 'AppRTCDemo',
425 ],
426 'includes': [ '../build/apk_fake_jar.gypi' ],
427 }, # target AppRTCDemo_apk
428
429 {
430 'target_name': 'AppRTCDemoTest',
431 'type': 'none',
432 'dependencies': [
433 'AppRTCDemo_apk',
434 ],
435 'variables': {
436 'apk_name': 'AppRTCDemoTest',
437 'java_in_dir': 'examples/androidtests',
438 'is_test_apk': 1,
439 },
440 'includes': [ '../build/java_apk.gypi' ],
henrike@webrtc.org451745e2013-12-12 16:55:37 +0000441 },
Peter Boströmfa566d62015-11-11 12:11:15 +0000442 ], # targets
443 }], # OS=="android"
henrike@webrtc.org451745e2013-12-12 16:55:37 +0000444 ],
445}