3 # Copyright 2012, Google Inc.
5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions are met:
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.
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.
34 'target_name': 'libjingle_xmpphelp',
35 'type': 'static_library',
37 '<(DEPTH)/third_party/expat/expat.gyp:expat',
38 'libjingle.gyp:libjingle',
39 'libjingle.gyp:libjingle_p2p',
42 'xmpp/jingleinfotask.cc',
43 'xmpp/jingleinfotask.h',
45 }, # target libjingle_xmpphelp
47 'target_name': 'relayserver',
50 'libjingle.gyp:libjingle',
51 'libjingle.gyp:libjingle_p2p',
54 'examples/relayserver/relayserver_main.cc',
56 }, # target relayserver
58 'target_name': 'stunserver',
61 'libjingle.gyp:libjingle',
62 'libjingle.gyp:libjingle_p2p',
65 'examples/stunserver/stunserver_main.cc',
67 }, # target stunserver
69 'target_name': 'turnserver',
72 'libjingle.gyp:libjingle',
73 'libjingle.gyp:libjingle_p2p',
76 'examples/turnserver/turnserver_main.cc',
78 }, # target turnserver
80 'target_name': 'login',
86 'examples/login/login_main.cc',
90 'target_name': 'peerconnection_server',
93 'examples/peerconnection/server/data_socket.cc',
94 'examples/peerconnection/server/data_socket.h',
95 'examples/peerconnection/server/main.cc',
96 'examples/peerconnection/server/peer_channel.cc',
97 'examples/peerconnection/server/peer_channel.h',
98 'examples/peerconnection/server/utils.cc',
99 'examples/peerconnection/server/utils.h',
102 'libjingle.gyp:libjingle',
104 # TODO(ronghuawu): crbug.com/167187 fix size_t to int truncations.
105 'msvs_disabled_warnings': [ 4309, ],
106 }, # target peerconnection_server
109 # TODO(ronghuawu): Reenable building call.
110 # ['OS!="android"', {
113 # 'target_name': 'call',
114 # 'type': 'executable',
116 # 'libjingle.gyp:libjingle_p2p',
117 # 'libjingle_xmpphelp',
120 # 'examples/call/call_main.cc',
121 # 'examples/call/callclient.cc',
122 # 'examples/call/callclient.h',
123 # 'examples/call/console.cc',
124 # 'examples/call/console.h',
125 # 'examples/call/friendinvitesendtask.cc',
126 # 'examples/call/friendinvitesendtask.h',
127 # 'examples/call/mediaenginefactory.cc',
128 # 'examples/call/mediaenginefactory.h',
129 # 'examples/call/muc.h',
130 # 'examples/call/mucinviterecvtask.cc',
131 # 'examples/call/mucinviterecvtask.h',
132 # 'examples/call/mucinvitesendtask.cc',
133 # 'examples/call/mucinvitesendtask.h',
134 # 'examples/call/presencepushtask.cc',
135 # 'examples/call/presencepushtask.h',
141 # '<!@(pkg-config --libs-only-l gobject-2.0 gthread-2.0'
149 # 'AdditionalDependencies': [
158 # }], # OS!="android"
159 ['OS=="linux" or OS=="win"', {
162 'target_name': 'peerconnection_client',
163 'type': 'executable',
165 'examples/peerconnection/client/conductor.cc',
166 'examples/peerconnection/client/conductor.h',
167 'examples/peerconnection/client/defaults.cc',
168 'examples/peerconnection/client/defaults.h',
169 'examples/peerconnection/client/peer_connection_client.cc',
170 'examples/peerconnection/client/peer_connection_client.h',
173 '<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
174 'libjingle.gyp:libjingle_peerconnection',
175 '<@(libjingle_tests_additional_deps)',
178 # TODO(ronghuawu): Move these files to a win/ directory then they
179 # can be excluded automatically.
182 'examples/peerconnection/client/flagdefs.h',
183 'examples/peerconnection/client/main.cc',
184 'examples/peerconnection/client/main_wnd.cc',
185 'examples/peerconnection/client/main_wnd.h',
189 'SubSystem': '2', # Windows
195 'examples/peerconnection/client/linux/main.cc',
196 'examples/peerconnection/client/linux/main_wnd.cc',
197 'examples/peerconnection/client/linux/main_wnd.h',
200 '<!@(pkg-config --cflags glib-2.0 gobject-2.0 gtk+-2.0)',
204 '<!@(pkg-config --libs-only-L --libs-only-other glib-2.0'
205 ' gobject-2.0 gthread-2.0 gtk+-2.0)',
208 '<!@(pkg-config --libs-only-l glib-2.0 gobject-2.0'
209 ' gthread-2.0 gtk+-2.0)',
218 }, # target peerconnection_client
220 }], # OS=="linux" or OS=="win"
222 ['OS=="ios" or (OS=="mac" and target_arch!="ia32" and mac_sdk>="10.8")', {
225 'target_name': 'AppRTCDemo',
226 'type': 'executable',
227 'product_name': 'AppRTCDemo',
229 'mac_bundle_resources': [
230 'examples/objc/AppRTCDemo/channel.html',
233 'libjingle.gyp:libjingle_peerconnection_objc',
237 'mac_bundle_resources': [
238 'examples/objc/AppRTCDemo/ios/ResourceRules.plist',
239 'examples/objc/AppRTCDemo/ios/en.lproj/APPRTCViewController.xib',
240 'examples/objc/Icon.png',
243 'examples/objc/AppRTCDemo/ios/APPRTCAppDelegate.h',
244 'examples/objc/AppRTCDemo/ios/APPRTCAppDelegate.m',
245 'examples/objc/AppRTCDemo/ios/APPRTCViewController.h',
246 'examples/objc/AppRTCDemo/ios/APPRTCViewController.m',
247 'examples/objc/AppRTCDemo/ios/AppRTCDemo-Prefix.pch',
248 'examples/objc/AppRTCDemo/ios/main.m',
251 'INFOPLIST_FILE': 'examples/objc/AppRTCDemo/ios/Info.plist',
256 'examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.h',
257 'examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.m',
258 'examples/objc/AppRTCDemo/mac/APPRTCViewController.h',
259 'examples/objc/AppRTCDemo/mac/APPRTCViewController.m',
260 'examples/objc/AppRTCDemo/mac/main.m',
263 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'NO',
264 'INFOPLIST_FILE': 'examples/objc/AppRTCDemo/mac/Info.plist',
265 'MACOSX_DEPLOYMENT_TARGET' : '10.8',
267 '-framework AVFoundation',
272 ['target_arch=="ia32"', {
274 '<(DEPTH)/testing/iossim/iossim.gyp:iossim#host',
279 'examples/objc/APPRTCDemo',
282 'examples/objc/AppRTCDemo/APPRTCAppClient.h',
283 'examples/objc/AppRTCDemo/APPRTCAppClient.m',
284 'examples/objc/AppRTCDemo/APPRTCConnectionManager.h',
285 'examples/objc/AppRTCDemo/APPRTCConnectionManager.m',
286 'examples/objc/AppRTCDemo/GAEChannelClient.h',
287 'examples/objc/AppRTCDemo/GAEChannelClient.m',
290 'CLANG_ENABLE_OBJC_ARC': 'YES',
292 }, # target AppRTCDemo
294 }], # OS=="ios" or (OS=="mac" and target_arch!="ia32" and mac_sdk>="10.8")
299 'target_name': 'AppRTCDemo',
302 'libjingle.gyp:libjingle_peerconnection_jar',
306 # TODO(fischman): convert from a custom script to a standard gyp
307 # apk build once chromium's apk-building gyp machinery can be used
308 # (http://crbug.com/225101)
309 'action_name': 'build_apprtcdemo_apk',
311 '<(PRODUCT_DIR)/libjingle_peerconnection.jar',
312 '<(PRODUCT_DIR)/libjingle_peerconnection_so.so',
313 'examples/android/AndroidManifest.xml',
314 'examples/android/README',
315 'examples/android/ant.properties',
316 'examples/android/assets/channel.html',
317 'examples/android/build.xml',
318 'examples/android/jni/Android.mk',
319 'examples/android/project.properties',
320 'examples/android/res/drawable-hdpi/ic_launcher.png',
321 'examples/android/res/drawable-ldpi/ic_launcher.png',
322 'examples/android/res/drawable-mdpi/ic_launcher.png',
323 'examples/android/res/drawable-xhdpi/ic_launcher.png',
324 'examples/android/res/values/strings.xml',
325 'examples/android/src/org/appspot/apprtc/AppRTCClient.java',
326 'examples/android/src/org/appspot/apprtc/AppRTCDemoActivity.java',
327 'examples/android/src/org/appspot/apprtc/AppRTCGLView.java',
328 'examples/android/src/org/appspot/apprtc/UnhandledExceptionHandler.java',
329 'examples/android/src/org/appspot/apprtc/GAEChannelClient.java',
332 '<(PRODUCT_DIR)/AppRTCDemo-debug.apk',
335 'ant_log': '../../<(INTERMEDIATE_DIR)/ant.log', # ../.. to compensate for the cd examples/android below.
339 'rm -fr <(_outputs) examples/android/{bin,libs} && '
340 'mkdir -p <(INTERMEDIATE_DIR) && ' # Must happen _before_ the cd below
341 'mkdir -p examples/android/libs/<(android_app_abi) && '
342 'cp <(PRODUCT_DIR)/libjingle_peerconnection.jar examples/android/libs/ &&'
343 '<(android_strip) -o examples/android/libs/<(android_app_abi)/libjingle_peerconnection_so.so <(PRODUCT_DIR)/libjingle_peerconnection_so.so &&'
344 'cd examples/android && '
345 '{ ANDROID_SDK_ROOT=<(android_sdk_root) '
346 'ant debug > <(ant_log) 2>&1 || '
347 ' { cat <(ant_log) ; exit 1; } } && '
348 'cd - > /dev/null && '
349 'cp examples/android/bin/AppRTCDemo-debug.apk <(_outputs)'
353 }, # target AppRTCDemo