blob: 3bc10bd674548feab74fe6fd9d05dc2ba6020f4c [file] [log] [blame]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +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
9import("//build/config/crypto.gni")
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +000010import("//build/config/ui.gni")
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000011import("../build/webrtc.gni")
12
13config("webrtc_base_config") {
14 include_dirs = [
15 "//third_party/jsoncpp/overrides/include",
16 "//third_party/jsoncpp/source/include",
17 ]
18
19 defines = [
20 "FEATURE_ENABLE_SSL",
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +000021 "LOGGING=1",
22 "USE_WEBRTC_DEV_BRANCH",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000023 ]
24
25 # TODO(henrike): issue 3307, make webrtc_base build without disabling
26 # these flags.
27 cflags_cc = [ "-Wno-non-virtual-dtor" ]
28}
29
30config("webrtc_base_chromium_config") {
31 defines = [
32 "NO_MAIN_THREAD_WRAPPING",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000033 ]
34}
35
36config("openssl_config") {
37 defines = [
38 "SSL_USE_OPENSSL",
39 "HAVE_OPENSSL_SSL_H",
40 ]
41}
42
henrike@webrtc.org33a0e2d2014-10-27 18:13:40 +000043config("nss_config") {
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000044 defines = [
45 "SSL_USE_NSS",
46 "HAVE_NSS_SSL_H",
47 "SSL_USE_NSS_RNG",
48 ]
49}
50
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000051config("ios_config") {
kjellander@webrtc.org556caff2014-12-19 13:28:37 +000052 libs = [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000053 #"Foundation.framework", # Already included in //build/config:default_libs.
54 "Security.framework",
55 "SystemConfiguration.framework",
56 #"UIKit.framework", # Already included in //build/config:default_libs.
57 ]
58}
59
60config("mac_config") {
kjellander@webrtc.org556caff2014-12-19 13:28:37 +000061 libs = [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000062 "Cocoa.framework",
63 #"Foundation.framework", # Already included in //build/config:default_libs.
64 #"IOKit.framework", # Already included in //build/config:default_libs.
65 #"Security.framework", # Already included in //build/config:default_libs.
66 "SystemConfiguration.framework",
67 ]
68}
69
70config("mac_x86_config") {
71 libs = [
72 #"Carbon.framework", # Already included in //build/config:default_libs.
73 ]
74}
75
kjellander@webrtc.org4a251992014-08-18 17:56:28 +000076if (is_linux && !build_with_chromium) {
77 # Provides the same functionality as the //crypto:platform target, which
78 # WebRTC cannot use as we don't sync src/crypto from Chromium.
79 group("linux_system_ssl") {
80 if (use_openssl) {
81 deps = [ "//third_party/boringssl" ]
82 } else {
83 deps = [ "//net/third_party/nss/ssl:libssl" ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000084
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +000085 public_configs = [
kjellander@webrtc.org4a251992014-08-18 17:56:28 +000086 "//net/third_party/nss/ssl:ssl_config",
87 "//third_party/nss:system_nss_no_ssl_config",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000088 ]
89 }
90 }
91}
92
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000093if (rtc_build_ssl == 0) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +000094 config("external_ssl_library") {
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +000095 assert(rtc_ssl_root != "",
96 "You must specify rtc_ssl_root when rtc_build_ssl==0.")
97 include_dirs = [ rtc_ssl_root ]
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +000098 }
99}
kjellander@webrtc.org4a251992014-08-18 17:56:28 +0000100
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +0000101# The subset of rtc_base approved for use outside of libjingle.
102static_library("rtc_base_approved") {
103 configs += [ "..:common_config" ]
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000104 public_configs = [ "..:common_inherited_config" ]
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +0000105
106 sources = [
107 "checks.cc",
108 "checks.h",
109 "exp_filter.cc",
110 "exp_filter.h",
111 "md5.cc",
112 "md5.h",
113 "md5digest.h",
xians@webrtc.orge46bc772014-10-10 08:36:56 +0000114 "platform_file.cc",
115 "platform_file.h",
andrew@webrtc.org0ab42bc2014-12-17 22:56:09 +0000116 "safe_conversions.h",
117 "safe_conversions_impl.h",
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +0000118 "stringencode.cc",
119 "stringencode.h",
120 "stringutils.cc",
121 "stringutils.h",
kwiberg@webrtc.orgaf9d56f2015-01-13 20:32:04 +0000122 "template_util.h",
pbos@webrtc.org38344ed2014-09-24 06:05:00 +0000123 "thread_annotations.h",
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +0000124 "timeutils.cc",
125 "timeutils.h",
126 ]
127}
128
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000129static_library("webrtc_base") {
130 cflags = []
131 cflags_cc = []
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000132 libs = []
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +0000133 deps = [
134 ":rtc_base_approved",
135 ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000136
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000137 configs += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000138 "..:common_config",
139 ":webrtc_base_config",
140 ]
141
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000142 public_configs = [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000143 "..:common_inherited_config",
144 ":webrtc_base_config",
145 ]
146
147 defines = [
148 "LOGGING=1",
149 "USE_WEBRTC_DEV_BRANCH",
150 ]
151
152 sources = [
153 "asyncfile.cc",
154 "asyncfile.h",
155 "asynchttprequest.cc",
156 "asynchttprequest.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000157 "asyncpacketsocket.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000158 "asyncsocket.cc",
159 "asyncsocket.h",
160 "asynctcpsocket.cc",
161 "asynctcpsocket.h",
162 "asyncudpsocket.cc",
163 "asyncudpsocket.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000164 "autodetectproxy.cc",
165 "autodetectproxy.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000166 "base64.cc",
167 "base64.h",
168 "basicdefs.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000169 "bytebuffer.cc",
170 "bytebuffer.h",
171 "byteorder.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000172 "common.cc",
173 "common.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000174 "cpumonitor.cc",
175 "cpumonitor.h",
176 "crc32.cc",
177 "crc32.h",
178 "criticalsection.h",
179 "cryptstring.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000180 "diskcache.cc",
181 "diskcache.h",
182 "event.cc",
183 "event.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000184 "fileutils.cc",
185 "fileutils.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000186 "firewallsocketserver.cc",
187 "firewallsocketserver.h",
188 "flags.cc",
189 "flags.h",
pkasting@chromium.org4591fbd2014-11-20 22:28:14 +0000190 "format_macros.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000191 "gunit_prod.h",
192 "helpers.cc",
193 "helpers.h",
194 "httpbase.cc",
195 "httpbase.h",
196 "httpclient.cc",
197 "httpclient.h",
198 "httpcommon-inl.h",
199 "httpcommon.cc",
200 "httpcommon.h",
201 "httprequest.cc",
202 "httprequest.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000203 "iosfilesystem.mm",
204 "ipaddress.cc",
205 "ipaddress.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000206 "linked_ptr.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000207 "mathutils.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000208 "messagedigest.cc",
209 "messagedigest.h",
210 "messagehandler.cc",
211 "messagehandler.h",
212 "messagequeue.cc",
213 "messagequeue.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000214 "nethelpers.cc",
215 "nethelpers.h",
216 "network.cc",
217 "network.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000218 "nullsocketserver.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000219 "pathutils.cc",
220 "pathutils.h",
221 "physicalsocketserver.cc",
222 "physicalsocketserver.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000223 "proxydetect.cc",
224 "proxydetect.h",
225 "proxyinfo.cc",
226 "proxyinfo.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000227 "ratelimiter.cc",
228 "ratelimiter.h",
229 "ratetracker.cc",
230 "ratetracker.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000231 "scoped_autorelease_pool.h",
232 "scoped_autorelease_pool.mm",
233 "scoped_ptr.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000234 "sha1.cc",
235 "sha1.h",
236 "sha1digest.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000237 "signalthread.cc",
238 "signalthread.h",
239 "sigslot.h",
240 "sigslotrepeater.h",
241 "socket.h",
242 "socketadapters.cc",
243 "socketadapters.h",
244 "socketaddress.cc",
245 "socketaddress.h",
246 "socketaddresspair.cc",
247 "socketaddresspair.h",
248 "socketfactory.h",
249 "socketpool.cc",
250 "socketpool.h",
251 "socketserver.h",
252 "socketstream.cc",
253 "socketstream.h",
254 "ssladapter.cc",
255 "ssladapter.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000256 "sslfingerprint.cc",
257 "sslfingerprint.h",
258 "sslidentity.cc",
259 "sslidentity.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000260 "sslsocketfactory.cc",
261 "sslsocketfactory.h",
262 "sslstreamadapter.cc",
263 "sslstreamadapter.h",
264 "sslstreamadapterhelper.cc",
265 "sslstreamadapterhelper.h",
266 "stream.cc",
267 "stream.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000268 "systeminfo.cc",
269 "systeminfo.h",
270 "task.cc",
271 "task.h",
272 "taskparent.cc",
273 "taskparent.h",
274 "taskrunner.cc",
275 "taskrunner.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000276 "thread.cc",
277 "thread.h",
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000278 "thread_checker.h",
279 "thread_checker_impl.cc",
280 "thread_checker_impl.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000281 "timing.cc",
282 "timing.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000283 "urlencode.cc",
284 "urlencode.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000285 "worker.cc",
286 "worker.h",
287 ]
288
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000289 if (is_posix) {
290 sources += [
291 "unixfilesystem.cc",
292 "unixfilesystem.h",
293 ]
294 }
295
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000296 if (build_with_chromium) {
297 sources += [
298 "../overrides/webrtc/base/basictypes.h",
299 "../overrides/webrtc/base/constructormagic.h",
300 "../overrides/webrtc/base/logging.cc",
301 "../overrides/webrtc/base/logging.h",
302 ]
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000303
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000304 if (is_win) {
305 sources += [ "../overrides/webrtc/base/win32socketinit.cc" ]
306 }
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000307
308 include_dirs = [
309 "../overrides",
henrike@webrtc.org6ac22e62014-08-11 21:06:30 +0000310 "../../boringssl/src/include",
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000311 ]
312
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000313 public_configs += [ ":webrtc_base_chromium_config" ]
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000314 } else {
315 sources += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000316 "asyncinvoker.cc",
317 "asyncinvoker.h",
318 "asyncinvoker-inl.h",
319 "asyncresolverinterface.h",
320 "atomicops.h",
321 "bandwidthsmoother.cc",
322 "bandwidthsmoother.h",
323 "basictypes.h",
324 "bind.h",
325 "bind.h.pump",
326 "buffer.h",
327 "callback.h",
328 "callback.h.pump",
329 "constructormagic.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000330 "filelock.cc",
331 "filelock.h",
332 "fileutils_mock.h",
333 "genericslot.h",
334 "genericslot.h.pump",
335 "httpserver.cc",
336 "httpserver.h",
337 "json.cc",
338 "json.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000339 "logging.cc",
340 "logging.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000341 "mathutils.h",
342 "multipart.cc",
343 "multipart.h",
344 "natserver.cc",
345 "natserver.h",
346 "natsocketfactory.cc",
347 "natsocketfactory.h",
348 "nattypes.cc",
349 "nattypes.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000350 "optionsfile.cc",
351 "optionsfile.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000352 "profiler.cc",
353 "profiler.h",
354 "proxyserver.cc",
355 "proxyserver.h",
356 "refcount.h",
357 "referencecountedsingletonfactory.h",
358 "rollingaccumulator.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000359 "scopedptrcollection.h",
360 "scoped_ref_ptr.h",
361 "sec_buffer.h",
362 "sharedexclusivelock.cc",
363 "sharedexclusivelock.h",
364 "sslconfig.h",
365 "sslroots.h",
366 "stringdigest.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000367 "testclient.cc",
368 "testclient.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000369 "transformadapter.cc",
370 "transformadapter.h",
371 "versionparsing.cc",
372 "versionparsing.h",
373 "virtualsocketserver.cc",
374 "virtualsocketserver.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000375 "window.h",
376 "windowpickerfactory.h",
377 "windowpicker.h",
378 ]
379
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000380 if (is_posix) {
381 sources += [
382 "latebindingsymboltable.cc",
383 "latebindingsymboltable.cc.def",
384 "latebindingsymboltable.h",
385 "latebindingsymboltable.h.def",
386 "posix.cc",
387 "posix.h",
388 ]
389 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000390
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000391 if (is_linux) {
392 sources += [
393 "dbus.cc",
394 "dbus.h",
395 "libdbusglibsymboltable.cc",
396 "libdbusglibsymboltable.h",
397 "linuxfdwalk.c",
398 "linuxfdwalk.h",
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +0000399 ]
400 }
401
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000402 if (is_mac) {
403 sources += [
404 "macasyncsocket.cc",
405 "macasyncsocket.h",
406 "maccocoasocketserver.h",
407 "maccocoasocketserver.mm",
408 "macsocketserver.cc",
409 "macsocketserver.h",
410 "macwindowpicker.cc",
411 "macwindowpicker.h",
412 ]
413 }
414
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000415 if (is_win) {
416 sources += [
417 "diskcache_win32.cc",
418 "diskcache_win32.h",
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000419 "win32regkey.cc",
420 "win32regkey.h",
421 "win32socketinit.cc",
422 "win32socketinit.h",
423 "win32socketserver.cc",
424 "win32socketserver.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000425 ]
426 }
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000427 if (rtc_build_json) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000428 deps += [ "//third_party/jsoncpp" ]
429 } else {
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000430 include_dirs += [ rtc_jsoncpp_root ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000431
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000432 # When defined changes the include path for json.h to where it is
433 # expected to be when building json outside of the standalone build.
434 defines += [ "WEBRTC_EXTERNAL_JSON" ]
435 }
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000436 } # !build_with_chromium
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000437
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000438 if (is_clang) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000439 # Suppress warnings from the Chrome Clang plugins.
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000440 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
441 configs -= [ "//build/config/clang:find_bad_constructs" ]
442 }
443
kjellander@webrtc.org62711f82014-06-29 13:37:08 +0000444 # TODO(henrike): issue 3307, make webrtc_base build with the Chromium default
445 # compiler settings.
446 configs -= [ "//build/config/compiler:chromium_code" ]
447 configs += [ "//build/config/compiler:no_chromium_code" ]
kjellander@webrtc.orgc8bc7172014-12-12 12:10:46 +0000448 if (!is_win) {
449 cflags += [ "-Wno-uninitialized" ]
450 cflags_cc += [ "-Wno-non-virtual-dtor" ]
451 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000452
453 if (use_openssl) {
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000454 public_configs += [ ":openssl_config" ]
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000455 if (rtc_build_ssl) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000456 deps += [ "//third_party/boringssl" ]
457 } else {
458 configs += [ "external_ssl_library" ]
459 }
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000460 sources += [
461 "openssl.h",
462 "openssladapter.cc",
463 "openssladapter.h",
464 "openssldigest.cc",
465 "openssldigest.h",
466 "opensslidentity.cc",
467 "opensslidentity.h",
468 "opensslstreamadapter.cc",
469 "opensslstreamadapter.h",
470 ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000471 } else {
henrike@webrtc.org33a0e2d2014-10-27 18:13:40 +0000472 public_configs += [ ":nss_config" ]
473 if (rtc_build_ssl) {
474 if (build_with_chromium) {
475 deps += [ "//crypto:platform" ]
476 } else {
477 deps += [ "//net/third_party/nss/ssl:libssl" ]
478 if (is_linux) {
479 deps += [ ":linux_system_ssl" ]
480 } else {
481 deps += [
482 "//third_party/nss:nspr",
483 "//third_party/nss:nss",
484 ]
485 }
486 }
487 } else {
488 configs += [ "external_ssl_library" ]
489 }
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000490 sources += [
491 "nssidentity.cc",
492 "nssidentity.h",
493 "nssstreamadapter.cc",
494 "nssstreamadapter.h",
495 ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000496 }
497
498 if (is_android) {
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000499 sources += [
500 "ifaddrs-android.cc",
501 "ifaddrs-android.h",
502 ]
503
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000504 libs += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000505 "log",
506 "GLESv2"
507 ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000508 }
509
510 if (is_ios) {
511 all_dependent_configs += [ ":ios_config" ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000512 }
513
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000514 if (use_x11) {
515 sources += [
516 "x11windowpicker.cc",
517 "x11windowpicker.h",
518 ]
519 libs += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000520 "dl",
521 "rt",
522 "Xext",
523 "X11",
524 "Xcomposite",
525 "Xrender",
526 ]
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000527 }
528
529 if (is_linux) {
530 libs += [
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000531 "dl",
532 "rt",
533 ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000534 }
535
536 if (is_mac) {
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000537 sources += [
538 "maccocoathreadhelper.h",
539 "maccocoathreadhelper.mm",
540 "macconversion.cc",
541 "macconversion.h",
542 "macutils.cc",
543 "macutils.h",
544 ]
545
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000546 all_dependent_configs = [ ":mac_config" ]
547
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000548 if (cpu_arch == "x86") {
549 all_dependent_configs += [ ":mac_x86_config" ]
550 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000551 }
552
553 if (is_win) {
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000554 sources += [
555 "schanneladapter.cc",
556 "schanneladapter.h",
557 "win32.cc",
558 "win32.h",
559 "win32filesystem.cc",
560 "win32filesystem.h",
561 "win32securityerrors.cc",
562 "win32window.cc",
563 "win32window.h",
564 "win32windowpicker.cc",
565 "win32windowpicker.h",
566 "winfirewall.cc",
567 "winfirewall.h",
568 "winping.cc",
569 "winping.h",
570 ]
571
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000572 libs += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000573 "crypt32.lib",
574 "iphlpapi.lib",
575 "secur32.lib",
576 ]
577
578 cflags += [
579 # Suppress warnings about WIN32_LEAN_AND_MEAN.
580 "/wd4005",
581 "/wd4703",
582 ]
583
584 defines += [ "_CRT_NONSTDC_NO_DEPRECATE" ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000585 }
586
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000587 if (is_posix && is_debug) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000588 # The Chromium build/common.gypi defines this for all posix
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000589 # _except_ for ios & mac. We want it there as well, e.g.
590 # because ASSERT and friends trigger off of it.
591 defines += [ "_DEBUG" ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000592 }
593
594 if (is_ios || (is_mac && cpu_arch != "x86")) {
595 defines += [ "CARBON_DEPRECATED=YES" ]
596 }
597
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000598 if (is_linux || is_android) {
599 sources += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000600 "linux.cc",
601 "linux.h",
602 ]
603 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000604}