blob: d2dc7008e6ca337e62c136609400fd49885f9361 [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',
kwiberg@webrtc.org3df38b42015-01-13 11:37:48 +000044 'compile_assert.h',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000045 'exp_filter.cc',
46 'exp_filter.h',
47 'md5.cc',
48 'md5.h',
49 'md5digest.h',
xians@webrtc.orge46bc772014-10-10 08:36:56 +000050 'platform_file.cc',
51 'platform_file.h',
andrew@webrtc.org0ab42bc2014-12-17 22:56:09 +000052 'safe_conversions.h',
53 'safe_conversions_impl.h',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000054 'stringencode.cc',
55 'stringencode.h',
56 'stringutils.cc',
57 'stringutils.h',
kwiberg@webrtc.orgaf9d56f2015-01-13 20:32:04 +000058 'template_util.h',
pbos@webrtc.org38344ed2014-09-24 06:05:00 +000059 'thread_annotations.h',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000060 'timeutils.cc',
61 'timeutils.h',
62 ],
63 },
64 {
henrike@webrtc.orgb2efb672014-09-10 17:28:19 +000065 'target_name': 'rtc_base',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000066 'type': 'static_library',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +000067 'dependencies': [
68 'rtc_base_approved',
69 ],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000070 'defines': [
71 'FEATURE_ENABLE_SSL',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000072 'LOGGING=1',
73 'USE_WEBRTC_DEV_BRANCH',
74 ],
75 'sources': [
76 'asyncfile.cc',
77 'asyncfile.h',
78 'asynchttprequest.cc',
79 'asynchttprequest.h',
80 'asyncinvoker.cc',
81 'asyncinvoker.h',
kjellander@webrtc.org2bae3212014-06-16 07:11:19 +000082 'asyncinvoker-inl.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000083 'asyncpacketsocket.h',
84 'asyncresolverinterface.h',
85 'asyncsocket.cc',
86 'asyncsocket.h',
87 'asynctcpsocket.cc',
88 'asynctcpsocket.h',
89 'asyncudpsocket.cc',
90 'asyncudpsocket.h',
91 'atomicops.h',
92 'autodetectproxy.cc',
93 'autodetectproxy.h',
94 'bandwidthsmoother.cc',
95 'bandwidthsmoother.h',
96 'base64.cc',
97 'base64.h',
98 'basicdefs.h',
99 'basictypes.h',
100 'bind.h',
kjellander@webrtc.org2bae3212014-06-16 07:11:19 +0000101 'bind.h.pump',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000102 'buffer.h',
103 'bytebuffer.cc',
104 'bytebuffer.h',
105 'byteorder.h',
106 'callback.h',
kjellander@webrtc.org2bae3212014-06-16 07:11:19 +0000107 'callback.h.pump',
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +0000108 'constructormagic.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000109 'common.cc',
110 'common.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000111 'cpumonitor.cc',
112 'cpumonitor.h',
113 'crc32.cc',
114 'crc32.h',
115 'criticalsection.h',
116 'cryptstring.h',
117 'dbus.cc',
118 'dbus.h',
119 'diskcache.cc',
120 'diskcache.h',
121 'diskcache_win32.cc',
122 'diskcache_win32.h',
123 'event.cc',
124 'event.h',
125 'filelock.cc',
126 'filelock.h',
127 'fileutils.cc',
128 'fileutils.h',
129 'fileutils_mock.h',
130 'firewallsocketserver.cc',
131 'firewallsocketserver.h',
132 'flags.cc',
133 'flags.h',
pkasting@chromium.org4591fbd2014-11-20 22:28:14 +0000134 'format_macros.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000135 'gunit_prod.h',
136 'helpers.cc',
137 'helpers.h',
138 'httpbase.cc',
139 'httpbase.h',
140 'httpclient.cc',
141 'httpclient.h',
142 'httpcommon-inl.h',
143 'httpcommon.cc',
144 'httpcommon.h',
145 'httprequest.cc',
146 'httprequest.h',
147 'httpserver.cc',
148 'httpserver.h',
149 'ifaddrs-android.cc',
150 'ifaddrs-android.h',
151 'iosfilesystem.mm',
152 'ipaddress.cc',
153 'ipaddress.h',
154 'json.cc',
155 'json.h',
156 'latebindingsymboltable.cc',
kjellander@webrtc.org2bae3212014-06-16 07:11:19 +0000157 'latebindingsymboltable.cc.def',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000158 'latebindingsymboltable.h',
kjellander@webrtc.org2bae3212014-06-16 07:11:19 +0000159 'latebindingsymboltable.h.def',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000160 'libdbusglibsymboltable.cc',
161 'libdbusglibsymboltable.h',
162 'linux.cc',
163 'linux.h',
164 'linuxfdwalk.c',
kjellander@webrtc.org2bae3212014-06-16 07:11:19 +0000165 'linuxfdwalk.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000166 'linked_ptr.h',
167 'logging.cc',
168 'logging.h',
169 'macasyncsocket.cc',
170 'macasyncsocket.h',
171 'maccocoasocketserver.h',
172 'maccocoasocketserver.mm',
173 'maccocoathreadhelper.h',
174 'maccocoathreadhelper.mm',
175 'macconversion.cc',
176 'macconversion.h',
177 'macsocketserver.cc',
178 'macsocketserver.h',
179 'macutils.cc',
180 'macutils.h',
181 'macwindowpicker.cc',
182 'macwindowpicker.h',
183 'mathutils.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000184 'messagedigest.cc',
185 'messagedigest.h',
186 'messagehandler.cc',
187 'messagehandler.h',
188 'messagequeue.cc',
189 'messagequeue.h',
190 'multipart.cc',
191 'multipart.h',
192 'natserver.cc',
193 'natserver.h',
194 'natsocketfactory.cc',
195 'natsocketfactory.h',
196 'nattypes.cc',
197 'nattypes.h',
198 'nethelpers.cc',
199 'nethelpers.h',
200 'network.cc',
201 'network.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000202 'nullsocketserver.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000203 'optionsfile.cc',
204 'optionsfile.h',
205 'pathutils.cc',
206 'pathutils.h',
207 'physicalsocketserver.cc',
208 'physicalsocketserver.h',
209 'posix.cc',
210 'posix.h',
211 'profiler.cc',
212 'profiler.h',
213 'proxydetect.cc',
214 'proxydetect.h',
215 'proxyinfo.cc',
216 'proxyinfo.h',
217 'proxyserver.cc',
218 'proxyserver.h',
219 'ratelimiter.cc',
220 'ratelimiter.h',
221 'ratetracker.cc',
222 'ratetracker.h',
223 'refcount.h',
224 'referencecountedsingletonfactory.h',
225 'rollingaccumulator.h',
226 'schanneladapter.cc',
227 'schanneladapter.h',
228 'scoped_autorelease_pool.h',
229 'scoped_autorelease_pool.mm',
230 'scoped_ptr.h',
231 'scoped_ref_ptr.h',
232 'scopedptrcollection.h',
233 'sec_buffer.h',
234 'sha1.cc',
235 'sha1.h',
236 'sha1digest.h',
237 'sharedexclusivelock.cc',
238 'sharedexclusivelock.h',
239 'signalthread.cc',
240 'signalthread.h',
241 'sigslot.h',
242 'sigslotrepeater.h',
243 'socket.h',
244 'socketadapters.cc',
245 'socketadapters.h',
246 'socketaddress.cc',
247 'socketaddress.h',
248 'socketaddresspair.cc',
249 'socketaddresspair.h',
250 'socketfactory.h',
251 'socketpool.cc',
252 'socketpool.h',
253 'socketserver.h',
254 'socketstream.cc',
255 'socketstream.h',
256 'ssladapter.cc',
257 'ssladapter.h',
258 'sslconfig.h',
259 'sslfingerprint.cc',
260 'sslfingerprint.h',
261 'sslidentity.cc',
262 'sslidentity.h',
263 'sslroots.h',
264 'sslsocketfactory.cc',
265 'sslsocketfactory.h',
266 'sslstreamadapter.cc',
267 'sslstreamadapter.h',
268 'sslstreamadapterhelper.cc',
269 'sslstreamadapterhelper.h',
270 'stream.cc',
271 'stream.h',
272 'stringdigest.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000273 'systeminfo.cc',
274 'systeminfo.h',
275 'task.cc',
276 'task.h',
277 'taskparent.cc',
278 'taskparent.h',
279 'taskrunner.cc',
280 'taskrunner.h',
281 'testclient.cc',
282 'testclient.h',
283 'thread.cc',
284 'thread.h',
henrik.lundin@webrtc.org1e3c5c22014-06-16 11:34:44 +0000285 'thread_checker.h',
286 'thread_checker_impl.cc',
287 'thread_checker_impl.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000288 'timing.cc',
289 'timing.h',
290 'transformadapter.cc',
291 'transformadapter.h',
292 'unixfilesystem.cc',
293 'unixfilesystem.h',
294 'urlencode.cc',
295 'urlencode.h',
296 'versionparsing.cc',
297 'versionparsing.h',
298 'virtualsocketserver.cc',
299 'virtualsocketserver.h',
300 'win32.cc',
301 'win32.h',
302 'win32filesystem.cc',
303 'win32filesystem.h',
304 'win32regkey.cc',
305 'win32regkey.h',
306 'win32securityerrors.cc',
307 'win32socketinit.cc',
308 'win32socketinit.h',
309 'win32socketserver.cc',
310 'win32socketserver.h',
311 'win32window.cc',
312 'win32window.h',
313 'win32windowpicker.cc',
314 'win32windowpicker.h',
315 'window.h',
316 'windowpicker.h',
317 'windowpickerfactory.h',
318 'winfirewall.cc',
319 'winfirewall.h',
320 'winping.cc',
321 'winping.h',
322 'worker.cc',
323 'worker.h',
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +0000324 'x11windowpicker.cc',
325 'x11windowpicker.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000326 '../overrides/webrtc/base/basictypes.h',
327 '../overrides/webrtc/base/constructormagic.h',
328 '../overrides/webrtc/base/logging.cc',
329 '../overrides/webrtc/base/logging.h',
330 '../overrides/webrtc/base/win32socketinit.cc',
331 ],
henrike@webrtc.orgb2efb672014-09-10 17:28:19 +0000332 # TODO(henrike): issue 3307, make rtc_base build without disabling
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000333 # these flags.
334 'cflags!': [
335 '-Wextra',
336 '-Wall',
337 ],
338 'cflags_cc!': [
339 '-Wnon-virtual-dtor',
340 ],
341 'direct_dependent_settings': {
342 'cflags_cc!': [
343 '-Wnon-virtual-dtor',
344 ],
345 'defines': [
346 'FEATURE_ENABLE_SSL',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000347 ],
348 },
349 'include_dirs': [
350 '../../third_party/jsoncpp/overrides/include',
351 '../../third_party/jsoncpp/source/include',
352 ],
353 'conditions': [
354 ['build_with_chromium==1', {
355 'include_dirs': [
356 '../overrides',
henrike@webrtc.org6ac22e62014-08-11 21:06:30 +0000357 '../../boringssl/src/include',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000358 ],
359 'sources!': [
360 'asyncinvoker.cc',
361 'asyncinvoker.h',
362 'asyncinvoker-inl.h',
363 'asyncresolverinterface.h',
364 'atomicops.h',
365 'bandwidthsmoother.cc',
366 'bandwidthsmoother.h',
367 'basictypes.h',
368 'bind.h',
369 'bind.h.pump',
370 'buffer.h',
371 'callback.h',
372 'callback.h.pump',
373 'constructormagic.h',
374 'dbus.cc',
375 'dbus.h',
376 'diskcache_win32.cc',
377 'diskcache_win32.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000378 'filelock.cc',
379 'filelock.h',
380 'fileutils_mock.h',
381 'genericslot.h',
382 'genericslot.h.pump',
383 'httpserver.cc',
384 'httpserver.h',
385 'json.cc',
386 'json.h',
387 'latebindingsymboltable.cc',
388 'latebindingsymboltable.cc.def',
389 'latebindingsymboltable.h',
390 'latebindingsymboltable.h.def',
391 'libdbusglibsymboltable.cc',
392 'libdbusglibsymboltable.h',
393 'linuxfdwalk.c',
394 'linuxfdwalk.h',
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +0000395 'x11windowpicker.cc',
396 'x11windowpicker.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000397 'logging.cc',
398 'logging.h',
399 'macasyncsocket.cc',
400 'macasyncsocket.h',
401 'maccocoasocketserver.h',
402 'maccocoasocketserver.mm',
403 'macsocketserver.cc',
404 'macsocketserver.h',
405 'macwindowpicker.cc',
406 'macwindowpicker.h',
407 'mathutils.h',
408 'multipart.cc',
409 'multipart.h',
410 'natserver.cc',
411 'natserver.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000412 'natsocketfactory.cc',
413 'natsocketfactory.h',
414 'nattypes.cc',
415 'nattypes.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000416 'optionsfile.cc',
417 'optionsfile.h',
418 'posix.cc',
419 'posix.h',
420 'profiler.cc',
421 'profiler.h',
422 'proxyserver.cc',
423 'proxyserver.h',
424 'refcount.h',
425 'referencecountedsingletonfactory.h',
426 'rollingaccumulator.h',
427 'safe_conversions.h',
428 'safe_conversions_impl.h',
429 'scopedptrcollection.h',
430 'scoped_ref_ptr.h',
431 'sec_buffer.h',
432 'sharedexclusivelock.cc',
433 'sharedexclusivelock.h',
434 'sslconfig.h',
435 'sslroots.h',
436 'stringdigest.h',
437 'testbase64.h',
438 'testclient.cc',
439 'testclient.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000440 'transformadapter.cc',
441 'transformadapter.h',
442 'versionparsing.cc',
443 'versionparsing.h',
444 'virtualsocketserver.cc',
445 'virtualsocketserver.h',
446 'win32regkey.cc',
447 'win32regkey.h',
448 'win32socketinit.cc',
449 'win32socketinit.h',
450 'win32socketserver.cc',
451 'win32socketserver.h',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000452 'window.h',
453 'windowpickerfactory.h',
454 'windowpicker.h',
455 ],
456 'defines': [
457 'NO_MAIN_THREAD_WRAPPING',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000458 ],
459 'direct_dependent_settings': {
460 'defines': [
461 'NO_MAIN_THREAD_WRAPPING',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000462 ],
463 },
464 }, {
henrike@webrtc.org9f36c082014-06-16 21:35:20 +0000465 'conditions': [
henrike@webrtc.orga685c9d2014-06-17 14:48:44 +0000466 ['build_json==1', {
henrike@webrtc.org9f36c082014-06-16 21:35:20 +0000467 'dependencies': [
468 '<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
469 ],
470 }, {
471 'include_dirs': [
472 '<(json_root)',
473 ],
474 'defines': [
475 # When defined changes the include path for json.h to where it
476 # is expected to be when building json outside of the standalone
477 # build.
henrike@webrtc.orga685c9d2014-06-17 14:48:44 +0000478 'WEBRTC_EXTERNAL_JSON',
henrike@webrtc.org9f36c082014-06-16 21:35:20 +0000479 ],
480 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000481 ],
482 'sources!': [
483 '../overrides/webrtc/base/basictypes.h',
484 '../overrides/webrtc/base/constructormagic.h',
485 '../overrides/webrtc/base/win32socketinit.cc',
486 '../overrides/webrtc/base/logging.cc',
487 '../overrides/webrtc/base/logging.h',
488 ],
489 }],
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000490 ['use_openssl==1', {
491 'defines': [
492 'SSL_USE_OPENSSL',
493 'HAVE_OPENSSL_SSL_H',
494 ],
495 'direct_dependent_settings': {
496 'defines': [
497 'SSL_USE_OPENSSL',
498 'HAVE_OPENSSL_SSL_H',
499 ],
500 },
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000501 'sources': [
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000502 'openssl.h',
503 'openssladapter.cc',
504 'openssladapter.h',
505 'openssldigest.cc',
506 'openssldigest.h',
507 'opensslidentity.cc',
508 'opensslidentity.h',
509 'opensslstreamadapter.cc',
510 'opensslstreamadapter.h',
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000511 ],
henrike@webrtc.org9f36c082014-06-16 21:35:20 +0000512 'conditions': [
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000513 ['build_ssl==1', {
514 'dependencies': [
515 '<(DEPTH)/third_party/boringssl/boringssl.gyp:boringssl',
516 ],
517 }, {
henrike@webrtc.org9f36c082014-06-16 21:35:20 +0000518 'include_dirs': [
519 '<(ssl_root)',
520 ],
521 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000522 ],
523 }, {
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000524 'sources': [
525 'nssidentity.cc',
526 'nssidentity.h',
527 'nssstreamadapter.cc',
528 'nssstreamadapter.h',
529 ],
tpsiaki@google.com67eabc02014-09-10 18:06:47 +0000530 'conditions': [
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000531 ['use_legacy_ssl_defaults!=1', {
tpsiaki@google.com67eabc02014-09-10 18:06:47 +0000532 'defines': [
533 'SSL_USE_NSS',
534 'HAVE_NSS_SSL_H',
535 'SSL_USE_NSS_RNG',
536 ],
537 'direct_dependent_settings': {
538 'defines': [
539 'SSL_USE_NSS',
540 'HAVE_NSS_SSL_H',
541 'SSL_USE_NSS_RNG',
542 ],
543 },
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000544 }],
henrike@webrtc.org33a0e2d2014-10-27 18:13:40 +0000545 ['build_ssl==1', {
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000546 'conditions': [
henrike@webrtc.org33a0e2d2014-10-27 18:13:40 +0000547 # On some platforms, the rest of NSS is bundled. On others,
548 # it's pulled from the system.
549 ['OS == "mac" or OS == "ios" or OS == "win"', {
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000550 'dependencies': [
551 '<(DEPTH)/net/third_party/nss/ssl.gyp:libssl',
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000552 '<(DEPTH)/third_party/nss/nss.gyp:nspr',
553 '<(DEPTH)/third_party/nss/nss.gyp:nss',
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000554 ],
henrike@webrtc.org33a0e2d2014-10-27 18:13:40 +0000555 }],
556 ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
557 'dependencies': [
558 '<(DEPTH)/build/linux/system.gyp:ssl',
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000559 ],
560 }],
561 ],
henrike@webrtc.org33a0e2d2014-10-27 18:13:40 +0000562 }, {
563 'include_dirs': [
564 '<(ssl_root)',
565 ],
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000566 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000567 ],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000568 }],
569 ['OS == "android"', {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000570 'link_settings': {
571 'libraries': [
572 '-llog',
573 '-lGLESv2',
574 ],
575 },
576 }, {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000577 'sources!': [
578 'ifaddrs-android.cc',
579 'ifaddrs-android.h',
580 ],
581 }],
582 ['OS=="ios"', {
583 'all_dependent_settings': {
584 'xcode_settings': {
585 'OTHER_LDFLAGS': [
586 '-framework Foundation',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000587 '-framework Security',
588 '-framework SystemConfiguration',
589 '-framework UIKit',
590 ],
591 },
592 },
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000593 }],
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +0000594 ['use_x11 == 1', {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000595 'link_settings': {
596 'libraries': [
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000597 '-ldl',
598 '-lrt',
599 '-lXext',
600 '-lX11',
601 '-lXcomposite',
602 '-lXrender',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000603 ],
604 },
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +0000605 }, {
606 'sources!': [
607 'x11windowpicker.cc',
608 'x11windowpicker.h',
609 ],
610 }],
611 ['OS=="linux"', {
612 'link_settings': {
613 'libraries': [
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +0000614 '-ldl',
615 '-lrt',
616 ],
617 },
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000618 }, {
619 'sources!': [
620 'dbus.cc',
621 'dbus.h',
622 'libdbusglibsymboltable.cc',
623 'libdbusglibsymboltable.h',
624 'linuxfdwalk.c',
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000625 ],
626 }],
627 ['OS=="mac"', {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000628 'all_dependent_settings': {
629 'link_settings': {
630 'xcode_settings': {
631 'OTHER_LDFLAGS': [
632 '-framework Cocoa',
633 '-framework Foundation',
634 '-framework IOKit',
635 '-framework Security',
636 '-framework SystemConfiguration',
637 ],
638 },
639 },
640 },
641 'conditions': [
642 ['target_arch=="ia32"', {
643 'all_dependent_settings': {
644 'link_settings': {
645 'xcode_settings': {
646 'OTHER_LDFLAGS': [
647 '-framework Carbon',
648 ],
649 },
650 },
651 },
652 }],
653 ],
654 }, {
655 'sources!': [
656 'macasyncsocket.cc',
657 'macasyncsocket.h',
658 'maccocoasocketserver.h',
659 'maccocoasocketserver.mm',
660 'macconversion.cc',
661 'macconversion.h',
662 'macsocketserver.cc',
663 'macsocketserver.h',
664 'macutils.cc',
665 'macutils.h',
666 'macwindowpicker.cc',
667 'macwindowpicker.h',
668 ],
669 }],
670 ['OS=="win"', {
671 'link_settings': {
672 'libraries': [
673 '-lcrypt32.lib',
674 '-liphlpapi.lib',
675 '-lsecur32.lib',
676 ],
677 },
678 # Suppress warnings about WIN32_LEAN_AND_MEAN.
679 'msvs_disabled_warnings': [4005, 4703],
680 'defines': [
681 '_CRT_NONSTDC_NO_DEPRECATE',
682 ],
683 }, {
684 'sources/': [
685 ['exclude', 'win32[a-z0-9]*\\.(h|cc)$'],
686 ],
687 'sources!': [
688 'schanneladapter.cc',
689 'schanneladapter.h',
690 'winping.cc',
691 'winping.h',
692 'winfirewall.cc',
693 'winfirewall.h',
694 ],
695 }],
696 ['os_posix==0', {
697 'sources!': [
698 'latebindingsymboltable.cc',
699 'latebindingsymboltable.h',
700 'posix.cc',
701 'posix.h',
702 'unixfilesystem.cc',
703 'unixfilesystem.h',
704 ],
705 }, {
706 'configurations': {
707 'Debug_Base': {
708 'defines': [
709 # Chromium's build/common.gypi defines this for all posix
710 # _except_ for ios & mac. We want it there as well, e.g.
711 # because ASSERT and friends trigger off of it.
712 '_DEBUG',
713 ],
714 },
715 }
716 }],
717 ['OS=="ios" or (OS=="mac" and target_arch!="ia32")', {
718 'defines': [
719 'CARBON_DEPRECATED=YES',
720 ],
721 }],
722 ['OS!="ios" and OS!="mac"', {
723 'sources!': [
724 'scoped_autorelease_pool.mm',
725 ],
726 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000727 ['OS!="linux" and OS!="android"', {
728 'sources!': [
729 'linux.cc',
730 'linux.h',
731 ],
732 }],
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000733 ],
734 },
735 ],
736}