blob: b7132e0fc08a80a43d2836577cdf1f8d80d2a58b [file] [log] [blame]
henrike@webrtc.orgf0488722014-05-13 18:00:26 +00001# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
2#
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
9{
10 'includes': [ '../build/common.gypi', ],
11 'conditions': [
12 ['os_posix == 1 and OS != "mac" and OS != "ios"', {
13 'conditions': [
14 ['sysroot!=""', {
15 'variables': {
16 'pkg-config': '../../../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
17 },
18 }, {
19 'variables': {
20 'pkg-config': 'pkg-config'
21 },
22 }],
23 ],
24 }],
25 ],
26 'targets': [
27 {
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000028 # The subset of rtc_base approved for use outside of libjingle.
29 'target_name': 'rtc_base_approved',
30 'type': 'static_library',
31 'sources': [
Tommi494f2092015-04-27 17:39:23 +020032 '../overrides/webrtc/base/basictypes.h',
33 '../overrides/webrtc/base/constructormagic.h',
Peter Boströmff019b02015-04-30 14:16:07 +020034 'atomicops.h',
Noah Richards915590e2015-04-22 15:43:08 -070035 'basictypes.h',
36 'bitbuffer.cc',
37 'bitbuffer.h',
Karl Wiberg94784372015-04-20 14:03:07 +020038 'buffer.cc',
39 'buffer.h',
Joachim Bauch6f2ef742015-05-21 17:52:01 +020040 'bufferqueue.cc',
41 'bufferqueue.h',
Noah Richards915590e2015-04-22 15:43:08 -070042 'bytebuffer.cc',
43 'bytebuffer.h',
44 'byteorder.h',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000045 'checks.cc',
46 'checks.h',
Noah Richards915590e2015-04-22 15:43:08 -070047 'constructormagic.h',
Tommi494f2092015-04-27 17:39:23 +020048 'criticalsection.cc',
49 'criticalsection.h',
tommi@webrtc.org4c0fd962015-02-09 10:23:27 +000050 'event.cc',
51 'event.h',
tommi@webrtc.org7c64ed22015-03-17 14:25:37 +000052 'event_tracer.cc',
53 'event_tracer.h',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000054 'exp_filter.cc',
55 'exp_filter.h',
Tommi23edcff2015-05-25 10:45:43 +020056 'logging.cc',
57 'logging.h',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000058 'md5.cc',
59 'md5.h',
kwiberg@webrtc.org67186fe2015-03-09 22:21:53 +000060 'md5digest.cc',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000061 'md5digest.h',
xians@webrtc.orge46bc772014-10-10 08:36:56 +000062 'platform_file.cc',
63 'platform_file.h',
Tommibebc6902015-05-18 09:51:42 +020064 'platform_thread.cc',
65 'platform_thread.h',
Peter Boström2ee24392015-06-22 07:57:16 +020066 'ratetracker.cc',
67 'ratetracker.h',
andrew@webrtc.org0ab42bc2014-12-17 22:56:09 +000068 'safe_conversions.h',
69 'safe_conversions_impl.h',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000070 'stringencode.cc',
71 'stringencode.h',
72 'stringutils.cc',
73 'stringutils.h',
kwiberg@webrtc.orgaf9d56f2015-01-13 20:32:04 +000074 'template_util.h',
pbos@webrtc.org38344ed2014-09-24 06:05:00 +000075 'thread_annotations.h',
tommi@webrtc.org04cd4662015-01-26 15:27:29 +000076 'thread_checker.h',
77 'thread_checker_impl.cc',
78 'thread_checker_impl.h',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000079 'timeutils.cc',
80 'timeutils.h',
tommi@webrtc.org7c64ed22015-03-17 14:25:37 +000081 'trace_event.h',
Noah Richards915590e2015-04-22 15:43:08 -070082 ],
83 'conditions': [
84 ['build_with_chromium==1', {
85 'include_dirs': [
86 '../overrides',
87 ],
88 'sources!': [
89 'basictypes.h',
90 'constructormagic.h',
Tommi23edcff2015-05-25 10:45:43 +020091 'logging.cc',
92 'logging.h',
Noah Richards915590e2015-04-22 15:43:08 -070093 ],
94 }, {
95 'sources!': [
96 '../overrides/webrtc/base/basictypes.h',
97 '../overrides/webrtc/base/constructormagic.h',
98 ],
99 }],
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +0000100 ],
101 },
102 {
henrike@webrtc.orgb2efb672014-09-10 17:28:19 +0000103 'target_name': 'rtc_base',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000104 'type': 'static_library',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +0000105 'dependencies': [
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000106 '<(webrtc_root)/common.gyp:webrtc_common',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +0000107 'rtc_base_approved',
108 ],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000109 'defines': [
110 'FEATURE_ENABLE_SSL',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000111 'LOGGING=1',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000112 ],
113 'sources': [
pkasting@chromium.orge7a4a122015-01-28 21:36:55 +0000114 'arraysize.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000115 'asyncfile.cc',
116 'asyncfile.h',
117 'asynchttprequest.cc',
118 'asynchttprequest.h',
119 'asyncinvoker.cc',
120 'asyncinvoker.h',
kjellander@webrtc.org2bae3212014-06-16 07:11:19 +0000121 'asyncinvoker-inl.h',
kwiberg@webrtc.org67186fe2015-03-09 22:21:53 +0000122 'asyncpacketsocket.cc',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000123 'asyncpacketsocket.h',
kwiberg@webrtc.org67186fe2015-03-09 22:21:53 +0000124 'asyncresolverinterface.cc',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000125 'asyncresolverinterface.h',
126 'asyncsocket.cc',
127 'asyncsocket.h',
128 'asynctcpsocket.cc',
129 'asynctcpsocket.h',
130 'asyncudpsocket.cc',
131 'asyncudpsocket.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000132 'autodetectproxy.cc',
133 'autodetectproxy.h',
134 'bandwidthsmoother.cc',
135 'bandwidthsmoother.h',
136 'base64.cc',
137 'base64.h',
138 'basicdefs.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000139 'bind.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000140 'callback.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000141 'common.cc',
142 'common.h',
Guo-wei Shieha472e962015-08-18 17:08:46 -0700143 'cpumonitor.cc',
144 'cpumonitor.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000145 'crc32.cc',
146 'crc32.h',
kwiberg@webrtc.org67186fe2015-03-09 22:21:53 +0000147 'cryptstring.cc',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000148 'cryptstring.h',
149 'dbus.cc',
150 'dbus.h',
151 'diskcache.cc',
152 'diskcache.h',
153 'diskcache_win32.cc',
154 'diskcache_win32.h',
tkchin93411912015-07-22 12:12:17 -0700155 'filerotatingstream.cc',
156 'filerotatingstream.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000157 'fileutils.cc',
158 'fileutils.h',
159 'fileutils_mock.h',
160 'firewallsocketserver.cc',
161 'firewallsocketserver.h',
162 'flags.cc',
163 'flags.h',
pkasting@chromium.org4591fbd2014-11-20 22:28:14 +0000164 'format_macros.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000165 'gunit_prod.h',
166 'helpers.cc',
167 'helpers.h',
168 'httpbase.cc',
169 'httpbase.h',
170 'httpclient.cc',
171 'httpclient.h',
172 'httpcommon-inl.h',
173 'httpcommon.cc',
174 'httpcommon.h',
175 'httprequest.cc',
176 'httprequest.h',
177 'httpserver.cc',
178 'httpserver.h',
179 'ifaddrs-android.cc',
180 'ifaddrs-android.h',
181 'iosfilesystem.mm',
182 'ipaddress.cc',
183 'ipaddress.h',
184 'json.cc',
185 'json.h',
186 'latebindingsymboltable.cc',
187 'latebindingsymboltable.h',
188 'libdbusglibsymboltable.cc',
189 'libdbusglibsymboltable.h',
190 'linux.cc',
191 'linux.h',
192 'linuxfdwalk.c',
kjellander@webrtc.org2bae3212014-06-16 07:11:19 +0000193 'linuxfdwalk.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000194 'linked_ptr.h',
tkchin93411912015-07-22 12:12:17 -0700195 'logsinks.cc',
196 'logsinks.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000197 'macasyncsocket.cc',
198 'macasyncsocket.h',
199 'maccocoasocketserver.h',
200 'maccocoasocketserver.mm',
201 'maccocoathreadhelper.h',
202 'maccocoathreadhelper.mm',
203 'macconversion.cc',
204 'macconversion.h',
205 'macsocketserver.cc',
206 'macsocketserver.h',
207 'macutils.cc',
208 'macutils.h',
209 'macwindowpicker.cc',
210 'macwindowpicker.h',
211 'mathutils.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000212 'messagedigest.cc',
213 'messagedigest.h',
214 'messagehandler.cc',
215 'messagehandler.h',
216 'messagequeue.cc',
217 'messagequeue.h',
218 'multipart.cc',
219 'multipart.h',
220 'natserver.cc',
221 'natserver.h',
222 'natsocketfactory.cc',
223 'natsocketfactory.h',
224 'nattypes.cc',
225 'nattypes.h',
226 'nethelpers.cc',
227 'nethelpers.h',
228 'network.cc',
229 'network.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000230 'nullsocketserver.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000231 'optionsfile.cc',
232 'optionsfile.h',
233 'pathutils.cc',
234 'pathutils.h',
235 'physicalsocketserver.cc',
236 'physicalsocketserver.h',
237 'posix.cc',
238 'posix.h',
239 'profiler.cc',
240 'profiler.h',
241 'proxydetect.cc',
242 'proxydetect.h',
243 'proxyinfo.cc',
244 'proxyinfo.h',
245 'proxyserver.cc',
246 'proxyserver.h',
247 'ratelimiter.cc',
248 'ratelimiter.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000249 'refcount.h',
250 'referencecountedsingletonfactory.h',
251 'rollingaccumulator.h',
252 'schanneladapter.cc',
253 'schanneladapter.h',
254 'scoped_autorelease_pool.h',
255 'scoped_autorelease_pool.mm',
256 'scoped_ptr.h',
257 'scoped_ref_ptr.h',
258 'scopedptrcollection.h',
259 'sec_buffer.h',
260 'sha1.cc',
261 'sha1.h',
kwiberg@webrtc.org67186fe2015-03-09 22:21:53 +0000262 'sha1digest.cc',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000263 'sha1digest.h',
tommi@webrtc.orgfe196992015-02-07 22:35:54 +0000264 'sharedexclusivelock.cc',
265 'sharedexclusivelock.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000266 'signalthread.cc',
267 'signalthread.h',
kwiberg@webrtc.org67186fe2015-03-09 22:21:53 +0000268 'sigslot.cc',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000269 'sigslot.h',
270 'sigslotrepeater.h',
271 'socket.h',
272 'socketadapters.cc',
273 'socketadapters.h',
274 'socketaddress.cc',
275 'socketaddress.h',
276 'socketaddresspair.cc',
277 'socketaddresspair.h',
278 'socketfactory.h',
279 'socketpool.cc',
280 'socketpool.h',
281 'socketserver.h',
282 'socketstream.cc',
283 'socketstream.h',
284 'ssladapter.cc',
285 'ssladapter.h',
286 'sslconfig.h',
287 'sslfingerprint.cc',
288 'sslfingerprint.h',
289 'sslidentity.cc',
290 'sslidentity.h',
291 'sslroots.h',
292 'sslsocketfactory.cc',
293 'sslsocketfactory.h',
294 'sslstreamadapter.cc',
295 'sslstreamadapter.h',
296 'sslstreamadapterhelper.cc',
297 'sslstreamadapterhelper.h',
298 'stream.cc',
299 'stream.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000300 'systeminfo.cc',
301 'systeminfo.h',
302 'task.cc',
303 'task.h',
304 'taskparent.cc',
305 'taskparent.h',
306 'taskrunner.cc',
307 'taskrunner.h',
308 'testclient.cc',
309 'testclient.h',
310 'thread.cc',
311 'thread.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000312 'timing.cc',
313 'timing.h',
314 'transformadapter.cc',
315 'transformadapter.h',
316 'unixfilesystem.cc',
317 'unixfilesystem.h',
318 'urlencode.cc',
319 'urlencode.h',
320 'versionparsing.cc',
321 'versionparsing.h',
322 'virtualsocketserver.cc',
323 'virtualsocketserver.h',
324 'win32.cc',
325 'win32.h',
326 'win32filesystem.cc',
327 'win32filesystem.h',
328 'win32regkey.cc',
329 'win32regkey.h',
330 'win32securityerrors.cc',
331 'win32socketinit.cc',
332 'win32socketinit.h',
333 'win32socketserver.cc',
334 'win32socketserver.h',
335 'win32window.cc',
336 'win32window.h',
337 'win32windowpicker.cc',
338 'win32windowpicker.h',
339 'window.h',
340 'windowpicker.h',
341 'windowpickerfactory.h',
342 'winfirewall.cc',
343 'winfirewall.h',
344 'winping.cc',
345 'winping.h',
346 'worker.cc',
347 'worker.h',
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +0000348 'x11windowpicker.cc',
349 'x11windowpicker.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000350 '../overrides/webrtc/base/logging.cc',
351 '../overrides/webrtc/base/logging.h',
352 '../overrides/webrtc/base/win32socketinit.cc',
353 ],
henrike@webrtc.orgb2efb672014-09-10 17:28:19 +0000354 # TODO(henrike): issue 3307, make rtc_base build without disabling
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000355 # these flags.
356 'cflags!': [
357 '-Wextra',
358 '-Wall',
359 ],
360 'cflags_cc!': [
361 '-Wnon-virtual-dtor',
362 ],
363 'direct_dependent_settings': {
364 'cflags_cc!': [
365 '-Wnon-virtual-dtor',
366 ],
367 'defines': [
368 'FEATURE_ENABLE_SSL',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000369 ],
370 },
371 'include_dirs': [
372 '../../third_party/jsoncpp/overrides/include',
373 '../../third_party/jsoncpp/source/include',
374 ],
375 'conditions': [
376 ['build_with_chromium==1', {
377 'include_dirs': [
378 '../overrides',
henrike@webrtc.org6ac22e62014-08-11 21:06:30 +0000379 '../../boringssl/src/include',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000380 ],
381 'sources!': [
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000382 'atomicops.h',
383 'bandwidthsmoother.cc',
384 'bandwidthsmoother.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000385 'bind.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000386 'callback.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000387 'constructormagic.h',
388 'dbus.cc',
389 'dbus.h',
390 'diskcache_win32.cc',
391 'diskcache_win32.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000392 'fileutils_mock.h',
393 'genericslot.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000394 'httpserver.cc',
395 'httpserver.h',
396 'json.cc',
397 'json.h',
398 'latebindingsymboltable.cc',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000399 'latebindingsymboltable.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000400 'libdbusglibsymboltable.cc',
401 'libdbusglibsymboltable.h',
402 'linuxfdwalk.c',
403 'linuxfdwalk.h',
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +0000404 'x11windowpicker.cc',
405 'x11windowpicker.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000406 'logging.cc',
407 'logging.h',
tkchin93411912015-07-22 12:12:17 -0700408 'logsinks.cc',
409 'logsinks.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000410 'macasyncsocket.cc',
411 'macasyncsocket.h',
412 'maccocoasocketserver.h',
413 'maccocoasocketserver.mm',
414 'macsocketserver.cc',
415 'macsocketserver.h',
416 'macwindowpicker.cc',
417 'macwindowpicker.h',
418 'mathutils.h',
419 'multipart.cc',
420 'multipart.h',
421 'natserver.cc',
422 'natserver.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000423 'natsocketfactory.cc',
424 'natsocketfactory.h',
425 'nattypes.cc',
426 'nattypes.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000427 'optionsfile.cc',
428 'optionsfile.h',
429 'posix.cc',
430 'posix.h',
431 'profiler.cc',
432 'profiler.h',
433 'proxyserver.cc',
434 'proxyserver.h',
435 'refcount.h',
436 'referencecountedsingletonfactory.h',
437 'rollingaccumulator.h',
438 'safe_conversions.h',
439 'safe_conversions_impl.h',
440 'scopedptrcollection.h',
441 'scoped_ref_ptr.h',
442 'sec_buffer.h',
443 'sharedexclusivelock.cc',
444 'sharedexclusivelock.h',
445 'sslconfig.h',
446 'sslroots.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000447 'testbase64.h',
448 'testclient.cc',
449 'testclient.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000450 'transformadapter.cc',
451 'transformadapter.h',
452 'versionparsing.cc',
453 'versionparsing.h',
454 'virtualsocketserver.cc',
455 'virtualsocketserver.h',
456 'win32regkey.cc',
457 'win32regkey.h',
458 'win32socketinit.cc',
459 'win32socketinit.h',
460 'win32socketserver.cc',
461 'win32socketserver.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000462 'window.h',
463 'windowpickerfactory.h',
464 'windowpicker.h',
465 ],
466 'defines': [
467 'NO_MAIN_THREAD_WRAPPING',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000468 ],
469 'direct_dependent_settings': {
470 'defines': [
471 'NO_MAIN_THREAD_WRAPPING',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000472 ],
473 },
474 }, {
henrike@webrtc.org9f36c082014-06-16 21:35:20 +0000475 'conditions': [
henrike@webrtc.orga685c9d2014-06-17 14:48:44 +0000476 ['build_json==1', {
henrike@webrtc.org9f36c082014-06-16 21:35:20 +0000477 'dependencies': [
478 '<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
479 ],
480 }, {
481 'include_dirs': [
482 '<(json_root)',
483 ],
484 'defines': [
485 # When defined changes the include path for json.h to where it
486 # is expected to be when building json outside of the standalone
487 # build.
henrike@webrtc.orga685c9d2014-06-17 14:48:44 +0000488 'WEBRTC_EXTERNAL_JSON',
henrike@webrtc.org9f36c082014-06-16 21:35:20 +0000489 ],
490 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000491 ],
492 'sources!': [
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000493 '../overrides/webrtc/base/win32socketinit.cc',
494 '../overrides/webrtc/base/logging.cc',
495 '../overrides/webrtc/base/logging.h',
496 ],
497 }],
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000498 ['use_openssl==1', {
499 'defines': [
500 'SSL_USE_OPENSSL',
501 'HAVE_OPENSSL_SSL_H',
502 ],
503 'direct_dependent_settings': {
504 'defines': [
505 'SSL_USE_OPENSSL',
506 'HAVE_OPENSSL_SSL_H',
507 ],
508 },
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000509 'sources': [
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000510 'openssl.h',
511 'openssladapter.cc',
512 'openssladapter.h',
513 'openssldigest.cc',
514 'openssldigest.h',
515 'opensslidentity.cc',
516 'opensslidentity.h',
517 'opensslstreamadapter.cc',
518 'opensslstreamadapter.h',
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000519 ],
henrike@webrtc.org9f36c082014-06-16 21:35:20 +0000520 'conditions': [
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000521 ['build_ssl==1', {
522 'dependencies': [
523 '<(DEPTH)/third_party/boringssl/boringssl.gyp:boringssl',
524 ],
525 }, {
henrike@webrtc.org9f36c082014-06-16 21:35:20 +0000526 'include_dirs': [
527 '<(ssl_root)',
528 ],
529 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000530 ],
531 }, {
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000532 'sources': [
533 'nssidentity.cc',
534 'nssidentity.h',
535 'nssstreamadapter.cc',
536 'nssstreamadapter.h',
537 ],
tpsiaki@google.com67eabc02014-09-10 18:06:47 +0000538 'conditions': [
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000539 ['use_legacy_ssl_defaults!=1', {
tpsiaki@google.com67eabc02014-09-10 18:06:47 +0000540 'defines': [
541 'SSL_USE_NSS',
542 'HAVE_NSS_SSL_H',
543 'SSL_USE_NSS_RNG',
544 ],
545 'direct_dependent_settings': {
546 'defines': [
547 'SSL_USE_NSS',
548 'HAVE_NSS_SSL_H',
549 'SSL_USE_NSS_RNG',
550 ],
551 },
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000552 }],
henrike@webrtc.org33a0e2d2014-10-27 18:13:40 +0000553 ['build_ssl==1', {
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000554 'conditions': [
henrike@webrtc.org33a0e2d2014-10-27 18:13:40 +0000555 # On some platforms, the rest of NSS is bundled. On others,
556 # it's pulled from the system.
Henrik Kjellanderca047f72015-04-08 08:54:02 +0200557 ['OS == "mac" or OS == "ios"', {
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000558 'dependencies': [
559 '<(DEPTH)/net/third_party/nss/ssl.gyp:libssl',
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000560 '<(DEPTH)/third_party/nss/nss.gyp:nspr',
561 '<(DEPTH)/third_party/nss/nss.gyp:nss',
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000562 ],
henrike@webrtc.org33a0e2d2014-10-27 18:13:40 +0000563 }],
564 ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
565 'dependencies': [
566 '<(DEPTH)/build/linux/system.gyp:ssl',
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000567 ],
568 }],
569 ],
henrike@webrtc.org33a0e2d2014-10-27 18:13:40 +0000570 }, {
571 'include_dirs': [
572 '<(ssl_root)',
573 ],
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000574 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000575 ],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000576 }],
577 ['OS == "android"', {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000578 'link_settings': {
579 'libraries': [
580 '-llog',
581 '-lGLESv2',
582 ],
583 },
584 }, {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000585 'sources!': [
586 'ifaddrs-android.cc',
587 'ifaddrs-android.h',
588 ],
589 }],
590 ['OS=="ios"', {
Yuriy Shevchuk02ff9112015-05-21 13:50:59 +0200591 'sources/': [
592 ['include', 'macconversion.*'],
593 ],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000594 'all_dependent_settings': {
595 'xcode_settings': {
596 'OTHER_LDFLAGS': [
Zeke Chin2d3b7e22015-07-14 12:55:44 -0700597 '-framework CFNetwork',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000598 '-framework Foundation',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000599 '-framework Security',
600 '-framework SystemConfiguration',
601 '-framework UIKit',
602 ],
603 },
604 },
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000605 }],
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +0000606 ['use_x11 == 1', {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000607 'link_settings': {
608 'libraries': [
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000609 '-ldl',
610 '-lrt',
611 '-lXext',
612 '-lX11',
613 '-lXcomposite',
614 '-lXrender',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000615 ],
616 },
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +0000617 }, {
618 'sources!': [
619 'x11windowpicker.cc',
620 'x11windowpicker.h',
621 ],
622 }],
623 ['OS=="linux"', {
624 'link_settings': {
625 'libraries': [
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +0000626 '-ldl',
627 '-lrt',
628 ],
629 },
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000630 }, {
631 'sources!': [
632 'dbus.cc',
633 'dbus.h',
634 'libdbusglibsymboltable.cc',
635 'libdbusglibsymboltable.h',
636 'linuxfdwalk.c',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000637 ],
638 }],
639 ['OS=="mac"', {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000640 'all_dependent_settings': {
641 'link_settings': {
642 'xcode_settings': {
643 'OTHER_LDFLAGS': [
644 '-framework Cocoa',
645 '-framework Foundation',
646 '-framework IOKit',
647 '-framework Security',
648 '-framework SystemConfiguration',
649 ],
650 },
651 },
652 },
653 'conditions': [
654 ['target_arch=="ia32"', {
655 'all_dependent_settings': {
656 'link_settings': {
657 'xcode_settings': {
658 'OTHER_LDFLAGS': [
659 '-framework Carbon',
660 ],
661 },
662 },
663 },
664 }],
665 ],
666 }, {
667 'sources!': [
668 'macasyncsocket.cc',
669 'macasyncsocket.h',
670 'maccocoasocketserver.h',
671 'maccocoasocketserver.mm',
672 'macconversion.cc',
673 'macconversion.h',
674 'macsocketserver.cc',
675 'macsocketserver.h',
676 'macutils.cc',
677 'macutils.h',
678 'macwindowpicker.cc',
679 'macwindowpicker.h',
680 ],
681 }],
682 ['OS=="win"', {
683 'link_settings': {
684 'libraries': [
685 '-lcrypt32.lib',
686 '-liphlpapi.lib',
687 '-lsecur32.lib',
688 ],
689 },
690 # Suppress warnings about WIN32_LEAN_AND_MEAN.
691 'msvs_disabled_warnings': [4005, 4703],
692 'defines': [
693 '_CRT_NONSTDC_NO_DEPRECATE',
694 ],
695 }, {
696 'sources/': [
697 ['exclude', 'win32[a-z0-9]*\\.(h|cc)$'],
698 ],
699 'sources!': [
700 'schanneladapter.cc',
701 'schanneladapter.h',
702 'winping.cc',
703 'winping.h',
704 'winfirewall.cc',
705 'winfirewall.h',
706 ],
707 }],
708 ['os_posix==0', {
709 'sources!': [
710 'latebindingsymboltable.cc',
711 'latebindingsymboltable.h',
712 'posix.cc',
713 'posix.h',
714 'unixfilesystem.cc',
715 'unixfilesystem.h',
716 ],
717 }, {
718 'configurations': {
719 'Debug_Base': {
720 'defines': [
721 # Chromium's build/common.gypi defines this for all posix
722 # _except_ for ios & mac. We want it there as well, e.g.
723 # because ASSERT and friends trigger off of it.
724 '_DEBUG',
725 ],
726 },
727 }
728 }],
729 ['OS=="ios" or (OS=="mac" and target_arch!="ia32")', {
730 'defines': [
731 'CARBON_DEPRECATED=YES',
732 ],
733 }],
734 ['OS!="ios" and OS!="mac"', {
735 'sources!': [
736 'scoped_autorelease_pool.mm',
737 ],
738 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000739 ['OS!="linux" and OS!="android"', {
740 'sources!': [
741 'linux.cc',
742 'linux.h',
743 ],
744 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000745 ],
746 },
747 ],
748}