blob: 48cac0e5d05a97663fb77000671475580ac664c2 [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"
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': [
157 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:field_trial_default',
kjellander@webrtc.org9b8df252016-02-12 06:47:59 +0100158 '../talk/app/webrtc/legacy_objc_api.gyp:libjingle_peerconnection_objc',
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 ],
189 'link_settings': {
190 'xcode_settings': {
191 'OTHER_LDFLAGS': [
192 '-framework QuartzCore',
193 ],
194 },
195 },
196 },
197 {
198 'target_name': 'apprtc_signaling',
199 'type': 'static_library',
200 'dependencies': [
201 'apprtc_common',
kjellander@webrtc.org9b8df252016-02-12 06:47:59 +0100202 '../talk/app/webrtc/legacy_objc_api.gyp:libjingle_peerconnection_objc',
Peter Boströmfa566d62015-11-11 12:11:15 +0000203 'socketrocket',
204 ],
205 'sources': [
206 'examples/objc/AppRTCDemo/ARDAppClient.h',
207 'examples/objc/AppRTCDemo/ARDAppClient.m',
208 'examples/objc/AppRTCDemo/ARDAppClient+Internal.h',
209 'examples/objc/AppRTCDemo/ARDAppEngineClient.h',
210 'examples/objc/AppRTCDemo/ARDAppEngineClient.m',
211 'examples/objc/AppRTCDemo/ARDBitrateTracker.h',
212 'examples/objc/AppRTCDemo/ARDBitrateTracker.m',
213 'examples/objc/AppRTCDemo/ARDCEODTURNClient.h',
214 'examples/objc/AppRTCDemo/ARDCEODTURNClient.m',
215 'examples/objc/AppRTCDemo/ARDJoinResponse.h',
216 'examples/objc/AppRTCDemo/ARDJoinResponse.m',
217 'examples/objc/AppRTCDemo/ARDJoinResponse+Internal.h',
218 'examples/objc/AppRTCDemo/ARDMessageResponse.h',
219 'examples/objc/AppRTCDemo/ARDMessageResponse.m',
220 'examples/objc/AppRTCDemo/ARDMessageResponse+Internal.h',
221 'examples/objc/AppRTCDemo/ARDRoomServerClient.h',
222 'examples/objc/AppRTCDemo/ARDSDPUtils.h',
223 'examples/objc/AppRTCDemo/ARDSDPUtils.m',
224 'examples/objc/AppRTCDemo/ARDSignalingChannel.h',
225 'examples/objc/AppRTCDemo/ARDSignalingMessage.h',
226 'examples/objc/AppRTCDemo/ARDSignalingMessage.m',
227 'examples/objc/AppRTCDemo/ARDStatsBuilder.h',
228 'examples/objc/AppRTCDemo/ARDStatsBuilder.m',
229 'examples/objc/AppRTCDemo/ARDTURNClient.h',
230 'examples/objc/AppRTCDemo/ARDWebSocketChannel.h',
231 'examples/objc/AppRTCDemo/ARDWebSocketChannel.m',
232 'examples/objc/AppRTCDemo/RTCICECandidate+JSON.h',
233 'examples/objc/AppRTCDemo/RTCICECandidate+JSON.m',
234 'examples/objc/AppRTCDemo/RTCICEServer+JSON.h',
235 'examples/objc/AppRTCDemo/RTCICEServer+JSON.m',
236 'examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.h',
237 'examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.m',
238 'examples/objc/AppRTCDemo/RTCSessionDescription+JSON.h',
239 'examples/objc/AppRTCDemo/RTCSessionDescription+JSON.m',
240 ],
241 'include_dirs': [
242 'examples/objc/AppRTCDemo',
243 ],
244 'direct_dependent_settings': {
245 'include_dirs': [
246 'examples/objc/AppRTCDemo',
247 ],
248 },
249 'export_dependent_settings': [
kjellander@webrtc.org9b8df252016-02-12 06:47:59 +0100250 '../talk/app/webrtc/legacy_objc_api.gyp:libjingle_peerconnection_objc',
Peter Boströmfa566d62015-11-11 12:11:15 +0000251 ],
252 'conditions': [
kjellander@webrtc.org66a99282016-02-18 20:30:14 +0100253 ['OS=="ios"', {
254 'xcode_settings': {
255 'WARNING_CFLAGS': [
256 # Suppress compiler warnings about deprecated that triggered
257 # when moving from ios_deployment_target 7.0 to 9.0.
258 # See webrtc:5549 for more details.
259 '-Wno-deprecated-declarations',
260 ],
261 },
262 }],
Peter Boströmfa566d62015-11-11 12:11:15 +0000263 ['OS=="mac"', {
264 'xcode_settings': {
265 'MACOSX_DEPLOYMENT_TARGET' : '10.8',
266 },
267 }],
268 ],
269 },
270 {
271 'target_name': 'AppRTCDemo',
272 'type': 'executable',
273 'product_name': 'AppRTCDemo',
274 'mac_bundle': 1,
275 'dependencies': [
276 'apprtc_common',
277 'apprtc_signaling',
278 ],
279 'conditions': [
280 ['OS=="ios"', {
281 'mac_bundle_resources': [
282 'examples/objc/AppRTCDemo/ios/resources/iPhone5@2x.png',
283 'examples/objc/AppRTCDemo/ios/resources/iPhone6@2x.png',
284 'examples/objc/AppRTCDemo/ios/resources/iPhone6p@3x.png',
285 'examples/objc/AppRTCDemo/ios/resources/Roboto-Regular.ttf',
286 'examples/objc/AppRTCDemo/ios/resources/ic_call_end_black_24dp.png',
287 'examples/objc/AppRTCDemo/ios/resources/ic_call_end_black_24dp@2x.png',
288 'examples/objc/AppRTCDemo/ios/resources/ic_clear_black_24dp.png',
289 'examples/objc/AppRTCDemo/ios/resources/ic_clear_black_24dp@2x.png',
290 'examples/objc/AppRTCDemo/ios/resources/ic_switch_video_black_24dp.png',
291 'examples/objc/AppRTCDemo/ios/resources/ic_switch_video_black_24dp@2x.png',
292 'examples/objc/Icon.png',
293 ],
294 'sources': [
295 'examples/objc/AppRTCDemo/ios/ARDAppDelegate.h',
296 'examples/objc/AppRTCDemo/ios/ARDAppDelegate.m',
297 'examples/objc/AppRTCDemo/ios/ARDMainView.h',
298 'examples/objc/AppRTCDemo/ios/ARDMainView.m',
299 'examples/objc/AppRTCDemo/ios/ARDMainViewController.h',
300 'examples/objc/AppRTCDemo/ios/ARDMainViewController.m',
301 'examples/objc/AppRTCDemo/ios/ARDStatsView.h',
302 'examples/objc/AppRTCDemo/ios/ARDStatsView.m',
303 'examples/objc/AppRTCDemo/ios/ARDVideoCallView.h',
304 'examples/objc/AppRTCDemo/ios/ARDVideoCallView.m',
305 'examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.h',
306 'examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.m',
307 'examples/objc/AppRTCDemo/ios/AppRTCDemo-Prefix.pch',
308 'examples/objc/AppRTCDemo/ios/UIImage+ARDUtilities.h',
309 'examples/objc/AppRTCDemo/ios/UIImage+ARDUtilities.m',
310 'examples/objc/AppRTCDemo/ios/main.m',
311 ],
312 'xcode_settings': {
313 'INFOPLIST_FILE': 'examples/objc/AppRTCDemo/ios/Info.plist',
kjellander@webrtc.org66a99282016-02-18 20:30:14 +0100314 'WARNING_CFLAGS': [
315 # Suppress compiler warnings about deprecated that triggered
316 # when moving from ios_deployment_target 7.0 to 9.0.
317 # See webrtc:5549 for more details.
318 '-Wno-deprecated-declarations',
319 ],
Peter Boströmfa566d62015-11-11 12:11:15 +0000320 },
321 }],
322 ['OS=="mac"', {
323 'sources': [
324 'examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.h',
325 'examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.m',
326 'examples/objc/AppRTCDemo/mac/APPRTCViewController.h',
327 'examples/objc/AppRTCDemo/mac/APPRTCViewController.m',
328 'examples/objc/AppRTCDemo/mac/main.m',
329 ],
330 'xcode_settings': {
331 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'NO',
332 'INFOPLIST_FILE': 'examples/objc/AppRTCDemo/mac/Info.plist',
333 'MACOSX_DEPLOYMENT_TARGET' : '10.8',
334 'OTHER_LDFLAGS': [
335 '-framework AVFoundation',
336 ],
337 },
338 }],
339 ['target_arch=="ia32"', {
340 'dependencies' : [
341 '<(DEPTH)/testing/iossim/iossim.gyp:iossim#host',
342 ],
343 }],
344 ],
345 }, # target AppRTCDemo
346 {
347 # TODO(tkchin): move this into the real third party location and
348 # have it mirrored on chrome infra.
349 'target_name': 'socketrocket',
350 'type': 'static_library',
351 'sources': [
352 'examples/objc/AppRTCDemo/third_party/SocketRocket/SRWebSocket.h',
353 'examples/objc/AppRTCDemo/third_party/SocketRocket/SRWebSocket.m',
354 ],
355 'conditions': [
356 ['OS=="mac"', {
357 'xcode_settings': {
358 # SocketRocket autosynthesizes some properties. Disable the
359 # warning so we can compile successfully.
360 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'NO',
361 'MACOSX_DEPLOYMENT_TARGET' : '10.8',
362 # SRWebSocket.m uses code with partial availability.
363 # https://code.google.com/p/webrtc/issues/detail?id=4695
364 'WARNING_CFLAGS!': ['-Wpartial-availability'],
365 },
366 }],
367 ],
368 'direct_dependent_settings': {
369 'include_dirs': [
370 'examples/objc/AppRTCDemo/third_party/SocketRocket',
371 ],
372 },
373 'xcode_settings': {
374 'CLANG_ENABLE_OBJC_ARC': 'YES',
375 'WARNING_CFLAGS': [
376 '-Wno-deprecated-declarations',
tkchin76356842015-12-02 16:42:18 -0800377 '-Wno-nonnull',
Peter Boströmfa566d62015-11-11 12:11:15 +0000378 ],
379 },
380 'link_settings': {
381 'xcode_settings': {
382 'OTHER_LDFLAGS': [
383 '-framework CFNetwork',
384 '-licucore',
385 ],
386 },
387 }
388 }, # target socketrocket
389 ], # targets
tkchin76356842015-12-02 16:42:18 -0800390 }], # OS=="ios" or (OS=="mac" and target_arch!="ia32")
Peter Boströmfa566d62015-11-11 12:11:15 +0000391
henrike@webrtc.org451745e2013-12-12 16:55:37 +0000392 ['OS=="android"', {
393 'targets': [
394 {
Peter Boströmfa566d62015-11-11 12:11:15 +0000395 'target_name': 'AppRTCDemo',
henrike@webrtc.org451745e2013-12-12 16:55:37 +0000396 'type': 'none',
397 'dependencies': [
Henrik Kjellander15583c12016-02-10 10:53:12 +0100398 'api/api.gyp:libjingle_peerconnection_java',
henrike@webrtc.org451745e2013-12-12 16:55:37 +0000399 ],
Peter Boströmfa566d62015-11-11 12:11:15 +0000400 'variables': {
401 'apk_name': 'AppRTCDemo',
402 'java_in_dir': 'examples/androidapp',
403 'has_java_resources': 1,
404 'resource_dir': 'examples/androidapp/res',
405 'R_package': 'org.appspot.apprtc',
406 'R_package_relpath': 'org/appspot/apprtc',
407 'input_jars_paths': [
408 'examples/androidapp/third_party/autobanh/autobanh.jar',
409 ],
410 'library_dexed_jars_paths': [
411 'examples/androidapp/third_party/autobanh/autobanh.jar',
412 ],
413 'native_lib_target': 'libjingle_peerconnection_so',
414 'add_to_dependents_classpaths':1,
415 },
416 'includes': [ '../build/java_apk.gypi' ],
417 }, # target AppRTCDemo
418
419 {
420 # AppRTCDemo creates a .jar as a side effect. Any java targets
421 # that need that .jar in their classpath should depend on this target,
422 # AppRTCDemo_apk. Dependents of AppRTCDemo_apk receive its
423 # jar path in the variable 'apk_output_jar_path'.
424 # This target should only be used by targets which instrument
425 # AppRTCDemo_apk.
426 'target_name': 'AppRTCDemo_apk',
427 'type': 'none',
428 'dependencies': [
429 'AppRTCDemo',
430 ],
431 'includes': [ '../build/apk_fake_jar.gypi' ],
432 }, # target AppRTCDemo_apk
433
434 {
435 'target_name': 'AppRTCDemoTest',
436 'type': 'none',
437 'dependencies': [
438 'AppRTCDemo_apk',
439 ],
440 'variables': {
441 'apk_name': 'AppRTCDemoTest',
442 'java_in_dir': 'examples/androidtests',
443 'is_test_apk': 1,
444 },
445 'includes': [ '../build/java_apk.gypi' ],
henrike@webrtc.org451745e2013-12-12 16:55:37 +0000446 },
Peter Boströmfa566d62015-11-11 12:11:15 +0000447 ], # targets
448 }], # OS=="android"
henrike@webrtc.org451745e2013-12-12 16:55:37 +0000449 ],
450}