blob: e35f5f2bdfb01b70123a35dbc48d728606fc3d74 [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': [
17 '../talk/libjingle.gyp:libjingle',
18 '../talk/libjingle.gyp:libjingle_p2p',
19 ],
20 'sources': [
21 'examples/relayserver/relayserver_main.cc',
22 ],
23 }, # target relayserver
24 {
25 'target_name': 'stunserver',
26 'type': 'executable',
27 'dependencies': [
28 '../talk/libjingle.gyp:libjingle',
29 '../talk/libjingle.gyp:libjingle_p2p',
30 ],
31 'sources': [
32 'examples/stunserver/stunserver_main.cc',
33 ],
34 }, # target stunserver
35 {
36 'target_name': 'turnserver',
37 'type': 'executable',
38 'dependencies': [
39 '../talk/libjingle.gyp:libjingle',
40 '../talk/libjingle.gyp:libjingle_p2p',
41 ],
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': [
59 '<(webrtc_root)/common.gyp:webrtc_common',
60 '../talk/libjingle.gyp:libjingle',
61 ],
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': [
81 '../talk/libjingle.gyp:libjingle_peerconnection',
82 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:field_trial_default',
83 '<@(libjingle_tests_additional_deps)',
84 ],
85 'conditions': [
86 ['build_json==1', {
87 'dependencies': [
88 '<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
89 ],
90 }],
91 # TODO(ronghuawu): Move these files to a win/ directory then they
92 # can be excluded automatically.
93 ['OS=="win"', {
94 'sources': [
95 'examples/peerconnection/client/flagdefs.h',
96 'examples/peerconnection/client/main.cc',
97 'examples/peerconnection/client/main_wnd.cc',
98 'examples/peerconnection/client/main_wnd.h',
99 ],
100 'msvs_settings': {
101 'VCLinkerTool': {
102 'SubSystem': '2', # Windows
103 },
104 },
105 }], # OS=="win"
106 ['OS=="linux"', {
107 'sources': [
108 'examples/peerconnection/client/linux/main.cc',
109 'examples/peerconnection/client/linux/main_wnd.cc',
110 'examples/peerconnection/client/linux/main_wnd.h',
111 ],
112 'cflags': [
113 '<!@(pkg-config --cflags glib-2.0 gobject-2.0 gtk+-2.0)',
114 ],
115 'link_settings': {
116 'ldflags': [
117 '<!@(pkg-config --libs-only-L --libs-only-other glib-2.0'
118 ' gobject-2.0 gthread-2.0 gtk+-2.0)',
119 ],
120 'libraries': [
121 '<!@(pkg-config --libs-only-l glib-2.0 gobject-2.0'
122 ' gthread-2.0 gtk+-2.0)',
123 '-lX11',
124 '-lXcomposite',
125 '-lXext',
126 '-lXrender',
127 ],
128 },
129 }], # OS=="linux"
130 ], # conditions
131 }, # target peerconnection_client
132 ], # targets
133 }], # OS=="linux" or OS=="win"
134
tkchin76356842015-12-02 16:42:18 -0800135 ['OS=="ios" or (OS=="mac" and target_arch!="ia32")', {
Peter Boströmfa566d62015-11-11 12:11:15 +0000136 'targets': [
137 {
138 'target_name': 'apprtc_common',
139 'type': 'static_library',
140 'dependencies': [
141 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:field_trial_default',
142 '../talk/libjingle.gyp:libjingle_peerconnection_objc',
143 ],
144 'sources': [
145 'examples/objc/AppRTCDemo/common/ARDUtilities.h',
146 'examples/objc/AppRTCDemo/common/ARDUtilities.m',
147 ],
148 'include_dirs': [
149 'examples/objc/AppRTCDemo/common',
150 ],
151 'direct_dependent_settings': {
152 'include_dirs': [
153 'examples/objc/AppRTCDemo/common',
154 ],
155 },
156 'conditions': [
157 ['OS=="mac"', {
158 'xcode_settings': {
159 'MACOSX_DEPLOYMENT_TARGET' : '10.8',
160 },
161 }],
162 ],
163 'link_settings': {
164 'xcode_settings': {
165 'OTHER_LDFLAGS': [
166 '-framework QuartzCore',
167 ],
168 },
169 },
170 },
171 {
172 'target_name': 'apprtc_signaling',
173 'type': 'static_library',
174 'dependencies': [
175 'apprtc_common',
176 '../talk/libjingle.gyp:libjingle_peerconnection_objc',
177 'socketrocket',
178 ],
179 'sources': [
180 'examples/objc/AppRTCDemo/ARDAppClient.h',
181 'examples/objc/AppRTCDemo/ARDAppClient.m',
182 'examples/objc/AppRTCDemo/ARDAppClient+Internal.h',
183 'examples/objc/AppRTCDemo/ARDAppEngineClient.h',
184 'examples/objc/AppRTCDemo/ARDAppEngineClient.m',
185 'examples/objc/AppRTCDemo/ARDBitrateTracker.h',
186 'examples/objc/AppRTCDemo/ARDBitrateTracker.m',
187 'examples/objc/AppRTCDemo/ARDCEODTURNClient.h',
188 'examples/objc/AppRTCDemo/ARDCEODTURNClient.m',
189 'examples/objc/AppRTCDemo/ARDJoinResponse.h',
190 'examples/objc/AppRTCDemo/ARDJoinResponse.m',
191 'examples/objc/AppRTCDemo/ARDJoinResponse+Internal.h',
192 'examples/objc/AppRTCDemo/ARDMessageResponse.h',
193 'examples/objc/AppRTCDemo/ARDMessageResponse.m',
194 'examples/objc/AppRTCDemo/ARDMessageResponse+Internal.h',
195 'examples/objc/AppRTCDemo/ARDRoomServerClient.h',
196 'examples/objc/AppRTCDemo/ARDSDPUtils.h',
197 'examples/objc/AppRTCDemo/ARDSDPUtils.m',
198 'examples/objc/AppRTCDemo/ARDSignalingChannel.h',
199 'examples/objc/AppRTCDemo/ARDSignalingMessage.h',
200 'examples/objc/AppRTCDemo/ARDSignalingMessage.m',
201 'examples/objc/AppRTCDemo/ARDStatsBuilder.h',
202 'examples/objc/AppRTCDemo/ARDStatsBuilder.m',
203 'examples/objc/AppRTCDemo/ARDTURNClient.h',
204 'examples/objc/AppRTCDemo/ARDWebSocketChannel.h',
205 'examples/objc/AppRTCDemo/ARDWebSocketChannel.m',
206 'examples/objc/AppRTCDemo/RTCICECandidate+JSON.h',
207 'examples/objc/AppRTCDemo/RTCICECandidate+JSON.m',
208 'examples/objc/AppRTCDemo/RTCICEServer+JSON.h',
209 'examples/objc/AppRTCDemo/RTCICEServer+JSON.m',
210 'examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.h',
211 'examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.m',
212 'examples/objc/AppRTCDemo/RTCSessionDescription+JSON.h',
213 'examples/objc/AppRTCDemo/RTCSessionDescription+JSON.m',
214 ],
215 'include_dirs': [
216 'examples/objc/AppRTCDemo',
217 ],
218 'direct_dependent_settings': {
219 'include_dirs': [
220 'examples/objc/AppRTCDemo',
221 ],
222 },
223 'export_dependent_settings': [
224 '../talk/libjingle.gyp:libjingle_peerconnection_objc',
225 ],
226 'conditions': [
227 ['OS=="mac"', {
228 'xcode_settings': {
229 'MACOSX_DEPLOYMENT_TARGET' : '10.8',
230 },
231 }],
232 ],
233 },
234 {
235 'target_name': 'AppRTCDemo',
236 'type': 'executable',
237 'product_name': 'AppRTCDemo',
238 'mac_bundle': 1,
239 'dependencies': [
240 'apprtc_common',
241 'apprtc_signaling',
242 ],
243 'conditions': [
244 ['OS=="ios"', {
245 'mac_bundle_resources': [
246 'examples/objc/AppRTCDemo/ios/resources/iPhone5@2x.png',
247 'examples/objc/AppRTCDemo/ios/resources/iPhone6@2x.png',
248 'examples/objc/AppRTCDemo/ios/resources/iPhone6p@3x.png',
249 'examples/objc/AppRTCDemo/ios/resources/Roboto-Regular.ttf',
250 'examples/objc/AppRTCDemo/ios/resources/ic_call_end_black_24dp.png',
251 'examples/objc/AppRTCDemo/ios/resources/ic_call_end_black_24dp@2x.png',
252 'examples/objc/AppRTCDemo/ios/resources/ic_clear_black_24dp.png',
253 'examples/objc/AppRTCDemo/ios/resources/ic_clear_black_24dp@2x.png',
254 'examples/objc/AppRTCDemo/ios/resources/ic_switch_video_black_24dp.png',
255 'examples/objc/AppRTCDemo/ios/resources/ic_switch_video_black_24dp@2x.png',
256 'examples/objc/Icon.png',
257 ],
258 'sources': [
259 'examples/objc/AppRTCDemo/ios/ARDAppDelegate.h',
260 'examples/objc/AppRTCDemo/ios/ARDAppDelegate.m',
261 'examples/objc/AppRTCDemo/ios/ARDMainView.h',
262 'examples/objc/AppRTCDemo/ios/ARDMainView.m',
263 'examples/objc/AppRTCDemo/ios/ARDMainViewController.h',
264 'examples/objc/AppRTCDemo/ios/ARDMainViewController.m',
265 'examples/objc/AppRTCDemo/ios/ARDStatsView.h',
266 'examples/objc/AppRTCDemo/ios/ARDStatsView.m',
267 'examples/objc/AppRTCDemo/ios/ARDVideoCallView.h',
268 'examples/objc/AppRTCDemo/ios/ARDVideoCallView.m',
269 'examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.h',
270 'examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.m',
271 'examples/objc/AppRTCDemo/ios/AppRTCDemo-Prefix.pch',
272 'examples/objc/AppRTCDemo/ios/UIImage+ARDUtilities.h',
273 'examples/objc/AppRTCDemo/ios/UIImage+ARDUtilities.m',
274 'examples/objc/AppRTCDemo/ios/main.m',
275 ],
276 'xcode_settings': {
277 'INFOPLIST_FILE': 'examples/objc/AppRTCDemo/ios/Info.plist',
278 },
279 }],
280 ['OS=="mac"', {
281 'sources': [
282 'examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.h',
283 'examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.m',
284 'examples/objc/AppRTCDemo/mac/APPRTCViewController.h',
285 'examples/objc/AppRTCDemo/mac/APPRTCViewController.m',
286 'examples/objc/AppRTCDemo/mac/main.m',
287 ],
288 'xcode_settings': {
289 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'NO',
290 'INFOPLIST_FILE': 'examples/objc/AppRTCDemo/mac/Info.plist',
291 'MACOSX_DEPLOYMENT_TARGET' : '10.8',
292 'OTHER_LDFLAGS': [
293 '-framework AVFoundation',
294 ],
295 },
296 }],
297 ['target_arch=="ia32"', {
298 'dependencies' : [
299 '<(DEPTH)/testing/iossim/iossim.gyp:iossim#host',
300 ],
301 }],
302 ],
303 }, # target AppRTCDemo
304 {
305 # TODO(tkchin): move this into the real third party location and
306 # have it mirrored on chrome infra.
307 'target_name': 'socketrocket',
308 'type': 'static_library',
309 'sources': [
310 'examples/objc/AppRTCDemo/third_party/SocketRocket/SRWebSocket.h',
311 'examples/objc/AppRTCDemo/third_party/SocketRocket/SRWebSocket.m',
312 ],
313 'conditions': [
314 ['OS=="mac"', {
315 'xcode_settings': {
316 # SocketRocket autosynthesizes some properties. Disable the
317 # warning so we can compile successfully.
318 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'NO',
319 'MACOSX_DEPLOYMENT_TARGET' : '10.8',
320 # SRWebSocket.m uses code with partial availability.
321 # https://code.google.com/p/webrtc/issues/detail?id=4695
322 'WARNING_CFLAGS!': ['-Wpartial-availability'],
323 },
324 }],
325 ],
326 'direct_dependent_settings': {
327 'include_dirs': [
328 'examples/objc/AppRTCDemo/third_party/SocketRocket',
329 ],
330 },
331 'xcode_settings': {
332 'CLANG_ENABLE_OBJC_ARC': 'YES',
333 'WARNING_CFLAGS': [
334 '-Wno-deprecated-declarations',
tkchin76356842015-12-02 16:42:18 -0800335 '-Wno-nonnull',
Peter Boströmfa566d62015-11-11 12:11:15 +0000336 ],
337 },
338 'link_settings': {
339 'xcode_settings': {
340 'OTHER_LDFLAGS': [
341 '-framework CFNetwork',
342 '-licucore',
343 ],
344 },
345 }
346 }, # target socketrocket
347 ], # targets
tkchin76356842015-12-02 16:42:18 -0800348 }], # OS=="ios" or (OS=="mac" and target_arch!="ia32")
Peter Boströmfa566d62015-11-11 12:11:15 +0000349
henrike@webrtc.org451745e2013-12-12 16:55:37 +0000350 ['OS=="android"', {
351 'targets': [
352 {
Peter Boströmfa566d62015-11-11 12:11:15 +0000353 'target_name': 'AppRTCDemo',
henrike@webrtc.org451745e2013-12-12 16:55:37 +0000354 'type': 'none',
355 'dependencies': [
Peter Boströmfa566d62015-11-11 12:11:15 +0000356 '../talk/libjingle.gyp:libjingle_peerconnection_java',
henrike@webrtc.org451745e2013-12-12 16:55:37 +0000357 ],
Peter Boströmfa566d62015-11-11 12:11:15 +0000358 'variables': {
359 'apk_name': 'AppRTCDemo',
360 'java_in_dir': 'examples/androidapp',
361 'has_java_resources': 1,
362 'resource_dir': 'examples/androidapp/res',
363 'R_package': 'org.appspot.apprtc',
364 'R_package_relpath': 'org/appspot/apprtc',
365 'input_jars_paths': [
366 'examples/androidapp/third_party/autobanh/autobanh.jar',
367 ],
368 'library_dexed_jars_paths': [
369 'examples/androidapp/third_party/autobanh/autobanh.jar',
370 ],
371 'native_lib_target': 'libjingle_peerconnection_so',
372 'add_to_dependents_classpaths':1,
373 },
374 'includes': [ '../build/java_apk.gypi' ],
375 }, # target AppRTCDemo
376
377 {
378 # AppRTCDemo creates a .jar as a side effect. Any java targets
379 # that need that .jar in their classpath should depend on this target,
380 # AppRTCDemo_apk. Dependents of AppRTCDemo_apk receive its
381 # jar path in the variable 'apk_output_jar_path'.
382 # This target should only be used by targets which instrument
383 # AppRTCDemo_apk.
384 'target_name': 'AppRTCDemo_apk',
385 'type': 'none',
386 'dependencies': [
387 'AppRTCDemo',
388 ],
389 'includes': [ '../build/apk_fake_jar.gypi' ],
390 }, # target AppRTCDemo_apk
391
392 {
393 'target_name': 'AppRTCDemoTest',
394 'type': 'none',
395 'dependencies': [
396 'AppRTCDemo_apk',
397 ],
398 'variables': {
399 'apk_name': 'AppRTCDemoTest',
400 'java_in_dir': 'examples/androidtests',
401 'is_test_apk': 1,
402 },
403 'includes': [ '../build/java_apk.gypi' ],
henrike@webrtc.org451745e2013-12-12 16:55:37 +0000404 },
Peter Boströmfa566d62015-11-11 12:11:15 +0000405 ], # targets
406 }], # OS=="android"
henrike@webrtc.org451745e2013-12-12 16:55:37 +0000407 ],
408}