blob: 6e197a58e1640004af3686bd76eaf6c1853fc68c [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',
Noah Richards915590e2015-04-22 15:43:08 -070040 'bytebuffer.cc',
41 'bytebuffer.h',
42 'byteorder.h',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000043 'checks.cc',
44 'checks.h',
Noah Richards915590e2015-04-22 15:43:08 -070045 'constructormagic.h',
Tommi494f2092015-04-27 17:39:23 +020046 'criticalsection.cc',
47 'criticalsection.h',
tommi@webrtc.org4c0fd962015-02-09 10:23:27 +000048 'event.cc',
49 'event.h',
tommi@webrtc.org7c64ed22015-03-17 14:25:37 +000050 'event_tracer.cc',
51 'event_tracer.h',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000052 'exp_filter.cc',
53 'exp_filter.h',
54 'md5.cc',
55 'md5.h',
kwiberg@webrtc.org67186fe2015-03-09 22:21:53 +000056 'md5digest.cc',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000057 'md5digest.h',
xians@webrtc.orge46bc772014-10-10 08:36:56 +000058 'platform_file.cc',
59 'platform_file.h',
Tommibebc6902015-05-18 09:51:42 +020060 'platform_thread.cc',
61 'platform_thread.h',
andrew@webrtc.org0ab42bc2014-12-17 22:56:09 +000062 'safe_conversions.h',
63 'safe_conversions_impl.h',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000064 'stringencode.cc',
65 'stringencode.h',
66 'stringutils.cc',
67 'stringutils.h',
kwiberg@webrtc.orgaf9d56f2015-01-13 20:32:04 +000068 'template_util.h',
pbos@webrtc.org38344ed2014-09-24 06:05:00 +000069 'thread_annotations.h',
tommi@webrtc.org04cd4662015-01-26 15:27:29 +000070 'thread_checker.h',
71 'thread_checker_impl.cc',
72 'thread_checker_impl.h',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000073 'timeutils.cc',
74 'timeutils.h',
tommi@webrtc.org7c64ed22015-03-17 14:25:37 +000075 'trace_event.h',
Noah Richards915590e2015-04-22 15:43:08 -070076 ],
77 'conditions': [
78 ['build_with_chromium==1', {
79 'include_dirs': [
80 '../overrides',
81 ],
82 'sources!': [
83 'basictypes.h',
84 'constructormagic.h',
85 ],
86 }, {
87 'sources!': [
88 '../overrides/webrtc/base/basictypes.h',
89 '../overrides/webrtc/base/constructormagic.h',
90 ],
91 }],
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000092 ],
93 },
94 {
henrike@webrtc.orgb2efb672014-09-10 17:28:19 +000095 'target_name': 'rtc_base',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000096 'type': 'static_library',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000097 'dependencies': [
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000098 '<(webrtc_root)/common.gyp:webrtc_common',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000099 'rtc_base_approved',
100 ],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000101 'defines': [
102 'FEATURE_ENABLE_SSL',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000103 'LOGGING=1',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000104 ],
105 'sources': [
pkasting@chromium.orge7a4a122015-01-28 21:36:55 +0000106 'arraysize.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000107 'asyncfile.cc',
108 'asyncfile.h',
109 'asynchttprequest.cc',
110 'asynchttprequest.h',
111 'asyncinvoker.cc',
112 'asyncinvoker.h',
kjellander@webrtc.org2bae3212014-06-16 07:11:19 +0000113 'asyncinvoker-inl.h',
kwiberg@webrtc.org67186fe2015-03-09 22:21:53 +0000114 'asyncpacketsocket.cc',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000115 'asyncpacketsocket.h',
kwiberg@webrtc.org67186fe2015-03-09 22:21:53 +0000116 'asyncresolverinterface.cc',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000117 'asyncresolverinterface.h',
118 'asyncsocket.cc',
119 'asyncsocket.h',
120 'asynctcpsocket.cc',
121 'asynctcpsocket.h',
122 'asyncudpsocket.cc',
123 'asyncudpsocket.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000124 'autodetectproxy.cc',
125 'autodetectproxy.h',
126 'bandwidthsmoother.cc',
127 'bandwidthsmoother.h',
128 'base64.cc',
129 'base64.h',
130 'basicdefs.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000131 'bind.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000132 'callback.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000133 'common.cc',
134 'common.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000135 'cpumonitor.cc',
136 'cpumonitor.h',
137 'crc32.cc',
138 'crc32.h',
kwiberg@webrtc.org67186fe2015-03-09 22:21:53 +0000139 'cryptstring.cc',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000140 'cryptstring.h',
141 'dbus.cc',
142 'dbus.h',
143 'diskcache.cc',
144 'diskcache.h',
145 'diskcache_win32.cc',
146 'diskcache_win32.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000147 'filelock.cc',
148 'filelock.h',
149 '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 'filelock.cc',
390 'filelock.h',
391 'fileutils_mock.h',
392 'genericslot.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000393 'httpserver.cc',
394 'httpserver.h',
395 'json.cc',
396 'json.h',
397 'latebindingsymboltable.cc',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000398 'latebindingsymboltable.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000399 'libdbusglibsymboltable.cc',
400 'libdbusglibsymboltable.h',
401 'linuxfdwalk.c',
402 'linuxfdwalk.h',
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +0000403 'x11windowpicker.cc',
404 'x11windowpicker.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000405 'logging.cc',
406 'logging.h',
407 'macasyncsocket.cc',
408 'macasyncsocket.h',
409 'maccocoasocketserver.h',
410 'maccocoasocketserver.mm',
411 'macsocketserver.cc',
412 'macsocketserver.h',
413 'macwindowpicker.cc',
414 'macwindowpicker.h',
415 'mathutils.h',
416 'multipart.cc',
417 'multipart.h',
418 'natserver.cc',
419 'natserver.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000420 'natsocketfactory.cc',
421 'natsocketfactory.h',
422 'nattypes.cc',
423 'nattypes.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000424 'optionsfile.cc',
425 'optionsfile.h',
426 'posix.cc',
427 'posix.h',
428 'profiler.cc',
429 'profiler.h',
430 'proxyserver.cc',
431 'proxyserver.h',
432 'refcount.h',
433 'referencecountedsingletonfactory.h',
434 'rollingaccumulator.h',
435 'safe_conversions.h',
436 'safe_conversions_impl.h',
437 'scopedptrcollection.h',
438 'scoped_ref_ptr.h',
439 'sec_buffer.h',
440 'sharedexclusivelock.cc',
441 'sharedexclusivelock.h',
442 'sslconfig.h',
443 'sslroots.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000444 'testbase64.h',
445 'testclient.cc',
446 'testclient.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000447 'transformadapter.cc',
448 'transformadapter.h',
449 'versionparsing.cc',
450 'versionparsing.h',
451 'virtualsocketserver.cc',
452 'virtualsocketserver.h',
453 'win32regkey.cc',
454 'win32regkey.h',
455 'win32socketinit.cc',
456 'win32socketinit.h',
457 'win32socketserver.cc',
458 'win32socketserver.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000459 'window.h',
460 'windowpickerfactory.h',
461 'windowpicker.h',
462 ],
463 'defines': [
464 'NO_MAIN_THREAD_WRAPPING',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000465 ],
466 'direct_dependent_settings': {
467 'defines': [
468 'NO_MAIN_THREAD_WRAPPING',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000469 ],
470 },
471 }, {
henrike@webrtc.org9f36c082014-06-16 21:35:20 +0000472 'conditions': [
henrike@webrtc.orga685c9d2014-06-17 14:48:44 +0000473 ['build_json==1', {
henrike@webrtc.org9f36c082014-06-16 21:35:20 +0000474 'dependencies': [
475 '<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
476 ],
477 }, {
478 'include_dirs': [
479 '<(json_root)',
480 ],
481 'defines': [
482 # When defined changes the include path for json.h to where it
483 # is expected to be when building json outside of the standalone
484 # build.
henrike@webrtc.orga685c9d2014-06-17 14:48:44 +0000485 'WEBRTC_EXTERNAL_JSON',
henrike@webrtc.org9f36c082014-06-16 21:35:20 +0000486 ],
487 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000488 ],
489 'sources!': [
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000490 '../overrides/webrtc/base/win32socketinit.cc',
491 '../overrides/webrtc/base/logging.cc',
492 '../overrides/webrtc/base/logging.h',
493 ],
494 }],
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000495 ['use_openssl==1', {
496 'defines': [
497 'SSL_USE_OPENSSL',
498 'HAVE_OPENSSL_SSL_H',
499 ],
500 'direct_dependent_settings': {
501 'defines': [
502 'SSL_USE_OPENSSL',
503 'HAVE_OPENSSL_SSL_H',
504 ],
505 },
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000506 'sources': [
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000507 'openssl.h',
508 'openssladapter.cc',
509 'openssladapter.h',
510 'openssldigest.cc',
511 'openssldigest.h',
512 'opensslidentity.cc',
513 'opensslidentity.h',
514 'opensslstreamadapter.cc',
515 'opensslstreamadapter.h',
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000516 ],
henrike@webrtc.org9f36c082014-06-16 21:35:20 +0000517 'conditions': [
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000518 ['build_ssl==1', {
519 'dependencies': [
520 '<(DEPTH)/third_party/boringssl/boringssl.gyp:boringssl',
521 ],
522 }, {
henrike@webrtc.org9f36c082014-06-16 21:35:20 +0000523 'include_dirs': [
524 '<(ssl_root)',
525 ],
526 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000527 ],
528 }, {
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000529 'sources': [
530 'nssidentity.cc',
531 'nssidentity.h',
532 'nssstreamadapter.cc',
533 'nssstreamadapter.h',
534 ],
tpsiaki@google.com67eabc02014-09-10 18:06:47 +0000535 'conditions': [
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000536 ['use_legacy_ssl_defaults!=1', {
tpsiaki@google.com67eabc02014-09-10 18:06:47 +0000537 'defines': [
538 'SSL_USE_NSS',
539 'HAVE_NSS_SSL_H',
540 'SSL_USE_NSS_RNG',
541 ],
542 'direct_dependent_settings': {
543 'defines': [
544 'SSL_USE_NSS',
545 'HAVE_NSS_SSL_H',
546 'SSL_USE_NSS_RNG',
547 ],
548 },
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000549 }],
henrike@webrtc.org33a0e2d2014-10-27 18:13:40 +0000550 ['build_ssl==1', {
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000551 'conditions': [
henrike@webrtc.org33a0e2d2014-10-27 18:13:40 +0000552 # On some platforms, the rest of NSS is bundled. On others,
553 # it's pulled from the system.
Henrik Kjellanderca047f72015-04-08 08:54:02 +0200554 ['OS == "mac" or OS == "ios"', {
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000555 'dependencies': [
556 '<(DEPTH)/net/third_party/nss/ssl.gyp:libssl',
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000557 '<(DEPTH)/third_party/nss/nss.gyp:nspr',
558 '<(DEPTH)/third_party/nss/nss.gyp:nss',
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000559 ],
henrike@webrtc.org33a0e2d2014-10-27 18:13:40 +0000560 }],
561 ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
562 'dependencies': [
563 '<(DEPTH)/build/linux/system.gyp:ssl',
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000564 ],
565 }],
566 ],
henrike@webrtc.org33a0e2d2014-10-27 18:13:40 +0000567 }, {
568 'include_dirs': [
569 '<(ssl_root)',
570 ],
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000571 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000572 ],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000573 }],
574 ['OS == "android"', {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000575 'link_settings': {
576 'libraries': [
577 '-llog',
578 '-lGLESv2',
579 ],
580 },
581 }, {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000582 'sources!': [
583 'ifaddrs-android.cc',
584 'ifaddrs-android.h',
585 ],
586 }],
587 ['OS=="ios"', {
588 'all_dependent_settings': {
589 'xcode_settings': {
590 'OTHER_LDFLAGS': [
591 '-framework Foundation',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000592 '-framework Security',
593 '-framework SystemConfiguration',
594 '-framework UIKit',
595 ],
596 },
597 },
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000598 }],
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +0000599 ['use_x11 == 1', {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000600 'link_settings': {
601 'libraries': [
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000602 '-ldl',
603 '-lrt',
604 '-lXext',
605 '-lX11',
606 '-lXcomposite',
607 '-lXrender',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000608 ],
609 },
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +0000610 }, {
611 'sources!': [
612 'x11windowpicker.cc',
613 'x11windowpicker.h',
614 ],
615 }],
616 ['OS=="linux"', {
617 'link_settings': {
618 'libraries': [
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +0000619 '-ldl',
620 '-lrt',
621 ],
622 },
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000623 }, {
624 'sources!': [
625 'dbus.cc',
626 'dbus.h',
627 'libdbusglibsymboltable.cc',
628 'libdbusglibsymboltable.h',
629 'linuxfdwalk.c',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000630 ],
631 }],
632 ['OS=="mac"', {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000633 'all_dependent_settings': {
634 'link_settings': {
635 'xcode_settings': {
636 'OTHER_LDFLAGS': [
637 '-framework Cocoa',
638 '-framework Foundation',
639 '-framework IOKit',
640 '-framework Security',
641 '-framework SystemConfiguration',
642 ],
643 },
644 },
645 },
646 'conditions': [
647 ['target_arch=="ia32"', {
648 'all_dependent_settings': {
649 'link_settings': {
650 'xcode_settings': {
651 'OTHER_LDFLAGS': [
652 '-framework Carbon',
653 ],
654 },
655 },
656 },
657 }],
658 ],
659 }, {
660 'sources!': [
661 'macasyncsocket.cc',
662 'macasyncsocket.h',
663 'maccocoasocketserver.h',
664 'maccocoasocketserver.mm',
665 'macconversion.cc',
666 'macconversion.h',
667 'macsocketserver.cc',
668 'macsocketserver.h',
669 'macutils.cc',
670 'macutils.h',
671 'macwindowpicker.cc',
672 'macwindowpicker.h',
673 ],
674 }],
675 ['OS=="win"', {
676 'link_settings': {
677 'libraries': [
678 '-lcrypt32.lib',
679 '-liphlpapi.lib',
680 '-lsecur32.lib',
681 ],
682 },
683 # Suppress warnings about WIN32_LEAN_AND_MEAN.
684 'msvs_disabled_warnings': [4005, 4703],
685 'defines': [
686 '_CRT_NONSTDC_NO_DEPRECATE',
687 ],
688 }, {
689 'sources/': [
690 ['exclude', 'win32[a-z0-9]*\\.(h|cc)$'],
691 ],
692 'sources!': [
693 'schanneladapter.cc',
694 'schanneladapter.h',
695 'winping.cc',
696 'winping.h',
697 'winfirewall.cc',
698 'winfirewall.h',
699 ],
700 }],
701 ['os_posix==0', {
702 'sources!': [
703 'latebindingsymboltable.cc',
704 'latebindingsymboltable.h',
705 'posix.cc',
706 'posix.h',
707 'unixfilesystem.cc',
708 'unixfilesystem.h',
709 ],
710 }, {
711 'configurations': {
712 'Debug_Base': {
713 'defines': [
714 # Chromium's build/common.gypi defines this for all posix
715 # _except_ for ios & mac. We want it there as well, e.g.
716 # because ASSERT and friends trigger off of it.
717 '_DEBUG',
718 ],
719 },
720 }
721 }],
722 ['OS=="ios" or (OS=="mac" and target_arch!="ia32")', {
723 'defines': [
724 'CARBON_DEPRECATED=YES',
725 ],
726 }],
727 ['OS!="ios" and OS!="mac"', {
728 'sources!': [
729 'scoped_autorelease_pool.mm',
730 ],
731 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000732 ['OS!="linux" and OS!="android"', {
733 'sources!': [
734 'linux.cc',
735 'linux.h',
736 ],
737 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000738 ],
739 },
740 ],
741}