blob: be53e40fd9cc2eb2d82cb6908a58a85e5f3f4679 [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
pbos@webrtc.org77d5a572014-10-07 11:43:03 +000043config("no_openssl_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 {
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000468 public_configs += [ ":no_openssl_config" ]
pthatcher@webrtc.org5d0071f2014-09-26 18:53:40 +0000469 sources += [
470 "nssidentity.cc",
471 "nssidentity.h",
472 "nssstreamadapter.cc",
473 "nssstreamadapter.h",
474 ]
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000475 if (is_mac || is_ios || is_win) {
476 if (rtc_build_ssl) {
477 deps += [
478 "//net/third_party/nss/ssl:libssl",
479 "//third_party/nss:nspr",
480 "//third_party/nss:nss",
481 ]
482 } else {
483 configs += [ "external_ssl_library" ]
484 }
485 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000486 }
487
488 if (is_android) {
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000489 sources += [
490 "ifaddrs-android.cc",
491 "ifaddrs-android.h",
492 ]
493
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000494 libs += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000495 "log",
496 "GLESv2"
497 ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000498 }
499
500 if (is_ios) {
501 all_dependent_configs += [ ":ios_config" ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000502 }
503
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000504 if (use_x11) {
505 sources += [
506 "x11windowpicker.cc",
507 "x11windowpicker.h",
508 ]
509 libs += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000510 "dl",
511 "rt",
512 "Xext",
513 "X11",
514 "Xcomposite",
515 "Xrender",
516 ]
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000517 }
518
519 if (is_linux) {
520 libs += [
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000521 "crypto",
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000522 "dl",
523 "rt",
524 ]
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000525 if (rtc_build_ssl) {
526 configs += [ "//third_party/nss:system_nss_no_ssl_config" ]
527 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000528 }
529
530 if (is_mac) {
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000531 sources += [
532 "maccocoathreadhelper.h",
533 "maccocoathreadhelper.mm",
534 "macconversion.cc",
535 "macconversion.h",
536 "macutils.cc",
537 "macutils.h",
538 ]
539
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000540 all_dependent_configs = [ ":mac_config" ]
541
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000542 if (cpu_arch == "x86") {
543 all_dependent_configs += [ ":mac_x86_config" ]
544 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000545 }
546
547 if (is_win) {
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000548 sources += [
549 "schanneladapter.cc",
550 "schanneladapter.h",
551 "win32.cc",
552 "win32.h",
553 "win32filesystem.cc",
554 "win32filesystem.h",
555 "win32securityerrors.cc",
556 "win32window.cc",
557 "win32window.h",
558 "win32windowpicker.cc",
559 "win32windowpicker.h",
560 "winfirewall.cc",
561 "winfirewall.h",
562 "winping.cc",
563 "winping.h",
564 ]
565
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000566 libs += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000567 "crypt32.lib",
568 "iphlpapi.lib",
569 "secur32.lib",
570 ]
571
572 cflags += [
573 # Suppress warnings about WIN32_LEAN_AND_MEAN.
574 "/wd4005",
575 "/wd4703",
576 ]
577
578 defines += [ "_CRT_NONSTDC_NO_DEPRECATE" ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000579 }
580
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000581 if (is_posix && is_debug) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000582 # The Chromium build/common.gypi defines this for all posix
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000583 # _except_ for ios & mac. We want it there as well, e.g.
584 # because ASSERT and friends trigger off of it.
585 defines += [ "_DEBUG" ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000586 }
587
588 if (is_ios || (is_mac && cpu_arch != "x86")) {
589 defines += [ "CARBON_DEPRECATED=YES" ]
590 }
591
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000592 if (is_linux || is_android) {
593 sources += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000594 "linux.cc",
595 "linux.h",
596 ]
597 }
pbos@webrtc.org77d5a572014-10-07 11:43:03 +0000598
599 if (is_posix && !is_mac && !is_ios && !is_android) {
600 if (build_with_chromium) {
601 deps += [ "//crypto:platform" ]
602 } else {
603 if (rtc_build_ssl) {
604 deps += [ ":linux_system_ssl" ]
605 } else {
606 configs += [ "external_ssl_library" ]
607 }
608 }
609 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000610}