blob: 1ce450b0f100467d08f08f4c9cacb46b314122a3 [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': [
168 ['OS=="mac"', {
169 'xcode_settings': {
170 'MACOSX_DEPLOYMENT_TARGET' : '10.8',
171 },
172 }],
173 ],
174 'link_settings': {
175 'xcode_settings': {
176 'OTHER_LDFLAGS': [
177 '-framework QuartzCore',
178 ],
179 },
180 },
181 },
182 {
183 'target_name': 'apprtc_signaling',
184 'type': 'static_library',
185 'dependencies': [
186 'apprtc_common',
kjellander@webrtc.org9b8df252016-02-12 06:47:59 +0100187 '../talk/app/webrtc/legacy_objc_api.gyp:libjingle_peerconnection_objc',
Peter Boströmfa566d62015-11-11 12:11:15 +0000188 'socketrocket',
189 ],
190 'sources': [
191 'examples/objc/AppRTCDemo/ARDAppClient.h',
192 'examples/objc/AppRTCDemo/ARDAppClient.m',
193 'examples/objc/AppRTCDemo/ARDAppClient+Internal.h',
194 'examples/objc/AppRTCDemo/ARDAppEngineClient.h',
195 'examples/objc/AppRTCDemo/ARDAppEngineClient.m',
196 'examples/objc/AppRTCDemo/ARDBitrateTracker.h',
197 'examples/objc/AppRTCDemo/ARDBitrateTracker.m',
198 'examples/objc/AppRTCDemo/ARDCEODTURNClient.h',
199 'examples/objc/AppRTCDemo/ARDCEODTURNClient.m',
200 'examples/objc/AppRTCDemo/ARDJoinResponse.h',
201 'examples/objc/AppRTCDemo/ARDJoinResponse.m',
202 'examples/objc/AppRTCDemo/ARDJoinResponse+Internal.h',
203 'examples/objc/AppRTCDemo/ARDMessageResponse.h',
204 'examples/objc/AppRTCDemo/ARDMessageResponse.m',
205 'examples/objc/AppRTCDemo/ARDMessageResponse+Internal.h',
206 'examples/objc/AppRTCDemo/ARDRoomServerClient.h',
207 'examples/objc/AppRTCDemo/ARDSDPUtils.h',
208 'examples/objc/AppRTCDemo/ARDSDPUtils.m',
209 'examples/objc/AppRTCDemo/ARDSignalingChannel.h',
210 'examples/objc/AppRTCDemo/ARDSignalingMessage.h',
211 'examples/objc/AppRTCDemo/ARDSignalingMessage.m',
212 'examples/objc/AppRTCDemo/ARDStatsBuilder.h',
213 'examples/objc/AppRTCDemo/ARDStatsBuilder.m',
214 'examples/objc/AppRTCDemo/ARDTURNClient.h',
215 'examples/objc/AppRTCDemo/ARDWebSocketChannel.h',
216 'examples/objc/AppRTCDemo/ARDWebSocketChannel.m',
217 'examples/objc/AppRTCDemo/RTCICECandidate+JSON.h',
218 'examples/objc/AppRTCDemo/RTCICECandidate+JSON.m',
219 'examples/objc/AppRTCDemo/RTCICEServer+JSON.h',
220 'examples/objc/AppRTCDemo/RTCICEServer+JSON.m',
221 'examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.h',
222 'examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.m',
223 'examples/objc/AppRTCDemo/RTCSessionDescription+JSON.h',
224 'examples/objc/AppRTCDemo/RTCSessionDescription+JSON.m',
225 ],
226 'include_dirs': [
227 'examples/objc/AppRTCDemo',
228 ],
229 'direct_dependent_settings': {
230 'include_dirs': [
231 'examples/objc/AppRTCDemo',
232 ],
233 },
234 'export_dependent_settings': [
kjellander@webrtc.org9b8df252016-02-12 06:47:59 +0100235 '../talk/app/webrtc/legacy_objc_api.gyp:libjingle_peerconnection_objc',
Peter Boströmfa566d62015-11-11 12:11:15 +0000236 ],
237 'conditions': [
238 ['OS=="mac"', {
239 'xcode_settings': {
240 'MACOSX_DEPLOYMENT_TARGET' : '10.8',
241 },
242 }],
243 ],
244 },
245 {
246 'target_name': 'AppRTCDemo',
247 'type': 'executable',
248 'product_name': 'AppRTCDemo',
249 'mac_bundle': 1,
250 'dependencies': [
251 'apprtc_common',
252 'apprtc_signaling',
253 ],
254 'conditions': [
255 ['OS=="ios"', {
256 'mac_bundle_resources': [
257 'examples/objc/AppRTCDemo/ios/resources/iPhone5@2x.png',
258 'examples/objc/AppRTCDemo/ios/resources/iPhone6@2x.png',
259 'examples/objc/AppRTCDemo/ios/resources/iPhone6p@3x.png',
260 'examples/objc/AppRTCDemo/ios/resources/Roboto-Regular.ttf',
261 'examples/objc/AppRTCDemo/ios/resources/ic_call_end_black_24dp.png',
262 'examples/objc/AppRTCDemo/ios/resources/ic_call_end_black_24dp@2x.png',
263 'examples/objc/AppRTCDemo/ios/resources/ic_clear_black_24dp.png',
264 'examples/objc/AppRTCDemo/ios/resources/ic_clear_black_24dp@2x.png',
265 'examples/objc/AppRTCDemo/ios/resources/ic_switch_video_black_24dp.png',
266 'examples/objc/AppRTCDemo/ios/resources/ic_switch_video_black_24dp@2x.png',
267 'examples/objc/Icon.png',
268 ],
269 'sources': [
270 'examples/objc/AppRTCDemo/ios/ARDAppDelegate.h',
271 'examples/objc/AppRTCDemo/ios/ARDAppDelegate.m',
272 'examples/objc/AppRTCDemo/ios/ARDMainView.h',
273 'examples/objc/AppRTCDemo/ios/ARDMainView.m',
274 'examples/objc/AppRTCDemo/ios/ARDMainViewController.h',
275 'examples/objc/AppRTCDemo/ios/ARDMainViewController.m',
276 'examples/objc/AppRTCDemo/ios/ARDStatsView.h',
277 'examples/objc/AppRTCDemo/ios/ARDStatsView.m',
278 'examples/objc/AppRTCDemo/ios/ARDVideoCallView.h',
279 'examples/objc/AppRTCDemo/ios/ARDVideoCallView.m',
280 'examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.h',
281 'examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.m',
282 'examples/objc/AppRTCDemo/ios/AppRTCDemo-Prefix.pch',
283 'examples/objc/AppRTCDemo/ios/UIImage+ARDUtilities.h',
284 'examples/objc/AppRTCDemo/ios/UIImage+ARDUtilities.m',
285 'examples/objc/AppRTCDemo/ios/main.m',
286 ],
287 'xcode_settings': {
288 'INFOPLIST_FILE': 'examples/objc/AppRTCDemo/ios/Info.plist',
289 },
290 }],
291 ['OS=="mac"', {
292 'sources': [
293 'examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.h',
294 'examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.m',
295 'examples/objc/AppRTCDemo/mac/APPRTCViewController.h',
296 'examples/objc/AppRTCDemo/mac/APPRTCViewController.m',
297 'examples/objc/AppRTCDemo/mac/main.m',
298 ],
299 'xcode_settings': {
300 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'NO',
301 'INFOPLIST_FILE': 'examples/objc/AppRTCDemo/mac/Info.plist',
302 'MACOSX_DEPLOYMENT_TARGET' : '10.8',
303 'OTHER_LDFLAGS': [
304 '-framework AVFoundation',
305 ],
306 },
307 }],
308 ['target_arch=="ia32"', {
309 'dependencies' : [
310 '<(DEPTH)/testing/iossim/iossim.gyp:iossim#host',
311 ],
312 }],
313 ],
314 }, # target AppRTCDemo
315 {
316 # TODO(tkchin): move this into the real third party location and
317 # have it mirrored on chrome infra.
318 'target_name': 'socketrocket',
319 'type': 'static_library',
320 'sources': [
321 'examples/objc/AppRTCDemo/third_party/SocketRocket/SRWebSocket.h',
322 'examples/objc/AppRTCDemo/third_party/SocketRocket/SRWebSocket.m',
323 ],
324 'conditions': [
325 ['OS=="mac"', {
326 'xcode_settings': {
327 # SocketRocket autosynthesizes some properties. Disable the
328 # warning so we can compile successfully.
329 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'NO',
330 'MACOSX_DEPLOYMENT_TARGET' : '10.8',
331 # SRWebSocket.m uses code with partial availability.
332 # https://code.google.com/p/webrtc/issues/detail?id=4695
333 'WARNING_CFLAGS!': ['-Wpartial-availability'],
334 },
335 }],
336 ],
337 'direct_dependent_settings': {
338 'include_dirs': [
339 'examples/objc/AppRTCDemo/third_party/SocketRocket',
340 ],
341 },
342 'xcode_settings': {
343 'CLANG_ENABLE_OBJC_ARC': 'YES',
344 'WARNING_CFLAGS': [
345 '-Wno-deprecated-declarations',
tkchin76356842015-12-02 16:42:18 -0800346 '-Wno-nonnull',
Peter Boströmfa566d62015-11-11 12:11:15 +0000347 ],
348 },
349 'link_settings': {
350 'xcode_settings': {
351 'OTHER_LDFLAGS': [
352 '-framework CFNetwork',
353 '-licucore',
354 ],
355 },
356 }
357 }, # target socketrocket
358 ], # targets
tkchin76356842015-12-02 16:42:18 -0800359 }], # OS=="ios" or (OS=="mac" and target_arch!="ia32")
Peter Boströmfa566d62015-11-11 12:11:15 +0000360
henrike@webrtc.org451745e2013-12-12 16:55:37 +0000361 ['OS=="android"', {
362 'targets': [
363 {
Peter Boströmfa566d62015-11-11 12:11:15 +0000364 'target_name': 'AppRTCDemo',
henrike@webrtc.org451745e2013-12-12 16:55:37 +0000365 'type': 'none',
366 'dependencies': [
Henrik Kjellander15583c12016-02-10 10:53:12 +0100367 'api/api.gyp:libjingle_peerconnection_java',
henrike@webrtc.org451745e2013-12-12 16:55:37 +0000368 ],
Peter Boströmfa566d62015-11-11 12:11:15 +0000369 'variables': {
370 'apk_name': 'AppRTCDemo',
371 'java_in_dir': 'examples/androidapp',
372 'has_java_resources': 1,
373 'resource_dir': 'examples/androidapp/res',
374 'R_package': 'org.appspot.apprtc',
375 'R_package_relpath': 'org/appspot/apprtc',
376 'input_jars_paths': [
377 'examples/androidapp/third_party/autobanh/autobanh.jar',
378 ],
379 'library_dexed_jars_paths': [
380 'examples/androidapp/third_party/autobanh/autobanh.jar',
381 ],
382 'native_lib_target': 'libjingle_peerconnection_so',
383 'add_to_dependents_classpaths':1,
384 },
385 'includes': [ '../build/java_apk.gypi' ],
386 }, # target AppRTCDemo
387
388 {
389 # AppRTCDemo creates a .jar as a side effect. Any java targets
390 # that need that .jar in their classpath should depend on this target,
391 # AppRTCDemo_apk. Dependents of AppRTCDemo_apk receive its
392 # jar path in the variable 'apk_output_jar_path'.
393 # This target should only be used by targets which instrument
394 # AppRTCDemo_apk.
395 'target_name': 'AppRTCDemo_apk',
396 'type': 'none',
397 'dependencies': [
398 'AppRTCDemo',
399 ],
400 'includes': [ '../build/apk_fake_jar.gypi' ],
401 }, # target AppRTCDemo_apk
402
403 {
404 'target_name': 'AppRTCDemoTest',
405 'type': 'none',
406 'dependencies': [
407 'AppRTCDemo_apk',
408 ],
409 'variables': {
410 'apk_name': 'AppRTCDemoTest',
411 'java_in_dir': 'examples/androidtests',
412 'is_test_apk': 1,
413 },
414 'includes': [ '../build/java_apk.gypi' ],
henrike@webrtc.org451745e2013-12-12 16:55:37 +0000415 },
Peter Boströmfa566d62015-11-11 12:11:15 +0000416 ], # targets
417 }], # OS=="android"
henrike@webrtc.org451745e2013-12-12 16:55:37 +0000418 ],
419}