blob: 097270856b27381e5c9d21ef01c009510ac97efc [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': [
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',
tkchin@webrtc.org36401ab2015-01-27 21:34:39 +0000165 'examples/objc/AppRTCDemo/ARDJoinResponse.h',
166 'examples/objc/AppRTCDemo/ARDJoinResponse.m',
167 'examples/objc/AppRTCDemo/ARDJoinResponse+Internal.h',
tkchin@webrtc.org3a63a3c2015-01-06 07:21:34 +0000168 'examples/objc/AppRTCDemo/ARDMessageResponse.h',
169 'examples/objc/AppRTCDemo/ARDMessageResponse.m',
170 'examples/objc/AppRTCDemo/ARDMessageResponse+Internal.h',
tkchin@webrtc.org3a63a3c2015-01-06 07:21:34 +0000171 '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': [
tkchin@webrtc.org9650ab42015-02-26 20:58:08 +0000190 'examples/objc/AppRTCDemo',
tkchin@webrtc.org3a63a3c2015-01-06 07:21:34 +0000191 ],
192 'direct_dependent_settings': {
193 'include_dirs': [
tkchin@webrtc.org9650ab42015-02-26 20:58:08 +0000194 'examples/objc/AppRTCDemo',
tkchin@webrtc.org3a63a3c2015-01-06 07:21:34 +0000195 ],
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',
glaznev@webrtc.orgf1f558c2015-03-14 02:48:16 +0000320 'dependencies': [
321 'libjingle.gyp:libjingle_peerconnection_java',
322 ],
glaznev@webrtc.orgae1a0782015-03-11 17:52:11 +0000323 'variables': {
324 'apk_name': 'AppRTCDemo',
325 'java_in_dir': 'examples/android',
glaznev@webrtc.orgf1f558c2015-03-14 02:48:16 +0000326 'has_java_resources': 1,
glaznev@webrtc.orgae1a0782015-03-11 17:52:11 +0000327 'resource_dir': 'examples/android/res',
glaznev@webrtc.orgf1f558c2015-03-14 02:48:16 +0000328 'R_package': 'org.appspot.apprtc',
329 'R_package_relpath': 'org/appspot/apprtc',
glaznev@webrtc.orgae1a0782015-03-11 17:52:11 +0000330 'input_jars_paths': [
331 'examples/android/third_party/autobanh/autobanh.jar',
332 ],
333 'library_dexed_jars_paths': [
334 'examples/android/third_party/autobanh/autobanh.jar',
335 ],
336 'native_lib_target': 'libjingle_peerconnection_so',
glaznev@webrtc.orgf1f558c2015-03-14 02:48:16 +0000337 'add_to_dependents_classpaths':1,
glaznev@webrtc.orgae1a0782015-03-11 17:52:11 +0000338 },
glaznev@webrtc.orgae1a0782015-03-11 17:52:11 +0000339 'includes': [ '../build/java_apk.gypi' ],
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000340 }, # target AppRTCDemo
glaznev@webrtc.org8390c272015-01-02 19:51:12 +0000341
glaznev@webrtc.orgf1f558c2015-03-14 02:48:16 +0000342 {
343 # AppRTCDemo creates a .jar as a side effect. Any java targets
344 # that need that .jar in their classpath should depend on this target,
345 # AppRTCDemo_apk. Dependents of AppRTCDemo_apk receive its
346 # jar path in the variable 'apk_output_jar_path'.
347 # This target should only be used by targets which instrument
348 # AppRTCDemo_apk.
349 'target_name': 'AppRTCDemo_apk',
350 'type': 'none',
351 'dependencies': [
352 'AppRTCDemo',
353 ],
354 'includes': [ '../build/apk_fake_jar.gypi' ],
355 }, # target AppRTCDemo_apk
356
glaznev@webrtc.org8390c272015-01-02 19:51:12 +0000357 {
358 'target_name': 'AppRTCDemoTest',
359 'type': 'none',
360 'dependencies': [
glaznev@webrtc.orgf1f558c2015-03-14 02:48:16 +0000361 'AppRTCDemo_apk',
362 ],
glaznev@webrtc.orgae1a0782015-03-11 17:52:11 +0000363 'variables': {
364 'apk_name': 'AppRTCDemoTest',
365 'java_in_dir': 'examples/androidtests',
glaznev@webrtc.orgae1a0782015-03-11 17:52:11 +0000366 'is_test_apk': 1,
367 },
368 'includes': [ '../build/java_apk.gypi' ],
369 },
glaznev@webrtc.org8390c272015-01-02 19:51:12 +0000370 ], # targets
371 }], # OS=="android"
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000372 ],
373}