blob: 569db74027e900eb2ae5b223232218dee976c11e [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 {
kjellander@webrtc.org665d8612014-09-11 09:22:13 +000028 # Temporary target until Chromium's
29 # src/third_party/libjingle/libjingle.gyp is updated to use rtc_base.
30 # TODO(kjellander): Remove when r7140 is rolled into Chromium's DEPS.
31 'target_name': 'webrtc_base',
32 'type': 'none',
33 'dependencies': [
34 'rtc_base',
35 ],
36 },
37 {
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000038 # The subset of rtc_base approved for use outside of libjingle.
39 'target_name': 'rtc_base_approved',
40 'type': 'static_library',
41 'sources': [
42 'checks.cc',
43 'checks.h',
44 'exp_filter.cc',
45 'exp_filter.h',
46 'md5.cc',
47 'md5.h',
48 'md5digest.h',
xians@webrtc.orge46bc772014-10-10 08:36:56 +000049 'platform_file.cc',
50 'platform_file.h',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000051 'stringencode.cc',
52 'stringencode.h',
53 'stringutils.cc',
54 'stringutils.h',
pbos@webrtc.org38344ed2014-09-24 06:05:00 +000055 'thread_annotations.h',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000056 'timeutils.cc',
57 'timeutils.h',
58 ],
59 },
60 {
henrike@webrtc.orgb2efb672014-09-10 17:28:19 +000061 'target_name': 'rtc_base',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000062 'type': 'static_library',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000063 'dependencies': [
64 'rtc_base_approved',
65 ],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000066 'defines': [
67 'FEATURE_ENABLE_SSL',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000068 'LOGGING=1',
69 'USE_WEBRTC_DEV_BRANCH',
70 ],
71 'sources': [
72 'asyncfile.cc',
73 'asyncfile.h',
74 'asynchttprequest.cc',
75 'asynchttprequest.h',
76 'asyncinvoker.cc',
77 'asyncinvoker.h',
kjellander@webrtc.org2bae3212014-06-16 07:11:19 +000078 'asyncinvoker-inl.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000079 'asyncpacketsocket.h',
80 'asyncresolverinterface.h',
81 'asyncsocket.cc',
82 'asyncsocket.h',
83 'asynctcpsocket.cc',
84 'asynctcpsocket.h',
85 'asyncudpsocket.cc',
86 'asyncudpsocket.h',
87 'atomicops.h',
88 'autodetectproxy.cc',
89 'autodetectproxy.h',
90 'bandwidthsmoother.cc',
91 'bandwidthsmoother.h',
92 'base64.cc',
93 'base64.h',
94 'basicdefs.h',
95 'basictypes.h',
96 'bind.h',
kjellander@webrtc.org2bae3212014-06-16 07:11:19 +000097 'bind.h.pump',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000098 'buffer.h',
99 'bytebuffer.cc',
100 'bytebuffer.h',
101 'byteorder.h',
102 'callback.h',
kjellander@webrtc.org2bae3212014-06-16 07:11:19 +0000103 'callback.h.pump',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +0000104 'constructormagic.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000105 'common.cc',
106 'common.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000107 'cpumonitor.cc',
108 'cpumonitor.h',
109 'crc32.cc',
110 'crc32.h',
111 'criticalsection.h',
112 'cryptstring.h',
113 'dbus.cc',
114 'dbus.h',
115 'diskcache.cc',
116 'diskcache.h',
117 'diskcache_win32.cc',
118 'diskcache_win32.h',
119 'event.cc',
120 'event.h',
121 'filelock.cc',
122 'filelock.h',
123 'fileutils.cc',
124 'fileutils.h',
125 'fileutils_mock.h',
126 'firewallsocketserver.cc',
127 'firewallsocketserver.h',
128 'flags.cc',
129 'flags.h',
130 'gunit_prod.h',
131 'helpers.cc',
132 'helpers.h',
133 'httpbase.cc',
134 'httpbase.h',
135 'httpclient.cc',
136 'httpclient.h',
137 'httpcommon-inl.h',
138 'httpcommon.cc',
139 'httpcommon.h',
140 'httprequest.cc',
141 'httprequest.h',
142 'httpserver.cc',
143 'httpserver.h',
144 'ifaddrs-android.cc',
145 'ifaddrs-android.h',
146 'iosfilesystem.mm',
147 'ipaddress.cc',
148 'ipaddress.h',
149 'json.cc',
150 'json.h',
151 'latebindingsymboltable.cc',
kjellander@webrtc.org2bae3212014-06-16 07:11:19 +0000152 'latebindingsymboltable.cc.def',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000153 'latebindingsymboltable.h',
kjellander@webrtc.org2bae3212014-06-16 07:11:19 +0000154 'latebindingsymboltable.h.def',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000155 'libdbusglibsymboltable.cc',
156 'libdbusglibsymboltable.h',
157 'linux.cc',
158 'linux.h',
159 'linuxfdwalk.c',
kjellander@webrtc.org2bae3212014-06-16 07:11:19 +0000160 'linuxfdwalk.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000161 'linked_ptr.h',
162 'logging.cc',
163 'logging.h',
164 'macasyncsocket.cc',
165 'macasyncsocket.h',
166 'maccocoasocketserver.h',
167 'maccocoasocketserver.mm',
168 'maccocoathreadhelper.h',
169 'maccocoathreadhelper.mm',
170 'macconversion.cc',
171 'macconversion.h',
172 'macsocketserver.cc',
173 'macsocketserver.h',
174 'macutils.cc',
175 'macutils.h',
176 'macwindowpicker.cc',
177 'macwindowpicker.h',
178 'mathutils.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000179 'messagedigest.cc',
180 'messagedigest.h',
181 'messagehandler.cc',
182 'messagehandler.h',
183 'messagequeue.cc',
184 'messagequeue.h',
185 'multipart.cc',
186 'multipart.h',
187 'natserver.cc',
188 'natserver.h',
189 'natsocketfactory.cc',
190 'natsocketfactory.h',
191 'nattypes.cc',
192 'nattypes.h',
193 'nethelpers.cc',
194 'nethelpers.h',
195 'network.cc',
196 'network.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000197 'nullsocketserver.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000198 'optionsfile.cc',
199 'optionsfile.h',
200 'pathutils.cc',
201 'pathutils.h',
202 'physicalsocketserver.cc',
203 'physicalsocketserver.h',
204 'posix.cc',
205 'posix.h',
206 'profiler.cc',
207 'profiler.h',
208 'proxydetect.cc',
209 'proxydetect.h',
210 'proxyinfo.cc',
211 'proxyinfo.h',
212 'proxyserver.cc',
213 'proxyserver.h',
214 'ratelimiter.cc',
215 'ratelimiter.h',
216 'ratetracker.cc',
217 'ratetracker.h',
218 'refcount.h',
219 'referencecountedsingletonfactory.h',
220 'rollingaccumulator.h',
kjellander@webrtc.org2bae3212014-06-16 07:11:19 +0000221 'safe_conversions.h',
222 'safe_conversions_impl.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000223 'schanneladapter.cc',
224 'schanneladapter.h',
225 'scoped_autorelease_pool.h',
226 'scoped_autorelease_pool.mm',
227 'scoped_ptr.h',
228 'scoped_ref_ptr.h',
229 'scopedptrcollection.h',
230 'sec_buffer.h',
231 'sha1.cc',
232 'sha1.h',
233 'sha1digest.h',
234 'sharedexclusivelock.cc',
235 'sharedexclusivelock.h',
236 'signalthread.cc',
237 'signalthread.h',
238 'sigslot.h',
239 'sigslotrepeater.h',
240 'socket.h',
241 'socketadapters.cc',
242 'socketadapters.h',
243 'socketaddress.cc',
244 'socketaddress.h',
245 'socketaddresspair.cc',
246 'socketaddresspair.h',
247 'socketfactory.h',
248 'socketpool.cc',
249 'socketpool.h',
250 'socketserver.h',
251 'socketstream.cc',
252 'socketstream.h',
253 'ssladapter.cc',
254 'ssladapter.h',
255 'sslconfig.h',
256 'sslfingerprint.cc',
257 'sslfingerprint.h',
258 'sslidentity.cc',
259 'sslidentity.h',
260 'sslroots.h',
261 'sslsocketfactory.cc',
262 'sslsocketfactory.h',
263 'sslstreamadapter.cc',
264 'sslstreamadapter.h',
265 'sslstreamadapterhelper.cc',
266 'sslstreamadapterhelper.h',
267 'stream.cc',
268 'stream.h',
269 'stringdigest.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000270 'systeminfo.cc',
271 'systeminfo.h',
272 'task.cc',
273 'task.h',
274 'taskparent.cc',
275 'taskparent.h',
276 'taskrunner.cc',
277 'taskrunner.h',
278 'testclient.cc',
279 'testclient.h',
280 'thread.cc',
281 'thread.h',
henrik.lundin@webrtc.org1e3c5c22014-06-16 11:34:44 +0000282 'thread_checker.h',
283 'thread_checker_impl.cc',
284 'thread_checker_impl.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000285 'timing.cc',
286 'timing.h',
287 'transformadapter.cc',
288 'transformadapter.h',
289 'unixfilesystem.cc',
290 'unixfilesystem.h',
291 'urlencode.cc',
292 'urlencode.h',
293 'versionparsing.cc',
294 'versionparsing.h',
295 'virtualsocketserver.cc',
296 'virtualsocketserver.h',
297 'win32.cc',
298 'win32.h',
299 'win32filesystem.cc',
300 'win32filesystem.h',
301 'win32regkey.cc',
302 'win32regkey.h',
303 'win32securityerrors.cc',
304 'win32socketinit.cc',
305 'win32socketinit.h',
306 'win32socketserver.cc',
307 'win32socketserver.h',
308 'win32window.cc',
309 'win32window.h',
310 'win32windowpicker.cc',
311 'win32windowpicker.h',
312 'window.h',
313 'windowpicker.h',
314 'windowpickerfactory.h',
315 'winfirewall.cc',
316 'winfirewall.h',
317 'winping.cc',
318 'winping.h',
319 'worker.cc',
320 'worker.h',
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +0000321 'x11windowpicker.cc',
322 'x11windowpicker.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000323 '../overrides/webrtc/base/basictypes.h',
324 '../overrides/webrtc/base/constructormagic.h',
325 '../overrides/webrtc/base/logging.cc',
326 '../overrides/webrtc/base/logging.h',
327 '../overrides/webrtc/base/win32socketinit.cc',
328 ],
henrike@webrtc.orgb2efb672014-09-10 17:28:19 +0000329 # TODO(henrike): issue 3307, make rtc_base build without disabling
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000330 # these flags.
331 'cflags!': [
332 '-Wextra',
333 '-Wall',
334 ],
335 'cflags_cc!': [
336 '-Wnon-virtual-dtor',
337 ],
338 'direct_dependent_settings': {
339 'cflags_cc!': [
340 '-Wnon-virtual-dtor',
341 ],
342 'defines': [
343 'FEATURE_ENABLE_SSL',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000344 ],
345 },
346 'include_dirs': [
347 '../../third_party/jsoncpp/overrides/include',
348 '../../third_party/jsoncpp/source/include',
349 ],
350 'conditions': [
351 ['build_with_chromium==1', {
352 'include_dirs': [
353 '../overrides',
henrike@webrtc.org6ac22e62014-08-11 21:06:30 +0000354 '../../boringssl/src/include',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000355 ],
356 'sources!': [
357 'asyncinvoker.cc',
358 'asyncinvoker.h',
359 'asyncinvoker-inl.h',
360 'asyncresolverinterface.h',
361 'atomicops.h',
362 'bandwidthsmoother.cc',
363 'bandwidthsmoother.h',
364 'basictypes.h',
365 'bind.h',
366 'bind.h.pump',
367 'buffer.h',
368 'callback.h',
369 'callback.h.pump',
370 'constructormagic.h',
371 'dbus.cc',
372 'dbus.h',
373 'diskcache_win32.cc',
374 'diskcache_win32.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000375 'filelock.cc',
376 'filelock.h',
377 'fileutils_mock.h',
378 'genericslot.h',
379 'genericslot.h.pump',
380 'httpserver.cc',
381 'httpserver.h',
382 'json.cc',
383 'json.h',
384 'latebindingsymboltable.cc',
385 'latebindingsymboltable.cc.def',
386 'latebindingsymboltable.h',
387 'latebindingsymboltable.h.def',
388 'libdbusglibsymboltable.cc',
389 'libdbusglibsymboltable.h',
390 'linuxfdwalk.c',
391 'linuxfdwalk.h',
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +0000392 'x11windowpicker.cc',
393 'x11windowpicker.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000394 'logging.cc',
395 'logging.h',
396 'macasyncsocket.cc',
397 'macasyncsocket.h',
398 'maccocoasocketserver.h',
399 'maccocoasocketserver.mm',
400 'macsocketserver.cc',
401 'macsocketserver.h',
402 'macwindowpicker.cc',
403 'macwindowpicker.h',
404 'mathutils.h',
405 'multipart.cc',
406 'multipart.h',
407 'natserver.cc',
408 'natserver.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000409 'natsocketfactory.cc',
410 'natsocketfactory.h',
411 'nattypes.cc',
412 'nattypes.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000413 'optionsfile.cc',
414 'optionsfile.h',
415 'posix.cc',
416 'posix.h',
417 'profiler.cc',
418 'profiler.h',
419 'proxyserver.cc',
420 'proxyserver.h',
421 'refcount.h',
422 'referencecountedsingletonfactory.h',
423 'rollingaccumulator.h',
424 'safe_conversions.h',
425 'safe_conversions_impl.h',
426 'scopedptrcollection.h',
427 'scoped_ref_ptr.h',
428 'sec_buffer.h',
429 'sharedexclusivelock.cc',
430 'sharedexclusivelock.h',
431 'sslconfig.h',
432 'sslroots.h',
433 'stringdigest.h',
434 'testbase64.h',
435 'testclient.cc',
436 'testclient.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000437 'transformadapter.cc',
438 'transformadapter.h',
439 'versionparsing.cc',
440 'versionparsing.h',
441 'virtualsocketserver.cc',
442 'virtualsocketserver.h',
443 'win32regkey.cc',
444 'win32regkey.h',
445 'win32socketinit.cc',
446 'win32socketinit.h',
447 'win32socketserver.cc',
448 'win32socketserver.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000449 'window.h',
450 'windowpickerfactory.h',
451 'windowpicker.h',
452 ],
453 'defines': [
454 'NO_MAIN_THREAD_WRAPPING',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000455 ],
456 'direct_dependent_settings': {
457 'defines': [
458 'NO_MAIN_THREAD_WRAPPING',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000459 ],
460 },
461 }, {
henrike@webrtc.org9f36c082014-06-16 21:35:20 +0000462 'conditions': [
henrike@webrtc.orga685c9d2014-06-17 14:48:44 +0000463 ['build_json==1', {
henrike@webrtc.org9f36c082014-06-16 21:35:20 +0000464 'dependencies': [
465 '<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
466 ],
467 }, {
468 'include_dirs': [
469 '<(json_root)',
470 ],
471 'defines': [
472 # When defined changes the include path for json.h to where it
473 # is expected to be when building json outside of the standalone
474 # build.
henrike@webrtc.orga685c9d2014-06-17 14:48:44 +0000475 'WEBRTC_EXTERNAL_JSON',
henrike@webrtc.org9f36c082014-06-16 21:35:20 +0000476 ],
477 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000478 ],
479 'sources!': [
480 '../overrides/webrtc/base/basictypes.h',
481 '../overrides/webrtc/base/constructormagic.h',
482 '../overrides/webrtc/base/win32socketinit.cc',
483 '../overrides/webrtc/base/logging.cc',
484 '../overrides/webrtc/base/logging.h',
485 ],
486 }],
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000487 ['use_openssl==1', {
488 'defines': [
489 'SSL_USE_OPENSSL',
490 'HAVE_OPENSSL_SSL_H',
491 ],
492 'direct_dependent_settings': {
493 'defines': [
494 'SSL_USE_OPENSSL',
495 'HAVE_OPENSSL_SSL_H',
496 ],
497 },
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000498 'sources': [
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000499 'openssl.h',
500 'openssladapter.cc',
501 'openssladapter.h',
502 'openssldigest.cc',
503 'openssldigest.h',
504 'opensslidentity.cc',
505 'opensslidentity.h',
506 'opensslstreamadapter.cc',
507 'opensslstreamadapter.h',
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000508 ],
henrike@webrtc.org9f36c082014-06-16 21:35:20 +0000509 'conditions': [
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000510 ['build_ssl==1', {
511 'dependencies': [
512 '<(DEPTH)/third_party/boringssl/boringssl.gyp:boringssl',
513 ],
514 }, {
henrike@webrtc.org9f36c082014-06-16 21:35:20 +0000515 'include_dirs': [
516 '<(ssl_root)',
517 ],
518 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000519 ],
520 }, {
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000521 'sources': [
522 'nssidentity.cc',
523 'nssidentity.h',
524 'nssstreamadapter.cc',
525 'nssstreamadapter.h',
526 ],
tpsiaki@google.com67eabc02014-09-10 18:06:47 +0000527 'conditions': [
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000528 ['use_legacy_ssl_defaults!=1', {
tpsiaki@google.com67eabc02014-09-10 18:06:47 +0000529 'defines': [
530 'SSL_USE_NSS',
531 'HAVE_NSS_SSL_H',
532 'SSL_USE_NSS_RNG',
533 ],
534 'direct_dependent_settings': {
535 'defines': [
536 'SSL_USE_NSS',
537 'HAVE_NSS_SSL_H',
538 'SSL_USE_NSS_RNG',
539 ],
540 },
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000541 }],
542 ['OS=="mac" or OS=="ios" or OS=="win"', {
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000543 'conditions': [
544 ['build_ssl==1', {
545 'dependencies': [
546 '<(DEPTH)/net/third_party/nss/ssl.gyp:libssl',
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000547 '<(DEPTH)/third_party/nss/nss.gyp:nspr',
548 '<(DEPTH)/third_party/nss/nss.gyp:nss',
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000549 ],
550 }, {
551 'include_dirs': [
552 '<(ssl_root)',
553 ],
554 }],
555 ],
556 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000557 ],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000558 }],
559 ['OS == "android"', {
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000560 'defines': [
561 'HAVE_OPENSSL_SSL_H'
562 ],
563 'direct_dependent_settings': {
564 'defines': [
565 'HAVE_OPENSSL_SSL_H'
566 ],
567 },
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000568 'link_settings': {
569 'libraries': [
570 '-llog',
571 '-lGLESv2',
572 ],
573 },
574 }, {
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000575 'conditions': [
576 ['use_legacy_ssl_defaults!=1', {
577 'defines': [
578 'HAVE_NSS_SSL_H',
579 'SSL_USE_NSS_RNG',
580 ],
581 'direct_dependent_settings': {
582 'defines': [
583 'HAVE_NSS_SSL_H',
584 'SSL_USE_NSS_RNG',
585 ],
586 },
587 }],
588 ],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000589 'sources!': [
590 'ifaddrs-android.cc',
591 'ifaddrs-android.h',
592 ],
593 }],
594 ['OS=="ios"', {
595 'all_dependent_settings': {
596 'xcode_settings': {
597 'OTHER_LDFLAGS': [
598 '-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 },
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000630 'conditions': [
631 ['build_ssl==1', {
632 'link_settings': {
633 'libraries': [
634 '<!@(<(pkg-config) --libs-only-l nss | sed -e "s/-lssl3//")',
635 ],
636 },
637 'cflags': [
638 '<!@(<(pkg-config) --cflags nss)',
639 ],
640 'ldflags': [
641 '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
642 ],
643 }],
644 ],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000645 }, {
646 'sources!': [
647 'dbus.cc',
648 'dbus.h',
649 'libdbusglibsymboltable.cc',
650 'libdbusglibsymboltable.h',
651 'linuxfdwalk.c',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000652 ],
653 }],
654 ['OS=="mac"', {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000655 'all_dependent_settings': {
656 'link_settings': {
657 'xcode_settings': {
658 'OTHER_LDFLAGS': [
659 '-framework Cocoa',
660 '-framework Foundation',
661 '-framework IOKit',
662 '-framework Security',
663 '-framework SystemConfiguration',
664 ],
665 },
666 },
667 },
668 'conditions': [
669 ['target_arch=="ia32"', {
670 'all_dependent_settings': {
671 'link_settings': {
672 'xcode_settings': {
673 'OTHER_LDFLAGS': [
674 '-framework Carbon',
675 ],
676 },
677 },
678 },
679 }],
680 ],
681 }, {
682 'sources!': [
683 'macasyncsocket.cc',
684 'macasyncsocket.h',
685 'maccocoasocketserver.h',
686 'maccocoasocketserver.mm',
687 'macconversion.cc',
688 'macconversion.h',
689 'macsocketserver.cc',
690 'macsocketserver.h',
691 'macutils.cc',
692 'macutils.h',
693 'macwindowpicker.cc',
694 'macwindowpicker.h',
695 ],
696 }],
697 ['OS=="win"', {
698 'link_settings': {
699 'libraries': [
700 '-lcrypt32.lib',
701 '-liphlpapi.lib',
702 '-lsecur32.lib',
703 ],
704 },
705 # Suppress warnings about WIN32_LEAN_AND_MEAN.
706 'msvs_disabled_warnings': [4005, 4703],
707 'defines': [
708 '_CRT_NONSTDC_NO_DEPRECATE',
709 ],
710 }, {
711 'sources/': [
712 ['exclude', 'win32[a-z0-9]*\\.(h|cc)$'],
713 ],
714 'sources!': [
715 'schanneladapter.cc',
716 'schanneladapter.h',
717 'winping.cc',
718 'winping.h',
719 'winfirewall.cc',
720 'winfirewall.h',
721 ],
722 }],
723 ['os_posix==0', {
724 'sources!': [
725 'latebindingsymboltable.cc',
726 'latebindingsymboltable.h',
727 'posix.cc',
728 'posix.h',
729 'unixfilesystem.cc',
730 'unixfilesystem.h',
731 ],
732 }, {
733 'configurations': {
734 'Debug_Base': {
735 'defines': [
736 # Chromium's build/common.gypi defines this for all posix
737 # _except_ for ios & mac. We want it there as well, e.g.
738 # because ASSERT and friends trigger off of it.
739 '_DEBUG',
740 ],
741 },
742 }
743 }],
744 ['OS=="ios" or (OS=="mac" and target_arch!="ia32")', {
745 'defines': [
746 'CARBON_DEPRECATED=YES',
747 ],
748 }],
749 ['OS!="ios" and OS!="mac"', {
750 'sources!': [
751 'scoped_autorelease_pool.mm',
752 ],
753 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000754 ['OS!="linux" and OS!="android"', {
755 'sources!': [
756 'linux.cc',
757 'linux.h',
758 ],
759 }],
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000760 ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
761 'conditions': [
762 ['build_ssl==1', {
763 'dependencies': [
764 '<(DEPTH)/build/linux/system.gyp:ssl',
765 ],
766 }, {
767 'include_dirs': [
768 '<(ssl_root)',
769 ],
770 }],
771 ],
772 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000773 ],
774 },
775 ],
776}