blob: 5ded359d982bcf578cf634ddafe7b3b3e1745bd1 [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") {
52 ldflags = [
53 #"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") {
61 ldflags = [
62 "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.org6ae5a6d2014-09-16 01:03:29 +0000116 "stringencode.cc",
117 "stringencode.h",
118 "stringutils.cc",
119 "stringutils.h",
pbos@webrtc.org38344ed2014-09-24 06:05:00 +0000120 "thread_annotations.h",
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +0000121 "timeutils.cc",
122 "timeutils.h",
123 ]
124}
125
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000126static_library("webrtc_base") {
127 cflags = []
128 cflags_cc = []
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000129 libs = []
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +0000130 deps = [
131 ":rtc_base_approved",
132 ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000133
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000134 configs += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000135 "..:common_config",
136 ":webrtc_base_config",
137 ]
138
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000139 public_configs = [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000140 "..:common_inherited_config",
141 ":webrtc_base_config",
142 ]
143
144 defines = [
145 "LOGGING=1",
146 "USE_WEBRTC_DEV_BRANCH",
147 ]
148
149 sources = [
150 "asyncfile.cc",
151 "asyncfile.h",
152 "asynchttprequest.cc",
153 "asynchttprequest.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000154 "asyncpacketsocket.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000155 "asyncsocket.cc",
156 "asyncsocket.h",
157 "asynctcpsocket.cc",
158 "asynctcpsocket.h",
159 "asyncudpsocket.cc",
160 "asyncudpsocket.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000161 "autodetectproxy.cc",
162 "autodetectproxy.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000163 "base64.cc",
164 "base64.h",
165 "basicdefs.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000166 "bytebuffer.cc",
167 "bytebuffer.h",
168 "byteorder.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000169 "common.cc",
170 "common.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000171 "cpumonitor.cc",
172 "cpumonitor.h",
173 "crc32.cc",
174 "crc32.h",
175 "criticalsection.h",
176 "cryptstring.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000177 "diskcache.cc",
178 "diskcache.h",
179 "event.cc",
180 "event.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000181 "fileutils.cc",
182 "fileutils.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000183 "firewallsocketserver.cc",
184 "firewallsocketserver.h",
185 "flags.cc",
186 "flags.h",
pkasting@chromium.org4591fbd2014-11-20 22:28:14 +0000187 "format_macros.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000188 "gunit_prod.h",
189 "helpers.cc",
190 "helpers.h",
191 "httpbase.cc",
192 "httpbase.h",
193 "httpclient.cc",
194 "httpclient.h",
195 "httpcommon-inl.h",
196 "httpcommon.cc",
197 "httpcommon.h",
198 "httprequest.cc",
199 "httprequest.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000200 "iosfilesystem.mm",
201 "ipaddress.cc",
202 "ipaddress.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000203 "linked_ptr.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000204 "mathutils.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000205 "messagedigest.cc",
206 "messagedigest.h",
207 "messagehandler.cc",
208 "messagehandler.h",
209 "messagequeue.cc",
210 "messagequeue.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000211 "nethelpers.cc",
212 "nethelpers.h",
213 "network.cc",
214 "network.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000215 "nullsocketserver.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000216 "pathutils.cc",
217 "pathutils.h",
218 "physicalsocketserver.cc",
219 "physicalsocketserver.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000220 "proxydetect.cc",
221 "proxydetect.h",
222 "proxyinfo.cc",
223 "proxyinfo.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000224 "ratelimiter.cc",
225 "ratelimiter.h",
226 "ratetracker.cc",
227 "ratetracker.h",
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000228 "safe_conversions.h",
229 "safe_conversions_impl.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000230 "scoped_autorelease_pool.h",
231 "scoped_autorelease_pool.mm",
232 "scoped_ptr.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000233 "sha1.cc",
234 "sha1.h",
235 "sha1digest.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000236 "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",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000255 "sslfingerprint.cc",
256 "sslfingerprint.h",
257 "sslidentity.cc",
258 "sslidentity.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000259 "sslsocketfactory.cc",
260 "sslsocketfactory.h",
261 "sslstreamadapter.cc",
262 "sslstreamadapter.h",
263 "sslstreamadapterhelper.cc",
264 "sslstreamadapterhelper.h",
265 "stream.cc",
266 "stream.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000267 "systeminfo.cc",
268 "systeminfo.h",
269 "task.cc",
270 "task.h",
271 "taskparent.cc",
272 "taskparent.h",
273 "taskrunner.cc",
274 "taskrunner.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000275 "thread.cc",
276 "thread.h",
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000277 "thread_checker.h",
278 "thread_checker_impl.cc",
279 "thread_checker_impl.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000280 "timing.cc",
281 "timing.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000282 "urlencode.cc",
283 "urlencode.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000284 "worker.cc",
285 "worker.h",
286 ]
287
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000288 if (is_posix) {
289 sources += [
290 "unixfilesystem.cc",
291 "unixfilesystem.h",
292 ]
293 }
294
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000295 if (build_with_chromium) {
296 sources += [
297 "../overrides/webrtc/base/basictypes.h",
298 "../overrides/webrtc/base/constructormagic.h",
299 "../overrides/webrtc/base/logging.cc",
300 "../overrides/webrtc/base/logging.h",
301 ]
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000302
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000303 if (is_win) {
304 sources += [ "../overrides/webrtc/base/win32socketinit.cc" ]
305 }
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000306
307 include_dirs = [
308 "../overrides",
henrike@webrtc.org6ac22e62014-08-11 21:06:30 +0000309 "../../boringssl/src/include",
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000310 ]
311
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000312 public_configs += [ ":webrtc_base_chromium_config" ]
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000313 } else {
314 sources += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000315 "asyncinvoker.cc",
316 "asyncinvoker.h",
317 "asyncinvoker-inl.h",
318 "asyncresolverinterface.h",
319 "atomicops.h",
320 "bandwidthsmoother.cc",
321 "bandwidthsmoother.h",
322 "basictypes.h",
323 "bind.h",
324 "bind.h.pump",
325 "buffer.h",
326 "callback.h",
327 "callback.h.pump",
328 "constructormagic.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000329 "filelock.cc",
330 "filelock.h",
331 "fileutils_mock.h",
332 "genericslot.h",
333 "genericslot.h.pump",
334 "httpserver.cc",
335 "httpserver.h",
336 "json.cc",
337 "json.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000338 "logging.cc",
339 "logging.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000340 "mathutils.h",
341 "multipart.cc",
342 "multipart.h",
343 "natserver.cc",
344 "natserver.h",
345 "natsocketfactory.cc",
346 "natsocketfactory.h",
347 "nattypes.cc",
348 "nattypes.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000349 "optionsfile.cc",
350 "optionsfile.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000351 "profiler.cc",
352 "profiler.h",
353 "proxyserver.cc",
354 "proxyserver.h",
355 "refcount.h",
356 "referencecountedsingletonfactory.h",
357 "rollingaccumulator.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000358 "scopedptrcollection.h",
359 "scoped_ref_ptr.h",
360 "sec_buffer.h",
361 "sharedexclusivelock.cc",
362 "sharedexclusivelock.h",
363 "sslconfig.h",
364 "sslroots.h",
365 "stringdigest.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000366 "testclient.cc",
367 "testclient.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000368 "transformadapter.cc",
369 "transformadapter.h",
370 "versionparsing.cc",
371 "versionparsing.h",
372 "virtualsocketserver.cc",
373 "virtualsocketserver.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000374 "window.h",
375 "windowpickerfactory.h",
376 "windowpicker.h",
377 ]
378
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000379 if (is_posix) {
380 sources += [
381 "latebindingsymboltable.cc",
382 "latebindingsymboltable.cc.def",
383 "latebindingsymboltable.h",
384 "latebindingsymboltable.h.def",
385 "posix.cc",
386 "posix.h",
387 ]
388 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000389
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000390 if (is_linux) {
391 sources += [
392 "dbus.cc",
393 "dbus.h",
394 "libdbusglibsymboltable.cc",
395 "libdbusglibsymboltable.h",
396 "linuxfdwalk.c",
397 "linuxfdwalk.h",
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +0000398 ]
399 }
400
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000401 if (is_mac) {
402 sources += [
403 "macasyncsocket.cc",
404 "macasyncsocket.h",
405 "maccocoasocketserver.h",
406 "maccocoasocketserver.mm",
407 "macsocketserver.cc",
408 "macsocketserver.h",
409 "macwindowpicker.cc",
410 "macwindowpicker.h",
411 ]
412 }
413
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000414 if (is_win) {
415 sources += [
416 "diskcache_win32.cc",
417 "diskcache_win32.h",
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000418 "win32regkey.cc",
419 "win32regkey.h",
420 "win32socketinit.cc",
421 "win32socketinit.h",
422 "win32socketserver.cc",
423 "win32socketserver.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000424 ]
425 }
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000426 if (rtc_build_json) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000427 deps += [ "//third_party/jsoncpp" ]
428 } else {
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000429 include_dirs += [ rtc_jsoncpp_root ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000430
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000431 # When defined changes the include path for json.h to where it is
432 # expected to be when building json outside of the standalone build.
433 defines += [ "WEBRTC_EXTERNAL_JSON" ]
434 }
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000435 } # !build_with_chromium
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000436
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000437 if (is_clang) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000438 # Suppress warnings from the Chrome Clang plugins.
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000439 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
440 configs -= [ "//build/config/clang:find_bad_constructs" ]
441 }
442
kjellander@webrtc.org62711f82014-06-29 13:37:08 +0000443 # TODO(henrike): issue 3307, make webrtc_base build with the Chromium default
444 # compiler settings.
445 configs -= [ "//build/config/compiler:chromium_code" ]
446 configs += [ "//build/config/compiler:no_chromium_code" ]
447 cflags += [ "-Wno-uninitialized" ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000448 cflags_cc += [ "-Wno-non-virtual-dtor" ]
449
450 if (use_openssl) {
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000451 public_configs += [ ":openssl_config" ]
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000452 if (rtc_build_ssl) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000453 deps += [ "//third_party/boringssl" ]
454 } else {
455 configs += [ "external_ssl_library" ]
456 }
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000457 sources += [
458 "openssl.h",
459 "openssladapter.cc",
460 "openssladapter.h",
461 "openssldigest.cc",
462 "openssldigest.h",
463 "opensslidentity.cc",
464 "opensslidentity.h",
465 "opensslstreamadapter.cc",
466 "opensslstreamadapter.h",
467 ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000468 } else {
henrike@webrtc.org33a0e2d2014-10-27 18:13:40 +0000469 public_configs += [ ":nss_config" ]
470 if (rtc_build_ssl) {
471 if (build_with_chromium) {
472 deps += [ "//crypto:platform" ]
473 } else {
474 deps += [ "//net/third_party/nss/ssl:libssl" ]
475 if (is_linux) {
476 deps += [ ":linux_system_ssl" ]
477 } else {
478 deps += [
479 "//third_party/nss:nspr",
480 "//third_party/nss:nss",
481 ]
482 }
483 }
484 } else {
485 configs += [ "external_ssl_library" ]
486 }
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000487 sources += [
488 "nssidentity.cc",
489 "nssidentity.h",
490 "nssstreamadapter.cc",
491 "nssstreamadapter.h",
492 ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000493 }
494
495 if (is_android) {
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000496 sources += [
497 "ifaddrs-android.cc",
498 "ifaddrs-android.h",
499 ]
500
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000501 libs += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000502 "log",
503 "GLESv2"
504 ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000505 }
506
507 if (is_ios) {
508 all_dependent_configs += [ ":ios_config" ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000509 }
510
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000511 if (use_x11) {
512 sources += [
513 "x11windowpicker.cc",
514 "x11windowpicker.h",
515 ]
516 libs += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000517 "dl",
518 "rt",
519 "Xext",
520 "X11",
521 "Xcomposite",
522 "Xrender",
523 ]
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000524 }
525
526 if (is_linux) {
527 libs += [
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000528 "dl",
529 "rt",
530 ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000531 }
532
533 if (is_mac) {
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000534 sources += [
535 "maccocoathreadhelper.h",
536 "maccocoathreadhelper.mm",
537 "macconversion.cc",
538 "macconversion.h",
539 "macutils.cc",
540 "macutils.h",
541 ]
542
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000543 all_dependent_configs = [ ":mac_config" ]
544
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000545 if (cpu_arch == "x86") {
546 all_dependent_configs += [ ":mac_x86_config" ]
547 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000548 }
549
550 if (is_win) {
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000551 sources += [
552 "schanneladapter.cc",
553 "schanneladapter.h",
554 "win32.cc",
555 "win32.h",
556 "win32filesystem.cc",
557 "win32filesystem.h",
558 "win32securityerrors.cc",
559 "win32window.cc",
560 "win32window.h",
561 "win32windowpicker.cc",
562 "win32windowpicker.h",
563 "winfirewall.cc",
564 "winfirewall.h",
565 "winping.cc",
566 "winping.h",
567 ]
568
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000569 libs += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000570 "crypt32.lib",
571 "iphlpapi.lib",
572 "secur32.lib",
573 ]
574
575 cflags += [
576 # Suppress warnings about WIN32_LEAN_AND_MEAN.
577 "/wd4005",
578 "/wd4703",
579 ]
580
581 defines += [ "_CRT_NONSTDC_NO_DEPRECATE" ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000582 }
583
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000584 if (is_posix && is_debug) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000585 # The Chromium build/common.gypi defines this for all posix
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000586 # _except_ for ios & mac. We want it there as well, e.g.
587 # because ASSERT and friends trigger off of it.
588 defines += [ "_DEBUG" ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000589 }
590
591 if (is_ios || (is_mac && cpu_arch != "x86")) {
592 defines += [ "CARBON_DEPRECATED=YES" ]
593 }
594
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000595 if (is_linux || is_android) {
596 sources += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000597 "linux.cc",
598 "linux.h",
599 ]
600 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000601}