blob: 1c2527af510f10a16853bf009961d5b293c2c6d9 [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",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000187 "gunit_prod.h",
188 "helpers.cc",
189 "helpers.h",
190 "httpbase.cc",
191 "httpbase.h",
192 "httpclient.cc",
193 "httpclient.h",
194 "httpcommon-inl.h",
195 "httpcommon.cc",
196 "httpcommon.h",
197 "httprequest.cc",
198 "httprequest.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000199 "iosfilesystem.mm",
200 "ipaddress.cc",
201 "ipaddress.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000202 "linked_ptr.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000203 "mathutils.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000204 "messagedigest.cc",
205 "messagedigest.h",
206 "messagehandler.cc",
207 "messagehandler.h",
208 "messagequeue.cc",
209 "messagequeue.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000210 "nethelpers.cc",
211 "nethelpers.h",
212 "network.cc",
213 "network.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000214 "nullsocketserver.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000215 "pathutils.cc",
216 "pathutils.h",
217 "physicalsocketserver.cc",
218 "physicalsocketserver.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000219 "proxydetect.cc",
220 "proxydetect.h",
221 "proxyinfo.cc",
222 "proxyinfo.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000223 "ratelimiter.cc",
224 "ratelimiter.h",
225 "ratetracker.cc",
226 "ratetracker.h",
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000227 "safe_conversions.h",
228 "safe_conversions_impl.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000229 "scoped_autorelease_pool.h",
230 "scoped_autorelease_pool.mm",
231 "scoped_ptr.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000232 "sha1.cc",
233 "sha1.h",
234 "sha1digest.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000235 "signalthread.cc",
236 "signalthread.h",
237 "sigslot.h",
238 "sigslotrepeater.h",
239 "socket.h",
240 "socketadapters.cc",
241 "socketadapters.h",
242 "socketaddress.cc",
243 "socketaddress.h",
244 "socketaddresspair.cc",
245 "socketaddresspair.h",
246 "socketfactory.h",
247 "socketpool.cc",
248 "socketpool.h",
249 "socketserver.h",
250 "socketstream.cc",
251 "socketstream.h",
252 "ssladapter.cc",
253 "ssladapter.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000254 "sslfingerprint.cc",
255 "sslfingerprint.h",
256 "sslidentity.cc",
257 "sslidentity.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000258 "sslsocketfactory.cc",
259 "sslsocketfactory.h",
260 "sslstreamadapter.cc",
261 "sslstreamadapter.h",
262 "sslstreamadapterhelper.cc",
263 "sslstreamadapterhelper.h",
264 "stream.cc",
265 "stream.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000266 "systeminfo.cc",
267 "systeminfo.h",
268 "task.cc",
269 "task.h",
270 "taskparent.cc",
271 "taskparent.h",
272 "taskrunner.cc",
273 "taskrunner.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000274 "thread.cc",
275 "thread.h",
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000276 "thread_checker.h",
277 "thread_checker_impl.cc",
278 "thread_checker_impl.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000279 "timing.cc",
280 "timing.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000281 "urlencode.cc",
282 "urlencode.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000283 "worker.cc",
284 "worker.h",
285 ]
286
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000287 if (is_posix) {
288 sources += [
289 "unixfilesystem.cc",
290 "unixfilesystem.h",
291 ]
292 }
293
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000294 if (build_with_chromium) {
295 sources += [
296 "../overrides/webrtc/base/basictypes.h",
297 "../overrides/webrtc/base/constructormagic.h",
298 "../overrides/webrtc/base/logging.cc",
299 "../overrides/webrtc/base/logging.h",
300 ]
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000301
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000302 if (is_win) {
303 sources += [ "../overrides/webrtc/base/win32socketinit.cc" ]
304 }
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000305
306 include_dirs = [
307 "../overrides",
henrike@webrtc.org6ac22e62014-08-11 21:06:30 +0000308 "../../boringssl/src/include",
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000309 ]
310
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000311 public_configs += [ ":webrtc_base_chromium_config" ]
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000312 } else {
313 sources += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000314 "asyncinvoker.cc",
315 "asyncinvoker.h",
316 "asyncinvoker-inl.h",
317 "asyncresolverinterface.h",
318 "atomicops.h",
319 "bandwidthsmoother.cc",
320 "bandwidthsmoother.h",
321 "basictypes.h",
322 "bind.h",
323 "bind.h.pump",
324 "buffer.h",
325 "callback.h",
326 "callback.h.pump",
327 "constructormagic.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000328 "filelock.cc",
329 "filelock.h",
330 "fileutils_mock.h",
331 "genericslot.h",
332 "genericslot.h.pump",
333 "httpserver.cc",
334 "httpserver.h",
335 "json.cc",
336 "json.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000337 "logging.cc",
338 "logging.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000339 "mathutils.h",
340 "multipart.cc",
341 "multipart.h",
342 "natserver.cc",
343 "natserver.h",
344 "natsocketfactory.cc",
345 "natsocketfactory.h",
346 "nattypes.cc",
347 "nattypes.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000348 "optionsfile.cc",
349 "optionsfile.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000350 "profiler.cc",
351 "profiler.h",
352 "proxyserver.cc",
353 "proxyserver.h",
354 "refcount.h",
355 "referencecountedsingletonfactory.h",
356 "rollingaccumulator.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000357 "scopedptrcollection.h",
358 "scoped_ref_ptr.h",
359 "sec_buffer.h",
360 "sharedexclusivelock.cc",
361 "sharedexclusivelock.h",
362 "sslconfig.h",
363 "sslroots.h",
364 "stringdigest.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000365 "testclient.cc",
366 "testclient.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000367 "transformadapter.cc",
368 "transformadapter.h",
369 "versionparsing.cc",
370 "versionparsing.h",
371 "virtualsocketserver.cc",
372 "virtualsocketserver.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000373 "window.h",
374 "windowpickerfactory.h",
375 "windowpicker.h",
376 ]
377
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000378 if (is_posix) {
379 sources += [
380 "latebindingsymboltable.cc",
381 "latebindingsymboltable.cc.def",
382 "latebindingsymboltable.h",
383 "latebindingsymboltable.h.def",
384 "posix.cc",
385 "posix.h",
386 ]
387 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000388
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000389 if (is_linux) {
390 sources += [
391 "dbus.cc",
392 "dbus.h",
393 "libdbusglibsymboltable.cc",
394 "libdbusglibsymboltable.h",
395 "linuxfdwalk.c",
396 "linuxfdwalk.h",
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +0000397 ]
398 }
399
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000400 if (is_mac) {
401 sources += [
402 "macasyncsocket.cc",
403 "macasyncsocket.h",
404 "maccocoasocketserver.h",
405 "maccocoasocketserver.mm",
406 "macsocketserver.cc",
407 "macsocketserver.h",
408 "macwindowpicker.cc",
409 "macwindowpicker.h",
410 ]
411 }
412
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000413 if (is_win) {
414 sources += [
415 "diskcache_win32.cc",
416 "diskcache_win32.h",
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000417 "win32regkey.cc",
418 "win32regkey.h",
419 "win32socketinit.cc",
420 "win32socketinit.h",
421 "win32socketserver.cc",
422 "win32socketserver.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000423 ]
424 }
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000425 if (rtc_build_json) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000426 deps += [ "//third_party/jsoncpp" ]
427 } else {
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000428 include_dirs += [ rtc_jsoncpp_root ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000429
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000430 # When defined changes the include path for json.h to where it is
431 # expected to be when building json outside of the standalone build.
432 defines += [ "WEBRTC_EXTERNAL_JSON" ]
433 }
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000434 } # !build_with_chromium
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000435
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000436 if (is_clang) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000437 # Suppress warnings from the Chrome Clang plugins.
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000438 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
439 configs -= [ "//build/config/clang:find_bad_constructs" ]
440 }
441
kjellander@webrtc.org62711f82014-06-29 13:37:08 +0000442 # TODO(henrike): issue 3307, make webrtc_base build with the Chromium default
443 # compiler settings.
444 configs -= [ "//build/config/compiler:chromium_code" ]
445 configs += [ "//build/config/compiler:no_chromium_code" ]
446 cflags += [ "-Wno-uninitialized" ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000447 cflags_cc += [ "-Wno-non-virtual-dtor" ]
448
449 if (use_openssl) {
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000450 public_configs += [ ":openssl_config" ]
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000451 if (rtc_build_ssl) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000452 deps += [ "//third_party/boringssl" ]
453 } else {
454 configs += [ "external_ssl_library" ]
455 }
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000456 sources += [
457 "openssl.h",
458 "openssladapter.cc",
459 "openssladapter.h",
460 "openssldigest.cc",
461 "openssldigest.h",
462 "opensslidentity.cc",
463 "opensslidentity.h",
464 "opensslstreamadapter.cc",
465 "opensslstreamadapter.h",
466 ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000467 } else {
henrike@webrtc.org33a0e2d2014-10-27 18:13:40 +0000468 public_configs += [ ":nss_config" ]
469 if (rtc_build_ssl) {
470 if (build_with_chromium) {
471 deps += [ "//crypto:platform" ]
472 } else {
473 deps += [ "//net/third_party/nss/ssl:libssl" ]
474 if (is_linux) {
475 deps += [ ":linux_system_ssl" ]
476 } else {
477 deps += [
478 "//third_party/nss:nspr",
479 "//third_party/nss:nss",
480 ]
481 }
482 }
483 } else {
484 configs += [ "external_ssl_library" ]
485 }
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000486 sources += [
487 "nssidentity.cc",
488 "nssidentity.h",
489 "nssstreamadapter.cc",
490 "nssstreamadapter.h",
491 ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000492 }
493
494 if (is_android) {
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000495 sources += [
496 "ifaddrs-android.cc",
497 "ifaddrs-android.h",
498 ]
499
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000500 libs += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000501 "log",
502 "GLESv2"
503 ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000504 }
505
506 if (is_ios) {
507 all_dependent_configs += [ ":ios_config" ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000508 }
509
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000510 if (use_x11) {
511 sources += [
512 "x11windowpicker.cc",
513 "x11windowpicker.h",
514 ]
515 libs += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000516 "dl",
517 "rt",
518 "Xext",
519 "X11",
520 "Xcomposite",
521 "Xrender",
522 ]
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000523 }
524
525 if (is_linux) {
526 libs += [
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000527 "dl",
528 "rt",
529 ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000530 }
531
532 if (is_mac) {
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000533 sources += [
534 "maccocoathreadhelper.h",
535 "maccocoathreadhelper.mm",
536 "macconversion.cc",
537 "macconversion.h",
538 "macutils.cc",
539 "macutils.h",
540 ]
541
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000542 all_dependent_configs = [ ":mac_config" ]
543
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000544 if (cpu_arch == "x86") {
545 all_dependent_configs += [ ":mac_x86_config" ]
546 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000547 }
548
549 if (is_win) {
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000550 sources += [
551 "schanneladapter.cc",
552 "schanneladapter.h",
553 "win32.cc",
554 "win32.h",
555 "win32filesystem.cc",
556 "win32filesystem.h",
557 "win32securityerrors.cc",
558 "win32window.cc",
559 "win32window.h",
560 "win32windowpicker.cc",
561 "win32windowpicker.h",
562 "winfirewall.cc",
563 "winfirewall.h",
564 "winping.cc",
565 "winping.h",
566 ]
567
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000568 libs += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000569 "crypt32.lib",
570 "iphlpapi.lib",
571 "secur32.lib",
572 ]
573
574 cflags += [
575 # Suppress warnings about WIN32_LEAN_AND_MEAN.
576 "/wd4005",
577 "/wd4703",
578 ]
579
580 defines += [ "_CRT_NONSTDC_NO_DEPRECATE" ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000581 }
582
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000583 if (is_posix && is_debug) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000584 # The Chromium build/common.gypi defines this for all posix
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000585 # _except_ for ios & mac. We want it there as well, e.g.
586 # because ASSERT and friends trigger off of it.
587 defines += [ "_DEBUG" ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000588 }
589
590 if (is_ios || (is_mac && cpu_arch != "x86")) {
591 defines += [ "CARBON_DEPRECATED=YES" ]
592 }
593
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000594 if (is_linux || is_android) {
595 sources += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000596 "linux.cc",
597 "linux.h",
598 ]
599 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000600}