blob: b81e48d5d136769c064810bb1dbe5a6ba06eec65 [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',
56 'md5.cc',
57 'md5.h',
kwiberg@webrtc.org67186fe2015-03-09 22:21:53 +000058 'md5digest.cc',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000059 'md5digest.h',
xians@webrtc.orge46bc772014-10-10 08:36:56 +000060 'platform_file.cc',
61 'platform_file.h',
Tommibebc6902015-05-18 09:51:42 +020062 'platform_thread.cc',
63 'platform_thread.h',
andrew@webrtc.org0ab42bc2014-12-17 22:56:09 +000064 'safe_conversions.h',
65 'safe_conversions_impl.h',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000066 'stringencode.cc',
67 'stringencode.h',
68 'stringutils.cc',
69 'stringutils.h',
kwiberg@webrtc.orgaf9d56f2015-01-13 20:32:04 +000070 'template_util.h',
pbos@webrtc.org38344ed2014-09-24 06:05:00 +000071 'thread_annotations.h',
tommi@webrtc.org04cd4662015-01-26 15:27:29 +000072 'thread_checker.h',
73 'thread_checker_impl.cc',
74 'thread_checker_impl.h',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000075 'timeutils.cc',
76 'timeutils.h',
tommi@webrtc.org7c64ed22015-03-17 14:25:37 +000077 'trace_event.h',
Noah Richards915590e2015-04-22 15:43:08 -070078 ],
79 'conditions': [
80 ['build_with_chromium==1', {
81 'include_dirs': [
82 '../overrides',
83 ],
84 'sources!': [
85 'basictypes.h',
86 'constructormagic.h',
87 ],
88 }, {
89 'sources!': [
90 '../overrides/webrtc/base/basictypes.h',
91 '../overrides/webrtc/base/constructormagic.h',
92 ],
93 }],
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000094 ],
95 },
96 {
henrike@webrtc.orgb2efb672014-09-10 17:28:19 +000097 'target_name': 'rtc_base',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000098 'type': 'static_library',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000099 'dependencies': [
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000100 '<(webrtc_root)/common.gyp:webrtc_common',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +0000101 'rtc_base_approved',
102 ],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000103 'defines': [
104 'FEATURE_ENABLE_SSL',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000105 'LOGGING=1',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000106 ],
107 'sources': [
pkasting@chromium.orge7a4a122015-01-28 21:36:55 +0000108 'arraysize.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000109 'asyncfile.cc',
110 'asyncfile.h',
111 'asynchttprequest.cc',
112 'asynchttprequest.h',
113 'asyncinvoker.cc',
114 'asyncinvoker.h',
kjellander@webrtc.org2bae3212014-06-16 07:11:19 +0000115 'asyncinvoker-inl.h',
kwiberg@webrtc.org67186fe2015-03-09 22:21:53 +0000116 'asyncpacketsocket.cc',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000117 'asyncpacketsocket.h',
kwiberg@webrtc.org67186fe2015-03-09 22:21:53 +0000118 'asyncresolverinterface.cc',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000119 'asyncresolverinterface.h',
120 'asyncsocket.cc',
121 'asyncsocket.h',
122 'asynctcpsocket.cc',
123 'asynctcpsocket.h',
124 'asyncudpsocket.cc',
125 'asyncudpsocket.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000126 'autodetectproxy.cc',
127 'autodetectproxy.h',
128 'bandwidthsmoother.cc',
129 'bandwidthsmoother.h',
130 'base64.cc',
131 'base64.h',
132 'basicdefs.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000133 'bind.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000134 'callback.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000135 'common.cc',
136 'common.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000137 'cpumonitor.cc',
138 'cpumonitor.h',
139 'crc32.cc',
140 'crc32.h',
kwiberg@webrtc.org67186fe2015-03-09 22:21:53 +0000141 'cryptstring.cc',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000142 'cryptstring.h',
143 'dbus.cc',
144 'dbus.h',
145 'diskcache.cc',
146 'diskcache.h',
147 'diskcache_win32.cc',
148 'diskcache_win32.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000149 'fileutils.cc',
150 'fileutils.h',
151 'fileutils_mock.h',
152 'firewallsocketserver.cc',
153 'firewallsocketserver.h',
154 'flags.cc',
155 'flags.h',
pkasting@chromium.org4591fbd2014-11-20 22:28:14 +0000156 'format_macros.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000157 'gunit_prod.h',
158 'helpers.cc',
159 'helpers.h',
160 'httpbase.cc',
161 'httpbase.h',
162 'httpclient.cc',
163 'httpclient.h',
164 'httpcommon-inl.h',
165 'httpcommon.cc',
166 'httpcommon.h',
167 'httprequest.cc',
168 'httprequest.h',
169 'httpserver.cc',
170 'httpserver.h',
171 'ifaddrs-android.cc',
172 'ifaddrs-android.h',
173 'iosfilesystem.mm',
174 'ipaddress.cc',
175 'ipaddress.h',
176 'json.cc',
177 'json.h',
178 'latebindingsymboltable.cc',
179 'latebindingsymboltable.h',
180 'libdbusglibsymboltable.cc',
181 'libdbusglibsymboltable.h',
182 'linux.cc',
183 'linux.h',
184 'linuxfdwalk.c',
kjellander@webrtc.org2bae3212014-06-16 07:11:19 +0000185 'linuxfdwalk.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000186 'linked_ptr.h',
187 'logging.cc',
188 'logging.h',
189 'macasyncsocket.cc',
190 'macasyncsocket.h',
191 'maccocoasocketserver.h',
192 'maccocoasocketserver.mm',
193 'maccocoathreadhelper.h',
194 'maccocoathreadhelper.mm',
195 'macconversion.cc',
196 'macconversion.h',
197 'macsocketserver.cc',
198 'macsocketserver.h',
199 'macutils.cc',
200 'macutils.h',
201 'macwindowpicker.cc',
202 'macwindowpicker.h',
203 'mathutils.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000204 'messagedigest.cc',
205 'messagedigest.h',
206 'messagehandler.cc',
207 'messagehandler.h',
208 'messagequeue.cc',
209 'messagequeue.h',
210 'multipart.cc',
211 'multipart.h',
212 'natserver.cc',
213 'natserver.h',
214 'natsocketfactory.cc',
215 'natsocketfactory.h',
216 'nattypes.cc',
217 'nattypes.h',
218 'nethelpers.cc',
219 'nethelpers.h',
220 'network.cc',
221 'network.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000222 'nullsocketserver.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000223 'optionsfile.cc',
224 'optionsfile.h',
225 'pathutils.cc',
226 'pathutils.h',
227 'physicalsocketserver.cc',
228 'physicalsocketserver.h',
229 'posix.cc',
230 'posix.h',
231 'profiler.cc',
232 'profiler.h',
233 'proxydetect.cc',
234 'proxydetect.h',
235 'proxyinfo.cc',
236 'proxyinfo.h',
237 'proxyserver.cc',
238 'proxyserver.h',
239 'ratelimiter.cc',
240 'ratelimiter.h',
241 'ratetracker.cc',
242 'ratetracker.h',
243 'refcount.h',
244 'referencecountedsingletonfactory.h',
245 'rollingaccumulator.h',
246 'schanneladapter.cc',
247 'schanneladapter.h',
248 'scoped_autorelease_pool.h',
249 'scoped_autorelease_pool.mm',
250 'scoped_ptr.h',
251 'scoped_ref_ptr.h',
252 'scopedptrcollection.h',
253 'sec_buffer.h',
254 'sha1.cc',
255 'sha1.h',
kwiberg@webrtc.org67186fe2015-03-09 22:21:53 +0000256 'sha1digest.cc',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000257 'sha1digest.h',
tommi@webrtc.orgfe196992015-02-07 22:35:54 +0000258 'sharedexclusivelock.cc',
259 'sharedexclusivelock.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000260 'signalthread.cc',
261 'signalthread.h',
kwiberg@webrtc.org67186fe2015-03-09 22:21:53 +0000262 'sigslot.cc',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000263 'sigslot.h',
264 'sigslotrepeater.h',
265 'socket.h',
266 'socketadapters.cc',
267 'socketadapters.h',
268 'socketaddress.cc',
269 'socketaddress.h',
270 'socketaddresspair.cc',
271 'socketaddresspair.h',
272 'socketfactory.h',
273 'socketpool.cc',
274 'socketpool.h',
275 'socketserver.h',
276 'socketstream.cc',
277 'socketstream.h',
278 'ssladapter.cc',
279 'ssladapter.h',
280 'sslconfig.h',
281 'sslfingerprint.cc',
282 'sslfingerprint.h',
283 'sslidentity.cc',
284 'sslidentity.h',
285 'sslroots.h',
286 'sslsocketfactory.cc',
287 'sslsocketfactory.h',
288 'sslstreamadapter.cc',
289 'sslstreamadapter.h',
290 'sslstreamadapterhelper.cc',
291 'sslstreamadapterhelper.h',
292 'stream.cc',
293 'stream.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000294 'systeminfo.cc',
295 'systeminfo.h',
296 'task.cc',
297 'task.h',
298 'taskparent.cc',
299 'taskparent.h',
300 'taskrunner.cc',
301 'taskrunner.h',
302 'testclient.cc',
303 'testclient.h',
304 'thread.cc',
305 'thread.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000306 'timing.cc',
307 'timing.h',
308 'transformadapter.cc',
309 'transformadapter.h',
310 'unixfilesystem.cc',
311 'unixfilesystem.h',
312 'urlencode.cc',
313 'urlencode.h',
314 'versionparsing.cc',
315 'versionparsing.h',
316 'virtualsocketserver.cc',
317 'virtualsocketserver.h',
318 'win32.cc',
319 'win32.h',
320 'win32filesystem.cc',
321 'win32filesystem.h',
322 'win32regkey.cc',
323 'win32regkey.h',
324 'win32securityerrors.cc',
325 'win32socketinit.cc',
326 'win32socketinit.h',
327 'win32socketserver.cc',
328 'win32socketserver.h',
329 'win32window.cc',
330 'win32window.h',
331 'win32windowpicker.cc',
332 'win32windowpicker.h',
333 'window.h',
334 'windowpicker.h',
335 'windowpickerfactory.h',
336 'winfirewall.cc',
337 'winfirewall.h',
338 'winping.cc',
339 'winping.h',
340 'worker.cc',
341 'worker.h',
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +0000342 'x11windowpicker.cc',
343 'x11windowpicker.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000344 '../overrides/webrtc/base/logging.cc',
345 '../overrides/webrtc/base/logging.h',
346 '../overrides/webrtc/base/win32socketinit.cc',
347 ],
henrike@webrtc.orgb2efb672014-09-10 17:28:19 +0000348 # TODO(henrike): issue 3307, make rtc_base build without disabling
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000349 # these flags.
350 'cflags!': [
351 '-Wextra',
352 '-Wall',
353 ],
354 'cflags_cc!': [
355 '-Wnon-virtual-dtor',
356 ],
357 'direct_dependent_settings': {
358 'cflags_cc!': [
359 '-Wnon-virtual-dtor',
360 ],
361 'defines': [
362 'FEATURE_ENABLE_SSL',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000363 ],
364 },
365 'include_dirs': [
366 '../../third_party/jsoncpp/overrides/include',
367 '../../third_party/jsoncpp/source/include',
368 ],
369 'conditions': [
370 ['build_with_chromium==1', {
371 'include_dirs': [
372 '../overrides',
henrike@webrtc.org6ac22e62014-08-11 21:06:30 +0000373 '../../boringssl/src/include',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000374 ],
375 'sources!': [
376 'asyncinvoker.cc',
377 'asyncinvoker.h',
378 'asyncinvoker-inl.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000379 'atomicops.h',
380 'bandwidthsmoother.cc',
381 'bandwidthsmoother.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000382 'bind.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000383 'callback.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000384 'constructormagic.h',
385 'dbus.cc',
386 'dbus.h',
387 'diskcache_win32.cc',
388 'diskcache_win32.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000389 'fileutils_mock.h',
390 'genericslot.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000391 'httpserver.cc',
392 'httpserver.h',
393 'json.cc',
394 'json.h',
395 'latebindingsymboltable.cc',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000396 'latebindingsymboltable.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000397 'libdbusglibsymboltable.cc',
398 'libdbusglibsymboltable.h',
399 'linuxfdwalk.c',
400 'linuxfdwalk.h',
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +0000401 'x11windowpicker.cc',
402 'x11windowpicker.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000403 'logging.cc',
404 'logging.h',
405 'macasyncsocket.cc',
406 'macasyncsocket.h',
407 'maccocoasocketserver.h',
408 'maccocoasocketserver.mm',
409 'macsocketserver.cc',
410 'macsocketserver.h',
411 'macwindowpicker.cc',
412 'macwindowpicker.h',
413 'mathutils.h',
414 'multipart.cc',
415 'multipart.h',
416 'natserver.cc',
417 'natserver.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000418 'natsocketfactory.cc',
419 'natsocketfactory.h',
420 'nattypes.cc',
421 'nattypes.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000422 'optionsfile.cc',
423 'optionsfile.h',
424 'posix.cc',
425 'posix.h',
426 'profiler.cc',
427 'profiler.h',
428 'proxyserver.cc',
429 'proxyserver.h',
430 'refcount.h',
431 'referencecountedsingletonfactory.h',
432 'rollingaccumulator.h',
433 'safe_conversions.h',
434 'safe_conversions_impl.h',
435 'scopedptrcollection.h',
436 'scoped_ref_ptr.h',
437 'sec_buffer.h',
438 'sharedexclusivelock.cc',
439 'sharedexclusivelock.h',
440 'sslconfig.h',
441 'sslroots.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000442 'testbase64.h',
443 'testclient.cc',
444 'testclient.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000445 'transformadapter.cc',
446 'transformadapter.h',
447 'versionparsing.cc',
448 'versionparsing.h',
449 'virtualsocketserver.cc',
450 'virtualsocketserver.h',
451 'win32regkey.cc',
452 'win32regkey.h',
453 'win32socketinit.cc',
454 'win32socketinit.h',
455 'win32socketserver.cc',
456 'win32socketserver.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000457 'window.h',
458 'windowpickerfactory.h',
459 'windowpicker.h',
460 ],
461 'defines': [
462 'NO_MAIN_THREAD_WRAPPING',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000463 ],
464 'direct_dependent_settings': {
465 'defines': [
466 'NO_MAIN_THREAD_WRAPPING',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000467 ],
468 },
469 }, {
henrike@webrtc.org9f36c082014-06-16 21:35:20 +0000470 'conditions': [
henrike@webrtc.orga685c9d2014-06-17 14:48:44 +0000471 ['build_json==1', {
henrike@webrtc.org9f36c082014-06-16 21:35:20 +0000472 'dependencies': [
473 '<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
474 ],
475 }, {
476 'include_dirs': [
477 '<(json_root)',
478 ],
479 'defines': [
480 # When defined changes the include path for json.h to where it
481 # is expected to be when building json outside of the standalone
482 # build.
henrike@webrtc.orga685c9d2014-06-17 14:48:44 +0000483 'WEBRTC_EXTERNAL_JSON',
henrike@webrtc.org9f36c082014-06-16 21:35:20 +0000484 ],
485 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000486 ],
487 'sources!': [
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000488 '../overrides/webrtc/base/win32socketinit.cc',
489 '../overrides/webrtc/base/logging.cc',
490 '../overrides/webrtc/base/logging.h',
491 ],
492 }],
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000493 ['use_openssl==1', {
494 'defines': [
495 'SSL_USE_OPENSSL',
496 'HAVE_OPENSSL_SSL_H',
497 ],
498 'direct_dependent_settings': {
499 'defines': [
500 'SSL_USE_OPENSSL',
501 'HAVE_OPENSSL_SSL_H',
502 ],
503 },
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000504 'sources': [
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000505 'openssl.h',
506 'openssladapter.cc',
507 'openssladapter.h',
508 'openssldigest.cc',
509 'openssldigest.h',
510 'opensslidentity.cc',
511 'opensslidentity.h',
512 'opensslstreamadapter.cc',
513 'opensslstreamadapter.h',
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000514 ],
henrike@webrtc.org9f36c082014-06-16 21:35:20 +0000515 'conditions': [
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000516 ['build_ssl==1', {
517 'dependencies': [
518 '<(DEPTH)/third_party/boringssl/boringssl.gyp:boringssl',
519 ],
520 }, {
henrike@webrtc.org9f36c082014-06-16 21:35:20 +0000521 'include_dirs': [
522 '<(ssl_root)',
523 ],
524 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000525 ],
526 }, {
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000527 'sources': [
528 'nssidentity.cc',
529 'nssidentity.h',
530 'nssstreamadapter.cc',
531 'nssstreamadapter.h',
532 ],
tpsiaki@google.com67eabc02014-09-10 18:06:47 +0000533 'conditions': [
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000534 ['use_legacy_ssl_defaults!=1', {
tpsiaki@google.com67eabc02014-09-10 18:06:47 +0000535 'defines': [
536 'SSL_USE_NSS',
537 'HAVE_NSS_SSL_H',
538 'SSL_USE_NSS_RNG',
539 ],
540 'direct_dependent_settings': {
541 'defines': [
542 'SSL_USE_NSS',
543 'HAVE_NSS_SSL_H',
544 'SSL_USE_NSS_RNG',
545 ],
546 },
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000547 }],
henrike@webrtc.org33a0e2d2014-10-27 18:13:40 +0000548 ['build_ssl==1', {
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000549 'conditions': [
henrike@webrtc.org33a0e2d2014-10-27 18:13:40 +0000550 # On some platforms, the rest of NSS is bundled. On others,
551 # it's pulled from the system.
Henrik Kjellanderca047f72015-04-08 08:54:02 +0200552 ['OS == "mac" or OS == "ios"', {
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000553 'dependencies': [
554 '<(DEPTH)/net/third_party/nss/ssl.gyp:libssl',
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000555 '<(DEPTH)/third_party/nss/nss.gyp:nspr',
556 '<(DEPTH)/third_party/nss/nss.gyp:nss',
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000557 ],
henrike@webrtc.org33a0e2d2014-10-27 18:13:40 +0000558 }],
559 ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
560 'dependencies': [
561 '<(DEPTH)/build/linux/system.gyp:ssl',
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000562 ],
563 }],
564 ],
henrike@webrtc.org33a0e2d2014-10-27 18:13:40 +0000565 }, {
566 'include_dirs': [
567 '<(ssl_root)',
568 ],
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000569 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000570 ],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000571 }],
572 ['OS == "android"', {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000573 'link_settings': {
574 'libraries': [
575 '-llog',
576 '-lGLESv2',
577 ],
578 },
579 }, {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000580 'sources!': [
581 'ifaddrs-android.cc',
582 'ifaddrs-android.h',
583 ],
584 }],
585 ['OS=="ios"', {
Yuriy Shevchuk02ff9112015-05-21 13:50:59 +0200586 'sources/': [
587 ['include', 'macconversion.*'],
588 ],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000589 'all_dependent_settings': {
590 'xcode_settings': {
591 'OTHER_LDFLAGS': [
592 '-framework Foundation',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000593 '-framework Security',
594 '-framework SystemConfiguration',
595 '-framework UIKit',
596 ],
597 },
598 },
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000599 }],
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +0000600 ['use_x11 == 1', {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000601 'link_settings': {
602 'libraries': [
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000603 '-ldl',
604 '-lrt',
605 '-lXext',
606 '-lX11',
607 '-lXcomposite',
608 '-lXrender',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000609 ],
610 },
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +0000611 }, {
612 'sources!': [
613 'x11windowpicker.cc',
614 'x11windowpicker.h',
615 ],
616 }],
617 ['OS=="linux"', {
618 'link_settings': {
619 'libraries': [
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +0000620 '-ldl',
621 '-lrt',
622 ],
623 },
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000624 }, {
625 'sources!': [
626 'dbus.cc',
627 'dbus.h',
628 'libdbusglibsymboltable.cc',
629 'libdbusglibsymboltable.h',
630 'linuxfdwalk.c',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000631 ],
632 }],
633 ['OS=="mac"', {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000634 'all_dependent_settings': {
635 'link_settings': {
636 'xcode_settings': {
637 'OTHER_LDFLAGS': [
638 '-framework Cocoa',
639 '-framework Foundation',
640 '-framework IOKit',
641 '-framework Security',
642 '-framework SystemConfiguration',
643 ],
644 },
645 },
646 },
647 'conditions': [
648 ['target_arch=="ia32"', {
649 'all_dependent_settings': {
650 'link_settings': {
651 'xcode_settings': {
652 'OTHER_LDFLAGS': [
653 '-framework Carbon',
654 ],
655 },
656 },
657 },
658 }],
659 ],
660 }, {
661 'sources!': [
662 'macasyncsocket.cc',
663 'macasyncsocket.h',
664 'maccocoasocketserver.h',
665 'maccocoasocketserver.mm',
666 'macconversion.cc',
667 'macconversion.h',
668 'macsocketserver.cc',
669 'macsocketserver.h',
670 'macutils.cc',
671 'macutils.h',
672 'macwindowpicker.cc',
673 'macwindowpicker.h',
674 ],
675 }],
676 ['OS=="win"', {
677 'link_settings': {
678 'libraries': [
679 '-lcrypt32.lib',
680 '-liphlpapi.lib',
681 '-lsecur32.lib',
682 ],
683 },
684 # Suppress warnings about WIN32_LEAN_AND_MEAN.
685 'msvs_disabled_warnings': [4005, 4703],
686 'defines': [
687 '_CRT_NONSTDC_NO_DEPRECATE',
688 ],
689 }, {
690 'sources/': [
691 ['exclude', 'win32[a-z0-9]*\\.(h|cc)$'],
692 ],
693 'sources!': [
694 'schanneladapter.cc',
695 'schanneladapter.h',
696 'winping.cc',
697 'winping.h',
698 'winfirewall.cc',
699 'winfirewall.h',
700 ],
701 }],
702 ['os_posix==0', {
703 'sources!': [
704 'latebindingsymboltable.cc',
705 'latebindingsymboltable.h',
706 'posix.cc',
707 'posix.h',
708 'unixfilesystem.cc',
709 'unixfilesystem.h',
710 ],
711 }, {
712 'configurations': {
713 'Debug_Base': {
714 'defines': [
715 # Chromium's build/common.gypi defines this for all posix
716 # _except_ for ios & mac. We want it there as well, e.g.
717 # because ASSERT and friends trigger off of it.
718 '_DEBUG',
719 ],
720 },
721 }
722 }],
723 ['OS=="ios" or (OS=="mac" and target_arch!="ia32")', {
724 'defines': [
725 'CARBON_DEPRECATED=YES',
726 ],
727 }],
728 ['OS!="ios" and OS!="mac"', {
729 'sources!': [
730 'scoped_autorelease_pool.mm',
731 ],
732 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000733 ['OS!="linux" and OS!="android"', {
734 'sources!': [
735 'linux.cc',
736 'linux.h',
737 ],
738 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000739 ],
740 },
741 ],
742}