blob: 3401411314108600a57ee0866d79e13861438796 [file] [log] [blame]
henrike@webrtc.org28e20752013-07-10 00:45:36 +00001#
2# libjingle
jlmiller@webrtc.org5f93d0a2015-01-20 21:36:13 +00003# Copyright 2012 Google Inc.
henrike@webrtc.org28e20752013-07-10 00:45:36 +00004#
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.
henrike@webrtc.org28e20752013-07-10 00:45:36 +000026
27{
28 'includes': [
29 'build/common.gypi',
30 ],
31 'targets': [
32 {
henrike@webrtc.org28e20752013-07-10 00:45:36 +000033 'target_name': 'relayserver',
34 'type': 'executable',
35 'dependencies': [
36 'libjingle.gyp:libjingle',
37 'libjingle.gyp:libjingle_p2p',
38 ],
39 'sources': [
henrike@webrtc.org2ce9a642014-01-16 16:49:53 +000040 'examples/relayserver/relayserver_main.cc',
henrike@webrtc.org28e20752013-07-10 00:45:36 +000041 ],
42 }, # target relayserver
43 {
44 'target_name': 'stunserver',
45 'type': 'executable',
46 'dependencies': [
47 'libjingle.gyp:libjingle',
48 'libjingle.gyp:libjingle_p2p',
49 ],
50 'sources': [
henrike@webrtc.org2ce9a642014-01-16 16:49:53 +000051 'examples/stunserver/stunserver_main.cc',
henrike@webrtc.org28e20752013-07-10 00:45:36 +000052 ],
53 }, # target stunserver
54 {
55 'target_name': 'turnserver',
56 'type': 'executable',
57 'dependencies': [
58 'libjingle.gyp:libjingle',
59 'libjingle.gyp:libjingle_p2p',
60 ],
61 'sources': [
henrike@webrtc.org2ce9a642014-01-16 16:49:53 +000062 'examples/turnserver/turnserver_main.cc',
henrike@webrtc.org28e20752013-07-10 00:45:36 +000063 ],
64 }, # target turnserver
65 {
henrike@webrtc.org28e20752013-07-10 00:45:36 +000066 'target_name': 'peerconnection_server',
67 'type': 'executable',
68 'sources': [
69 'examples/peerconnection/server/data_socket.cc',
70 'examples/peerconnection/server/data_socket.h',
71 'examples/peerconnection/server/main.cc',
72 'examples/peerconnection/server/peer_channel.cc',
73 'examples/peerconnection/server/peer_channel.h',
74 'examples/peerconnection/server/utils.cc',
75 'examples/peerconnection/server/utils.h',
76 ],
77 'dependencies': [
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000078 '<(webrtc_root)/common.gyp:webrtc_common',
henrike@webrtc.org28e20752013-07-10 00:45:36 +000079 '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': [
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000100 'libjingle.gyp:libjingle_peerconnection',
buildbot@webrtc.org21b4da82014-07-23 19:07:53 +0000101 '<@(libjingle_tests_additional_deps)',
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000102 ],
103 'conditions': [
Henrik Kjellandere6cefb62015-04-27 14:39:04 +0200104 ['build_json==1', {
105 'dependencies': [
106 '<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
107 ],
108 }],
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000109 # TODO(ronghuawu): Move these files to a win/ directory then they
110 # can be excluded automatically.
111 ['OS=="win"', {
112 'sources': [
113 'examples/peerconnection/client/flagdefs.h',
114 'examples/peerconnection/client/main.cc',
115 'examples/peerconnection/client/main_wnd.cc',
116 'examples/peerconnection/client/main_wnd.h',
117 ],
118 'msvs_settings': {
119 'VCLinkerTool': {
120 'SubSystem': '2', # Windows
121 },
122 },
123 }], # OS=="win"
124 ['OS=="linux"', {
125 'sources': [
126 'examples/peerconnection/client/linux/main.cc',
127 'examples/peerconnection/client/linux/main_wnd.cc',
128 'examples/peerconnection/client/linux/main_wnd.h',
129 ],
130 'cflags': [
131 '<!@(pkg-config --cflags glib-2.0 gobject-2.0 gtk+-2.0)',
132 ],
133 'link_settings': {
134 'ldflags': [
135 '<!@(pkg-config --libs-only-L --libs-only-other glib-2.0'
136 ' gobject-2.0 gthread-2.0 gtk+-2.0)',
137 ],
138 'libraries': [
139 '<!@(pkg-config --libs-only-l glib-2.0 gobject-2.0'
140 ' gthread-2.0 gtk+-2.0)',
141 '-lX11',
142 '-lXcomposite',
143 '-lXext',
144 '-lXrender',
145 ],
146 },
147 }], # OS=="linux"
148 ], # conditions
149 }, # target peerconnection_client
150 ], # targets
151 }], # OS=="linux" or OS=="win"
152
tkchin@webrtc.org56d11462014-05-30 23:04:39 +0000153 ['OS=="ios" or (OS=="mac" and target_arch!="ia32" and mac_sdk>="10.8")', {
fischman@webrtc.org1bc19542013-08-01 18:29:45 +0000154 'targets': [
Zeke Chin2d3b7e22015-07-14 12:55:44 -0700155 {
156 'target_name': 'apprtc_common',
157 'type': 'static_library',
158 'sources': [
159 'examples/objc/AppRTCDemo/common/ARDLogging.h',
160 'examples/objc/AppRTCDemo/common/ARDLogging.mm',
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': [
173 ['OS=="mac"', {
174 'xcode_settings': {
175 'MACOSX_DEPLOYMENT_TARGET' : '10.8',
176 },
177 }],
178 ],
179 },
180 {
181 'target_name': 'apprtc_signaling',
tkchin@webrtc.org3a63a3c2015-01-06 07:21:34 +0000182 'type': 'static_library',
183 'dependencies': [
Zeke Chin2d3b7e22015-07-14 12:55:44 -0700184 'apprtc_common',
tkchin@webrtc.org3a63a3c2015-01-06 07:21:34 +0000185 'libjingle.gyp:libjingle_peerconnection_objc',
186 'socketrocket',
187 ],
188 'sources': [
189 'examples/objc/AppRTCDemo/ARDAppClient.h',
190 'examples/objc/AppRTCDemo/ARDAppClient.m',
191 'examples/objc/AppRTCDemo/ARDAppClient+Internal.h',
192 'examples/objc/AppRTCDemo/ARDAppEngineClient.h',
193 'examples/objc/AppRTCDemo/ARDAppEngineClient.m',
194 'examples/objc/AppRTCDemo/ARDCEODTURNClient.h',
195 'examples/objc/AppRTCDemo/ARDCEODTURNClient.m',
tkchin@webrtc.org36401ab2015-01-27 21:34:39 +0000196 'examples/objc/AppRTCDemo/ARDJoinResponse.h',
197 'examples/objc/AppRTCDemo/ARDJoinResponse.m',
198 'examples/objc/AppRTCDemo/ARDJoinResponse+Internal.h',
tkchin@webrtc.org3a63a3c2015-01-06 07:21:34 +0000199 'examples/objc/AppRTCDemo/ARDMessageResponse.h',
200 'examples/objc/AppRTCDemo/ARDMessageResponse.m',
201 'examples/objc/AppRTCDemo/ARDMessageResponse+Internal.h',
tkchin@webrtc.org3a63a3c2015-01-06 07:21:34 +0000202 'examples/objc/AppRTCDemo/ARDRoomServerClient.h',
Zeke Chin71f6f442015-06-29 14:34:58 -0700203 'examples/objc/AppRTCDemo/ARDSDPUtils.h',
204 'examples/objc/AppRTCDemo/ARDSDPUtils.m',
tkchin@webrtc.org3a63a3c2015-01-06 07:21:34 +0000205 'examples/objc/AppRTCDemo/ARDSignalingChannel.h',
206 'examples/objc/AppRTCDemo/ARDSignalingMessage.h',
207 'examples/objc/AppRTCDemo/ARDSignalingMessage.m',
208 'examples/objc/AppRTCDemo/ARDTURNClient.h',
tkchin@webrtc.org3a63a3c2015-01-06 07:21:34 +0000209 'examples/objc/AppRTCDemo/ARDWebSocketChannel.h',
210 'examples/objc/AppRTCDemo/ARDWebSocketChannel.m',
211 'examples/objc/AppRTCDemo/RTCICECandidate+JSON.h',
212 'examples/objc/AppRTCDemo/RTCICECandidate+JSON.m',
213 'examples/objc/AppRTCDemo/RTCICEServer+JSON.h',
214 'examples/objc/AppRTCDemo/RTCICEServer+JSON.m',
215 'examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.h',
216 'examples/objc/AppRTCDemo/RTCMediaConstraints+JSON.m',
217 'examples/objc/AppRTCDemo/RTCSessionDescription+JSON.h',
218 'examples/objc/AppRTCDemo/RTCSessionDescription+JSON.m',
219 ],
220 'include_dirs': [
tkchin@webrtc.org9650ab42015-02-26 20:58:08 +0000221 'examples/objc/AppRTCDemo',
tkchin@webrtc.org3a63a3c2015-01-06 07:21:34 +0000222 ],
223 'direct_dependent_settings': {
224 'include_dirs': [
tkchin@webrtc.org9650ab42015-02-26 20:58:08 +0000225 'examples/objc/AppRTCDemo',
tkchin@webrtc.org3a63a3c2015-01-06 07:21:34 +0000226 ],
227 },
228 'export_dependent_settings': [
229 'libjingle.gyp:libjingle_peerconnection_objc',
230 ],
231 'conditions': [
232 ['OS=="mac"', {
233 'xcode_settings': {
234 'MACOSX_DEPLOYMENT_TARGET' : '10.8',
235 },
236 }],
237 ],
238 },
fischman@webrtc.org1bc19542013-08-01 18:29:45 +0000239 {
240 'target_name': 'AppRTCDemo',
241 'type': 'executable',
242 'product_name': 'AppRTCDemo',
243 'mac_bundle': 1,
fischman@webrtc.org1bc19542013-08-01 18:29:45 +0000244 'dependencies': [
Zeke Chin2d3b7e22015-07-14 12:55:44 -0700245 'apprtc_common',
tkchin@webrtc.org3a63a3c2015-01-06 07:21:34 +0000246 'apprtc_signaling',
fischman@webrtc.org1bc19542013-08-01 18:29:45 +0000247 ],
248 'conditions': [
tkchin@webrtc.orgacca6752014-05-30 22:26:06 +0000249 ['OS=="ios"', {
250 'mac_bundle_resources': [
tkchin0d7dbde2015-07-01 18:26:35 -0700251 'examples/objc/AppRTCDemo/ios/resources/iPhone5@2x.png',
252 'examples/objc/AppRTCDemo/ios/resources/iPhone6@2x.png',
253 'examples/objc/AppRTCDemo/ios/resources/iPhone6p@3x.png',
tkchin@webrtc.orgef2a5dd2015-01-15 22:38:21 +0000254 'examples/objc/AppRTCDemo/ios/resources/Roboto-Regular.ttf',
255 'examples/objc/AppRTCDemo/ios/resources/ic_call_end_black_24dp.png',
256 'examples/objc/AppRTCDemo/ios/resources/ic_call_end_black_24dp@2x.png',
257 'examples/objc/AppRTCDemo/ios/resources/ic_clear_black_24dp.png',
258 'examples/objc/AppRTCDemo/ios/resources/ic_clear_black_24dp@2x.png',
Zeke Chin57cc74e2015-05-05 07:52:31 -0700259 'examples/objc/AppRTCDemo/ios/resources/ic_switch_video_black_24dp.png',
260 'examples/objc/AppRTCDemo/ios/resources/ic_switch_video_black_24dp@2x.png',
tkchin@webrtc.orgacca6752014-05-30 22:26:06 +0000261 'examples/objc/Icon.png',
262 ],
263 'sources': [
tkchin@webrtc.orgef2a5dd2015-01-15 22:38:21 +0000264 'examples/objc/AppRTCDemo/ios/ARDAppDelegate.h',
265 'examples/objc/AppRTCDemo/ios/ARDAppDelegate.m',
266 'examples/objc/AppRTCDemo/ios/ARDMainView.h',
267 'examples/objc/AppRTCDemo/ios/ARDMainView.m',
268 'examples/objc/AppRTCDemo/ios/ARDMainViewController.h',
269 'examples/objc/AppRTCDemo/ios/ARDMainViewController.m',
270 'examples/objc/AppRTCDemo/ios/ARDVideoCallView.h',
271 'examples/objc/AppRTCDemo/ios/ARDVideoCallView.m',
272 'examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.h',
273 'examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.m',
tkchin@webrtc.orgacca6752014-05-30 22:26:06 +0000274 'examples/objc/AppRTCDemo/ios/AppRTCDemo-Prefix.pch',
tkchin@webrtc.orgef2a5dd2015-01-15 22:38:21 +0000275 'examples/objc/AppRTCDemo/ios/UIImage+ARDUtilities.h',
276 'examples/objc/AppRTCDemo/ios/UIImage+ARDUtilities.m',
tkchin@webrtc.orgacca6752014-05-30 22:26:06 +0000277 'examples/objc/AppRTCDemo/ios/main.m',
278 ],
279 'xcode_settings': {
280 'INFOPLIST_FILE': 'examples/objc/AppRTCDemo/ios/Info.plist',
281 },
282 }],
283 ['OS=="mac"', {
284 'sources': [
285 'examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.h',
286 'examples/objc/AppRTCDemo/mac/APPRTCAppDelegate.m',
287 'examples/objc/AppRTCDemo/mac/APPRTCViewController.h',
288 'examples/objc/AppRTCDemo/mac/APPRTCViewController.m',
289 'examples/objc/AppRTCDemo/mac/main.m',
290 ],
291 'xcode_settings': {
292 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'NO',
293 'INFOPLIST_FILE': 'examples/objc/AppRTCDemo/mac/Info.plist',
294 'MACOSX_DEPLOYMENT_TARGET' : '10.8',
295 'OTHER_LDFLAGS': [
296 '-framework AVFoundation',
tkchin@webrtc.orgacca6752014-05-30 22:26:06 +0000297 ],
298 },
299 }],
fischman@webrtc.org1bc19542013-08-01 18:29:45 +0000300 ['target_arch=="ia32"', {
301 'dependencies' : [
302 '<(DEPTH)/testing/iossim/iossim.gyp:iossim#host',
303 ],
304 }],
305 ],
fischman@webrtc.org1bc19542013-08-01 18:29:45 +0000306 }, # target AppRTCDemo
tkchin@webrtc.org87776a82014-12-09 19:32:35 +0000307 {
308 # TODO(tkchin): move this into the real third party location and
309 # have it mirrored on chrome infra.
310 'target_name': 'socketrocket',
311 'type': 'static_library',
312 'sources': [
313 'examples/objc/AppRTCDemo/third_party/SocketRocket/SRWebSocket.h',
314 'examples/objc/AppRTCDemo/third_party/SocketRocket/SRWebSocket.m',
315 ],
316 'conditions': [
317 ['OS=="mac"', {
318 'xcode_settings': {
319 # SocketRocket autosynthesizes some properties. Disable the
320 # warning so we can compile successfully.
321 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'NO',
322 'MACOSX_DEPLOYMENT_TARGET' : '10.8',
Henrik Kjellandera8202aa2015-05-29 20:13:24 +0200323 # SRWebSocket.m uses code with partial availability.
324 # https://code.google.com/p/webrtc/issues/detail?id=4695
325 'WARNING_CFLAGS!': ['-Wpartial-availability'],
tkchin@webrtc.org87776a82014-12-09 19:32:35 +0000326 },
327 }],
328 ],
329 'direct_dependent_settings': {
330 'include_dirs': [
331 'examples/objc/AppRTCDemo/third_party/SocketRocket',
332 ],
333 },
334 'xcode_settings': {
335 'CLANG_ENABLE_OBJC_ARC': 'YES',
336 'WARNING_CFLAGS': [
337 '-Wno-deprecated-declarations',
338 ],
339 },
340 'link_settings': {
341 'xcode_settings': {
342 'OTHER_LDFLAGS': [
343 '-framework CFNetwork',
344 ],
345 },
346 'libraries': [
347 '$(SDKROOT)/usr/lib/libicucore.dylib',
348 ],
349 }
350 }, # target socketrocket
fischman@webrtc.org1bc19542013-08-01 18:29:45 +0000351 ], # targets
tkchin@webrtc.org56d11462014-05-30 23:04:39 +0000352 }], # OS=="ios" or (OS=="mac" and target_arch!="ia32" and mac_sdk>="10.8")
fischman@webrtc.org1bc19542013-08-01 18:29:45 +0000353
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000354 ['OS=="android"', {
355 'targets': [
356 {
357 'target_name': 'AppRTCDemo',
358 'type': 'none',
glaznev@webrtc.orgf1f558c2015-03-14 02:48:16 +0000359 'dependencies': [
360 'libjingle.gyp:libjingle_peerconnection_java',
361 ],
glaznev@webrtc.orgae1a0782015-03-11 17:52:11 +0000362 'variables': {
363 'apk_name': 'AppRTCDemo',
364 'java_in_dir': 'examples/android',
glaznev@webrtc.orgf1f558c2015-03-14 02:48:16 +0000365 'has_java_resources': 1,
glaznev@webrtc.orgae1a0782015-03-11 17:52:11 +0000366 'resource_dir': 'examples/android/res',
glaznev@webrtc.orgf1f558c2015-03-14 02:48:16 +0000367 'R_package': 'org.appspot.apprtc',
368 'R_package_relpath': 'org/appspot/apprtc',
glaznev@webrtc.orgae1a0782015-03-11 17:52:11 +0000369 'input_jars_paths': [
370 'examples/android/third_party/autobanh/autobanh.jar',
371 ],
372 'library_dexed_jars_paths': [
373 'examples/android/third_party/autobanh/autobanh.jar',
374 ],
375 'native_lib_target': 'libjingle_peerconnection_so',
glaznev@webrtc.orgf1f558c2015-03-14 02:48:16 +0000376 'add_to_dependents_classpaths':1,
glaznev@webrtc.orgae1a0782015-03-11 17:52:11 +0000377 },
glaznev@webrtc.orgae1a0782015-03-11 17:52:11 +0000378 'includes': [ '../build/java_apk.gypi' ],
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000379 }, # target AppRTCDemo
glaznev@webrtc.org8390c272015-01-02 19:51:12 +0000380
glaznev@webrtc.orgf1f558c2015-03-14 02:48:16 +0000381 {
382 # AppRTCDemo creates a .jar as a side effect. Any java targets
383 # that need that .jar in their classpath should depend on this target,
384 # AppRTCDemo_apk. Dependents of AppRTCDemo_apk receive its
385 # jar path in the variable 'apk_output_jar_path'.
386 # This target should only be used by targets which instrument
387 # AppRTCDemo_apk.
388 'target_name': 'AppRTCDemo_apk',
389 'type': 'none',
390 'dependencies': [
391 'AppRTCDemo',
392 ],
393 'includes': [ '../build/apk_fake_jar.gypi' ],
394 }, # target AppRTCDemo_apk
395
glaznev@webrtc.org8390c272015-01-02 19:51:12 +0000396 {
397 'target_name': 'AppRTCDemoTest',
398 'type': 'none',
399 'dependencies': [
glaznev@webrtc.orgf1f558c2015-03-14 02:48:16 +0000400 'AppRTCDemo_apk',
401 ],
glaznev@webrtc.orgae1a0782015-03-11 17:52:11 +0000402 'variables': {
403 'apk_name': 'AppRTCDemoTest',
404 'java_in_dir': 'examples/androidtests',
glaznev@webrtc.orgae1a0782015-03-11 17:52:11 +0000405 'is_test_apk': 1,
406 },
407 'includes': [ '../build/java_apk.gypi' ],
408 },
glaznev@webrtc.org8390c272015-01-02 19:51:12 +0000409 ], # targets
410 }], # OS=="android"
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000411 ],
412}