blob: a4959e966fc37854622e98d1d64c80ee5d807635 [file] [log] [blame]
henrike@webrtc.org28e20752013-07-10 00:45:36 +00001#
2# libjingle
3# Copyright 2012, Google Inc.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are met:
7#
8# 1. Redistributions of source code must retain the above copyright notice,
9# this list of conditions and the following disclaimer.
10# 2. Redistributions in binary form must reproduce the above copyright notice,
11# this list of conditions and the following disclaimer in the documentation
12# and/or other materials provided with the distribution.
13# 3. The name of the author may not be used to endorse or promote products
14# derived from this software without specific prior written permission.
15#
16# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
17# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
19# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26#
27
28{
29 'includes': [
30 'build/common.gypi',
31 ],
32 'targets': [
33 {
henrike@webrtc.org28e20752013-07-10 00:45:36 +000034 'target_name': 'relayserver',
35 'type': 'executable',
36 'dependencies': [
37 'libjingle.gyp:libjingle',
38 'libjingle.gyp:libjingle_p2p',
39 ],
40 'sources': [
henrike@webrtc.org2ce9a642014-01-16 16:49:53 +000041 'examples/relayserver/relayserver_main.cc',
henrike@webrtc.org28e20752013-07-10 00:45:36 +000042 ],
43 }, # target relayserver
44 {
45 'target_name': 'stunserver',
46 'type': 'executable',
47 'dependencies': [
48 'libjingle.gyp:libjingle',
49 'libjingle.gyp:libjingle_p2p',
50 ],
51 'sources': [
henrike@webrtc.org2ce9a642014-01-16 16:49:53 +000052 'examples/stunserver/stunserver_main.cc',
henrike@webrtc.org28e20752013-07-10 00:45:36 +000053 ],
54 }, # target stunserver
55 {
56 'target_name': 'turnserver',
57 'type': 'executable',
58 'dependencies': [
59 'libjingle.gyp:libjingle',
60 'libjingle.gyp:libjingle_p2p',
61 ],
62 'sources': [
henrike@webrtc.org2ce9a642014-01-16 16:49:53 +000063 'examples/turnserver/turnserver_main.cc',
henrike@webrtc.org28e20752013-07-10 00:45:36 +000064 ],
65 }, # target turnserver
66 {
henrike@webrtc.org28e20752013-07-10 00:45:36 +000067 'target_name': 'peerconnection_server',
68 'type': 'executable',
69 'sources': [
70 'examples/peerconnection/server/data_socket.cc',
71 'examples/peerconnection/server/data_socket.h',
72 'examples/peerconnection/server/main.cc',
73 'examples/peerconnection/server/peer_channel.cc',
74 'examples/peerconnection/server/peer_channel.h',
75 'examples/peerconnection/server/utils.cc',
76 'examples/peerconnection/server/utils.h',
77 ],
78 'dependencies': [
79 'libjingle.gyp:libjingle',
80 ],
81 # TODO(ronghuawu): crbug.com/167187 fix size_t to int truncations.
82 'msvs_disabled_warnings': [ 4309, ],
83 }, # target peerconnection_server
84 ],
85 'conditions': [
henrike@webrtc.org28e20752013-07-10 00:45:36 +000086 ['OS=="linux" or OS=="win"', {
87 'targets': [
88 {
89 'target_name': 'peerconnection_client',
90 'type': 'executable',
91 'sources': [
92 'examples/peerconnection/client/conductor.cc',
93 'examples/peerconnection/client/conductor.h',
94 'examples/peerconnection/client/defaults.cc',
95 'examples/peerconnection/client/defaults.h',
96 'examples/peerconnection/client/peer_connection_client.cc',
97 'examples/peerconnection/client/peer_connection_client.h',
98 ],
99 'dependencies': [
100 '<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
101 'libjingle.gyp:libjingle_peerconnection',
buildbot@webrtc.org21b4da82014-07-23 19:07:53 +0000102 '<@(libjingle_tests_additional_deps)',
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000103 ],
104 'conditions': [
105 # TODO(ronghuawu): Move these files to a win/ directory then they
106 # can be excluded automatically.
107 ['OS=="win"', {
108 'sources': [
109 'examples/peerconnection/client/flagdefs.h',
110 'examples/peerconnection/client/main.cc',
111 'examples/peerconnection/client/main_wnd.cc',
112 'examples/peerconnection/client/main_wnd.h',
113 ],
114 'msvs_settings': {
115 'VCLinkerTool': {
116 'SubSystem': '2', # Windows
117 },
118 },
119 }], # OS=="win"
120 ['OS=="linux"', {
121 'sources': [
122 'examples/peerconnection/client/linux/main.cc',
123 'examples/peerconnection/client/linux/main_wnd.cc',
124 'examples/peerconnection/client/linux/main_wnd.h',
125 ],
126 'cflags': [
127 '<!@(pkg-config --cflags glib-2.0 gobject-2.0 gtk+-2.0)',
128 ],
129 'link_settings': {
130 'ldflags': [
131 '<!@(pkg-config --libs-only-L --libs-only-other glib-2.0'
132 ' gobject-2.0 gthread-2.0 gtk+-2.0)',
133 ],
134 'libraries': [
135 '<!@(pkg-config --libs-only-l glib-2.0 gobject-2.0'
136 ' gthread-2.0 gtk+-2.0)',
137 '-lX11',
138 '-lXcomposite',
139 '-lXext',
140 '-lXrender',
141 ],
142 },
143 }], # OS=="linux"
144 ], # conditions
145 }, # target peerconnection_client
146 ], # targets
147 }], # OS=="linux" or OS=="win"
148
tkchin@webrtc.org56d11462014-05-30 23:04:39 +0000149 ['OS=="ios" or (OS=="mac" and target_arch!="ia32" and mac_sdk>="10.8")', {
fischman@webrtc.org1bc19542013-08-01 18:29:45 +0000150 'targets': [
tkchin@webrtc.org3a63a3c2015-01-06 07:21:34 +0000151 { 'target_name': 'apprtc_signaling',
152 'type': 'static_library',
153 'dependencies': [
154 'libjingle.gyp:libjingle_peerconnection_objc',
155 'socketrocket',
156 ],
157 'sources': [
158 'examples/objc/AppRTCDemo/ARDAppClient.h',
159 'examples/objc/AppRTCDemo/ARDAppClient.m',
160 'examples/objc/AppRTCDemo/ARDAppClient+Internal.h',
161 'examples/objc/AppRTCDemo/ARDAppEngineClient.h',
162 'examples/objc/AppRTCDemo/ARDAppEngineClient.m',
163 'examples/objc/AppRTCDemo/ARDCEODTURNClient.h',
164 'examples/objc/AppRTCDemo/ARDCEODTURNClient.m',
165 'examples/objc/AppRTCDemo/ARDMessageResponse.h',
166 'examples/objc/AppRTCDemo/ARDMessageResponse.m',
167 'examples/objc/AppRTCDemo/ARDMessageResponse+Internal.h',
168 'examples/objc/AppRTCDemo/ARDRegisterResponse.h',
169 'examples/objc/AppRTCDemo/ARDRegisterResponse.m',
170 'examples/objc/AppRTCDemo/ARDRegisterResponse+Internal.h',
171 'examples/objc/AppRTCDemo/ARDRoomServerClient.h',
172 'examples/objc/AppRTCDemo/ARDSignalingChannel.h',
173 'examples/objc/AppRTCDemo/ARDSignalingMessage.h',
174 'examples/objc/AppRTCDemo/ARDSignalingMessage.m',
175 'examples/objc/AppRTCDemo/ARDTURNClient.h',
176 'examples/objc/AppRTCDemo/ARDUtilities.h',
177 'examples/objc/AppRTCDemo/ARDUtilities.m',
178 'examples/objc/AppRTCDemo/ARDWebSocketChannel.h',
179 'examples/objc/AppRTCDemo/ARDWebSocketChannel.m',
180 'examples/objc/AppRTCDemo/RTCICECandidate+JSON.h',
181 'examples/objc/AppRTCDemo/RTCICECandidate+JSON.m',
182 'examples/objc/AppRTCDemo/RTCICEServer+JSON.h',
183 'examples/objc/AppRTCDemo/RTCICEServer+JSON.m',
184 'examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.h',
185 'examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.m',
186 'examples/objc/AppRTCDemo/RTCSessionDescription+JSON.h',
187 'examples/objc/AppRTCDemo/RTCSessionDescription+JSON.m',
188 ],
189 'include_dirs': [
190 'examples/objc/APPRTCDemo',
191 ],
192 'direct_dependent_settings': {
193 'include_dirs': [
194 'examples/objc/APPRTCDemo',
195 ],
196 },
197 'export_dependent_settings': [
198 'libjingle.gyp:libjingle_peerconnection_objc',
199 ],
200 'conditions': [
201 ['OS=="mac"', {
202 'xcode_settings': {
203 'MACOSX_DEPLOYMENT_TARGET' : '10.8',
204 },
205 }],
206 ],
207 },
fischman@webrtc.org1bc19542013-08-01 18:29:45 +0000208 {
209 'target_name': 'AppRTCDemo',
210 'type': 'executable',
211 'product_name': 'AppRTCDemo',
212 'mac_bundle': 1,
fischman@webrtc.org1bc19542013-08-01 18:29:45 +0000213 'dependencies': [
tkchin@webrtc.org3a63a3c2015-01-06 07:21:34 +0000214 'apprtc_signaling',
fischman@webrtc.org1bc19542013-08-01 18:29:45 +0000215 ],
216 'conditions': [
tkchin@webrtc.orgacca6752014-05-30 22:26:06 +0000217 ['OS=="ios"', {
218 'mac_bundle_resources': [
tkchin@webrtc.orgef2a5dd2015-01-15 22:38:21 +0000219 'examples/objc/AppRTCDemo/ios/resources/Default-568h.png',
220 'examples/objc/AppRTCDemo/ios/resources/Roboto-Regular.ttf',
221 'examples/objc/AppRTCDemo/ios/resources/ic_call_end_black_24dp.png',
222 'examples/objc/AppRTCDemo/ios/resources/ic_call_end_black_24dp@2x.png',
223 'examples/objc/AppRTCDemo/ios/resources/ic_clear_black_24dp.png',
224 'examples/objc/AppRTCDemo/ios/resources/ic_clear_black_24dp@2x.png',
tkchin@webrtc.orgacca6752014-05-30 22:26:06 +0000225 'examples/objc/Icon.png',
226 ],
227 'sources': [
tkchin@webrtc.orgef2a5dd2015-01-15 22:38:21 +0000228 'examples/objc/AppRTCDemo/ios/ARDAppDelegate.h',
229 'examples/objc/AppRTCDemo/ios/ARDAppDelegate.m',
230 'examples/objc/AppRTCDemo/ios/ARDMainView.h',
231 'examples/objc/AppRTCDemo/ios/ARDMainView.m',
232 'examples/objc/AppRTCDemo/ios/ARDMainViewController.h',
233 'examples/objc/AppRTCDemo/ios/ARDMainViewController.m',
234 'examples/objc/AppRTCDemo/ios/ARDVideoCallView.h',
235 'examples/objc/AppRTCDemo/ios/ARDVideoCallView.m',
236 'examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.h',
237 'examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.m',
tkchin@webrtc.orgacca6752014-05-30 22:26:06 +0000238 'examples/objc/AppRTCDemo/ios/AppRTCDemo-Prefix.pch',
tkchin@webrtc.orgef2a5dd2015-01-15 22:38:21 +0000239 'examples/objc/AppRTCDemo/ios/UIImage+ARDUtilities.h',
240 'examples/objc/AppRTCDemo/ios/UIImage+ARDUtilities.m',
tkchin@webrtc.orgacca6752014-05-30 22:26:06 +0000241 'examples/objc/AppRTCDemo/ios/main.m',
242 ],
243 'xcode_settings': {
244 'INFOPLIST_FILE': 'examples/objc/AppRTCDemo/ios/Info.plist',
245 },
246 }],
247 ['OS=="mac"', {
248 'sources': [
249 'examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.h',
250 'examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.m',
251 'examples/objc/AppRTCDemo/mac/APPRTCViewController.h',
252 'examples/objc/AppRTCDemo/mac/APPRTCViewController.m',
253 'examples/objc/AppRTCDemo/mac/main.m',
254 ],
255 'xcode_settings': {
256 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'NO',
257 'INFOPLIST_FILE': 'examples/objc/AppRTCDemo/mac/Info.plist',
258 'MACOSX_DEPLOYMENT_TARGET' : '10.8',
259 'OTHER_LDFLAGS': [
260 '-framework AVFoundation',
tkchin@webrtc.orgacca6752014-05-30 22:26:06 +0000261 ],
262 },
263 }],
fischman@webrtc.org1bc19542013-08-01 18:29:45 +0000264 ['target_arch=="ia32"', {
265 'dependencies' : [
266 '<(DEPTH)/testing/iossim/iossim.gyp:iossim#host',
267 ],
268 }],
269 ],
fischman@webrtc.org1bc19542013-08-01 18:29:45 +0000270 }, # target AppRTCDemo
tkchin@webrtc.org87776a82014-12-09 19:32:35 +0000271 {
272 # TODO(tkchin): move this into the real third party location and
273 # have it mirrored on chrome infra.
274 'target_name': 'socketrocket',
275 'type': 'static_library',
276 'sources': [
277 'examples/objc/AppRTCDemo/third_party/SocketRocket/SRWebSocket.h',
278 'examples/objc/AppRTCDemo/third_party/SocketRocket/SRWebSocket.m',
279 ],
280 'conditions': [
281 ['OS=="mac"', {
282 'xcode_settings': {
283 # SocketRocket autosynthesizes some properties. Disable the
284 # warning so we can compile successfully.
285 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'NO',
286 'MACOSX_DEPLOYMENT_TARGET' : '10.8',
287 },
288 }],
289 ],
290 'direct_dependent_settings': {
291 'include_dirs': [
292 'examples/objc/AppRTCDemo/third_party/SocketRocket',
293 ],
294 },
295 'xcode_settings': {
296 'CLANG_ENABLE_OBJC_ARC': 'YES',
297 'WARNING_CFLAGS': [
298 '-Wno-deprecated-declarations',
299 ],
300 },
301 'link_settings': {
302 'xcode_settings': {
303 'OTHER_LDFLAGS': [
304 '-framework CFNetwork',
305 ],
306 },
307 'libraries': [
308 '$(SDKROOT)/usr/lib/libicucore.dylib',
309 ],
310 }
311 }, # target socketrocket
fischman@webrtc.org1bc19542013-08-01 18:29:45 +0000312 ], # targets
tkchin@webrtc.org56d11462014-05-30 23:04:39 +0000313 }], # OS=="ios" or (OS=="mac" and target_arch!="ia32" and mac_sdk>="10.8")
fischman@webrtc.org1bc19542013-08-01 18:29:45 +0000314
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000315 ['OS=="android"', {
316 'targets': [
317 {
318 'target_name': 'AppRTCDemo',
319 'type': 'none',
320 'dependencies': [
321 'libjingle.gyp:libjingle_peerconnection_jar',
322 ],
323 'actions': [
324 {
glaznev@webrtc.org8390c272015-01-02 19:51:12 +0000325 # TODO(glaznev): convert from a custom script to a standard gyp
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000326 # apk build once chromium's apk-building gyp machinery can be used
327 # (http://crbug.com/225101)
328 'action_name': 'build_apprtcdemo_apk',
329 'inputs' : [
henrike@webrtc.org723d6832013-07-12 16:04:50 +0000330 '<(PRODUCT_DIR)/libjingle_peerconnection.jar',
perkj@webrtc.org128faba2014-12-11 12:25:57 +0000331 '<(PRODUCT_DIR)/lib/libjingle_peerconnection_so.so',
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000332 'examples/android/AndroidManifest.xml',
333 'examples/android/README',
334 'examples/android/ant.properties',
henrik.lundin@webrtc.org6f6ef722014-11-19 13:02:24 +0000335 'examples/android/third_party/autobanh/autobanh.jar',
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000336 'examples/android/build.xml',
337 'examples/android/jni/Android.mk',
338 'examples/android/project.properties',
glaznev@webrtc.org7bb4a982014-10-22 17:43:37 +0000339 'examples/android/res/drawable-hdpi/disconnect.png',
glaznev@webrtc.org5f38c8d2014-11-03 22:18:52 +0000340 'examples/android/res/drawable-hdpi/ic_action_full_screen.png',
341 'examples/android/res/drawable-hdpi/ic_action_return_from_full_screen.png',
342 'examples/android/res/drawable-hdpi/ic_loopback_call.png',
343 'examples/android/res/drawable-hdpi/ic_launcher.png',
glaznev@webrtc.org7bb4a982014-10-22 17:43:37 +0000344 'examples/android/res/drawable-ldpi/disconnect.png',
glaznev@webrtc.org5f38c8d2014-11-03 22:18:52 +0000345 'examples/android/res/drawable-ldpi/ic_action_full_screen.png',
346 'examples/android/res/drawable-ldpi/ic_action_return_from_full_screen.png',
347 'examples/android/res/drawable-ldpi/ic_loopback_call.png',
348 'examples/android/res/drawable-ldpi/ic_launcher.png',
glaznev@webrtc.org7bb4a982014-10-22 17:43:37 +0000349 'examples/android/res/drawable-mdpi/disconnect.png',
glaznev@webrtc.org5f38c8d2014-11-03 22:18:52 +0000350 'examples/android/res/drawable-mdpi/ic_action_full_screen.png',
351 'examples/android/res/drawable-mdpi/ic_action_return_from_full_screen.png',
352 'examples/android/res/drawable-mdpi/ic_loopback_call.png',
353 'examples/android/res/drawable-mdpi/ic_launcher.png',
glaznev@webrtc.org7bb4a982014-10-22 17:43:37 +0000354 'examples/android/res/drawable-xhdpi/disconnect.png',
glaznev@webrtc.org5f38c8d2014-11-03 22:18:52 +0000355 'examples/android/res/drawable-xhdpi/ic_action_full_screen.png',
356 'examples/android/res/drawable-xhdpi/ic_action_return_from_full_screen.png',
357 'examples/android/res/drawable-xhdpi/ic_loopback_call.png',
358 'examples/android/res/drawable-xhdpi/ic_launcher.png',
glaznev@webrtc.org7bb4a982014-10-22 17:43:37 +0000359 'examples/android/res/layout/activity_connect.xml',
360 'examples/android/res/layout/activity_fullscreen.xml',
361 'examples/android/res/layout/fragment_menubar.xml',
glaznev@webrtc.org243eb8e2014-10-27 17:22:15 +0000362 'examples/android/res/menu/connect_menu.xml',
363 'examples/android/res/values/arrays.xml',
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000364 'examples/android/res/values/strings.xml',
glaznev@webrtc.org243eb8e2014-10-27 17:22:15 +0000365 'examples/android/res/xml/preferences.xml',
henrika@webrtc.org5e160662014-11-06 20:35:13 +0000366 'examples/android/src/org/appspot/apprtc/AppRTCAudioManager.java',
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000367 'examples/android/src/org/appspot/apprtc/AppRTCClient.java',
368 'examples/android/src/org/appspot/apprtc/AppRTCDemoActivity.java',
henrika@webrtc.orgb024da32014-12-29 10:35:06 +0000369 'examples/android/src/org/appspot/apprtc/AppRTCProximitySensor.java',
glaznev@webrtc.org7bb4a982014-10-22 17:43:37 +0000370 'examples/android/src/org/appspot/apprtc/ConnectActivity.java',
glaznev@webrtc.org58202942014-10-17 17:42:38 +0000371 'examples/android/src/org/appspot/apprtc/PeerConnectionClient.java',
henrik.lundin@webrtc.org6f6ef722014-11-19 13:02:24 +0000372 'examples/android/src/org/appspot/apprtc/RoomParametersFetcher.java',
glaznev@webrtc.org243eb8e2014-10-27 17:22:15 +0000373 'examples/android/src/org/appspot/apprtc/SettingsActivity.java',
374 'examples/android/src/org/appspot/apprtc/SettingsFragment.java',
glaznev@webrtc.org58202942014-10-17 17:42:38 +0000375 'examples/android/src/org/appspot/apprtc/UnhandledExceptionHandler.java',
henrik.lundin@webrtc.org6f6ef722014-11-19 13:02:24 +0000376 'examples/android/src/org/appspot/apprtc/WebSocketChannelClient.java',
377 'examples/android/src/org/appspot/apprtc/WebSocketRTCClient.java',
glaznev@webrtc.orgf6a97142015-01-06 22:24:09 +0000378 'examples/android/src/org/appspot/apprtc/util/AppRTCUtils.java',
379 'examples/android/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java',
380 'examples/android/src/org/appspot/apprtc/util/LooperExecutor.java',
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000381 ],
382 'outputs': [
383 '<(PRODUCT_DIR)/AppRTCDemo-debug.apk',
384 ],
fischman@webrtc.orgdf7b1d62013-12-11 22:36:22 +0000385 'variables': {
fischman@webrtc.org000dde92013-12-20 22:49:35 +0000386 'ant_log': '../../<(INTERMEDIATE_DIR)/ant.log', # ../.. to compensate for the cd examples/android below.
fischman@webrtc.orgdf7b1d62013-12-11 22:36:22 +0000387 },
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000388 'action': [
389 'bash', '-ec',
henrike@webrtc.org723d6832013-07-12 16:04:50 +0000390 'rm -fr <(_outputs) examples/android/{bin,libs} && '
fischman@webrtc.org000dde92013-12-20 22:49:35 +0000391 'mkdir -p <(INTERMEDIATE_DIR) && ' # Must happen _before_ the cd below
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000392 'mkdir -p examples/android/libs/<(android_app_abi) && '
393 'cp <(PRODUCT_DIR)/libjingle_peerconnection.jar examples/android/libs/ &&'
henrik.lundin@webrtc.org6f6ef722014-11-19 13:02:24 +0000394 'cp examples/android/third_party/autobanh/autobanh.jar examples/android/libs/ &&'
perkj@webrtc.org128faba2014-12-11 12:25:57 +0000395 '<(android_strip) -o examples/android/libs/<(android_app_abi)/libjingle_peerconnection_so.so <(PRODUCT_DIR)/lib/libjingle_peerconnection_so.so &&'
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000396 'cd examples/android && '
kjellander@webrtc.org190b72a2014-04-15 08:35:49 +0000397 '{ ANDROID_SDK_ROOT=<(android_sdk_root) '
398 'ant debug > <(ant_log) 2>&1 || '
fischman@webrtc.orgdf7b1d62013-12-11 22:36:22 +0000399 ' { cat <(ant_log) ; exit 1; } } && '
400 'cd - > /dev/null && '
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000401 'cp examples/android/bin/AppRTCDemo-debug.apk <(_outputs)'
402 ],
403 },
404 ],
405 }, # target AppRTCDemo
406 ], # targets
407 }], # OS=="android"
glaznev@webrtc.org8390c272015-01-02 19:51:12 +0000408
409 ['OS=="android"', {
410 'targets': [
411 {
412 'target_name': 'AppRTCDemoTest',
413 'type': 'none',
414 'dependencies': [
415 'AppRTCDemo',
416 ],
417 'actions': [
418 {
419 # TODO(glaznev): convert from a custom script to a standard gyp
420 # apk build once chromium's apk-building gyp machinery can be used
421 # (http://crbug.com/225101)
422 'action_name': 'build_apprtcdemotest_apk',
423 'inputs' : [
424 'examples/androidtests/AndroidManifest.xml',
425 'examples/androidtests/ant.properties',
426 'examples/androidtests/build.xml',
427 'examples/androidtests/project.properties',
glaznev@webrtc.orgf6a97142015-01-06 22:24:09 +0000428 'examples/androidtests/src/org/appspot/apprtc/test/LooperExecutorTest.java',
glaznev@webrtc.org8390c272015-01-02 19:51:12 +0000429 'examples/androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java',
430 ],
431 'outputs': [
432 '<(PRODUCT_DIR)/AppRTCDemoTest-debug.apk',
433 ],
434 'variables': {
435 'ant_log': '../../<(INTERMEDIATE_DIR)/ant.log', # ../.. to compensate for the cd examples/androidtests below.
436 },
437 'action': [
438 'bash', '-ec',
439 'mkdir -p <(INTERMEDIATE_DIR) && ' # Must happen _before_ the cd below
440 'cd examples/androidtests && '
441 '{ ANDROID_SDK_ROOT=<(android_sdk_root) '
442 'ant debug > <(ant_log) 2>&1 || '
443 ' { cat <(ant_log) ; exit 1; } } && '
444 'cd - > /dev/null && '
445 'cp examples/androidtests/bin/AppRTCDemoTest-debug.apk <(_outputs)'
446 ],
447 },
448 ],
449 }, # target AppRTCDemoTest
450 ], # targets
451 }], # OS=="android"
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000452 ],
453}