blob: 17cd3afee0e3e14d592b0aef095939d3c12022e7 [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",
33 "SSL_USE_NSS",
34 ]
35}
36
37config("openssl_config") {
38 defines = [
39 "SSL_USE_OPENSSL",
40 "HAVE_OPENSSL_SSL_H",
41 ]
42}
43
44config("no_openssl_config") {
45 defines = [
46 "SSL_USE_NSS",
47 "HAVE_NSS_SSL_H",
48 "SSL_USE_NSS_RNG",
49 ]
50}
51
52config("android_config") {
53 defines = [ "HAVE_OPENSSL_SSL_H" ]
54}
55
56config("no_android_config") {
57 defines = [
58 "HAVE_NSS_SSL_H",
59 "SSL_USE_NSS_RNG",
60 ]
61}
62
63config("ios_config") {
64 ldflags = [
65 #"Foundation.framework", # Already included in //build/config:default_libs.
66 "Security.framework",
67 "SystemConfiguration.framework",
68 #"UIKit.framework", # Already included in //build/config:default_libs.
69 ]
70}
71
72config("mac_config") {
73 ldflags = [
74 "Cocoa.framework",
75 #"Foundation.framework", # Already included in //build/config:default_libs.
76 #"IOKit.framework", # Already included in //build/config:default_libs.
77 #"Security.framework", # Already included in //build/config:default_libs.
78 "SystemConfiguration.framework",
79 ]
80}
81
82config("mac_x86_config") {
83 libs = [
84 #"Carbon.framework", # Already included in //build/config:default_libs.
85 ]
86}
87
kjellander@webrtc.org4a251992014-08-18 17:56:28 +000088if (is_linux && !build_with_chromium) {
89 # Provides the same functionality as the //crypto:platform target, which
90 # WebRTC cannot use as we don't sync src/crypto from Chromium.
91 group("linux_system_ssl") {
92 if (use_openssl) {
93 deps = [ "//third_party/boringssl" ]
94 } else {
95 deps = [ "//net/third_party/nss/ssl:libssl" ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +000096
kjellander@webrtc.org4a251992014-08-18 17:56:28 +000097 direct_dependent_configs = [
98 "//net/third_party/nss/ssl:ssl_config",
99 "//third_party/nss:system_nss_no_ssl_config",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000100 ]
101 }
102 }
103}
104
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000105if (rtc_build_ssl == 0) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000106 config("external_ssl_library") {
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000107 assert(rtc_ssl_root != "",
108 "You must specify rtc_ssl_root when rtc_build_ssl==0.")
109 include_dirs = [ rtc_ssl_root ]
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000110 }
111}
kjellander@webrtc.org4a251992014-08-18 17:56:28 +0000112
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +0000113# The subset of rtc_base approved for use outside of libjingle.
114static_library("rtc_base_approved") {
115 configs += [ "..:common_config" ]
116 direct_dependent_configs = [ "..:common_inherited_config" ]
117
118 sources = [
119 "checks.cc",
120 "checks.h",
121 "exp_filter.cc",
122 "exp_filter.h",
123 "md5.cc",
124 "md5.h",
125 "md5digest.h",
126 "stringencode.cc",
127 "stringencode.h",
128 "stringutils.cc",
129 "stringutils.h",
130 "timeutils.cc",
131 "timeutils.h",
132 ]
133}
134
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000135static_library("webrtc_base") {
136 cflags = []
137 cflags_cc = []
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000138 libs = []
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +0000139 deps = [
140 ":rtc_base_approved",
141 ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000142
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000143 configs += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000144 "..:common_config",
145 ":webrtc_base_config",
146 ]
147
148 direct_dependent_configs = [
149 "..:common_inherited_config",
150 ":webrtc_base_config",
151 ]
152
153 defines = [
154 "LOGGING=1",
155 "USE_WEBRTC_DEV_BRANCH",
156 ]
157
158 sources = [
159 "asyncfile.cc",
160 "asyncfile.h",
161 "asynchttprequest.cc",
162 "asynchttprequest.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000163 "asyncpacketsocket.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000164 "asyncsocket.cc",
165 "asyncsocket.h",
166 "asynctcpsocket.cc",
167 "asynctcpsocket.h",
168 "asyncudpsocket.cc",
169 "asyncudpsocket.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000170 "autodetectproxy.cc",
171 "autodetectproxy.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000172 "base64.cc",
173 "base64.h",
174 "basicdefs.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000175 "bytebuffer.cc",
176 "bytebuffer.h",
177 "byteorder.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000178 "checks.cc",
179 "checks.h",
180 "common.cc",
181 "common.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000182 "cpumonitor.cc",
183 "cpumonitor.h",
184 "crc32.cc",
185 "crc32.h",
186 "criticalsection.h",
187 "cryptstring.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000188 "diskcache.cc",
189 "diskcache.h",
190 "event.cc",
191 "event.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000192 "fileutils.cc",
193 "fileutils.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000194 "firewallsocketserver.cc",
195 "firewallsocketserver.h",
196 "flags.cc",
197 "flags.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000198 "gunit_prod.h",
199 "helpers.cc",
200 "helpers.h",
201 "httpbase.cc",
202 "httpbase.h",
203 "httpclient.cc",
204 "httpclient.h",
205 "httpcommon-inl.h",
206 "httpcommon.cc",
207 "httpcommon.h",
208 "httprequest.cc",
209 "httprequest.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000210 "iosfilesystem.mm",
211 "ipaddress.cc",
212 "ipaddress.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000213 "linked_ptr.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000214 "mathutils.h",
215 "md5.cc",
216 "md5.h",
217 "md5digest.h",
218 "messagedigest.cc",
219 "messagedigest.h",
220 "messagehandler.cc",
221 "messagehandler.h",
222 "messagequeue.cc",
223 "messagequeue.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000224 "nethelpers.cc",
225 "nethelpers.h",
226 "network.cc",
227 "network.h",
228 "nssidentity.cc",
229 "nssidentity.h",
230 "nssstreamadapter.cc",
231 "nssstreamadapter.h",
232 "nullsocketserver.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000233 "pathutils.cc",
234 "pathutils.h",
235 "physicalsocketserver.cc",
236 "physicalsocketserver.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000237 "proxydetect.cc",
238 "proxydetect.h",
239 "proxyinfo.cc",
240 "proxyinfo.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000241 "ratelimiter.cc",
242 "ratelimiter.h",
243 "ratetracker.cc",
244 "ratetracker.h",
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000245 "safe_conversions.h",
246 "safe_conversions_impl.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000247 "scoped_autorelease_pool.h",
248 "scoped_autorelease_pool.mm",
249 "scoped_ptr.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000250 "sha1.cc",
251 "sha1.h",
252 "sha1digest.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000253 "signalthread.cc",
254 "signalthread.h",
255 "sigslot.h",
256 "sigslotrepeater.h",
257 "socket.h",
258 "socketadapters.cc",
259 "socketadapters.h",
260 "socketaddress.cc",
261 "socketaddress.h",
262 "socketaddresspair.cc",
263 "socketaddresspair.h",
264 "socketfactory.h",
265 "socketpool.cc",
266 "socketpool.h",
267 "socketserver.h",
268 "socketstream.cc",
269 "socketstream.h",
270 "ssladapter.cc",
271 "ssladapter.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000272 "sslfingerprint.cc",
273 "sslfingerprint.h",
274 "sslidentity.cc",
275 "sslidentity.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000276 "sslsocketfactory.cc",
277 "sslsocketfactory.h",
278 "sslstreamadapter.cc",
279 "sslstreamadapter.h",
280 "sslstreamadapterhelper.cc",
281 "sslstreamadapterhelper.h",
282 "stream.cc",
283 "stream.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000284 "stringencode.cc",
285 "stringencode.h",
286 "stringutils.cc",
287 "stringutils.h",
288 "systeminfo.cc",
289 "systeminfo.h",
290 "task.cc",
291 "task.h",
292 "taskparent.cc",
293 "taskparent.h",
294 "taskrunner.cc",
295 "taskrunner.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000296 "thread.cc",
297 "thread.h",
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000298 "thread_checker.h",
299 "thread_checker_impl.cc",
300 "thread_checker_impl.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000301 "timeutils.cc",
302 "timeutils.h",
303 "timing.cc",
304 "timing.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000305 "urlencode.cc",
306 "urlencode.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000307 "worker.cc",
308 "worker.h",
309 ]
310
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000311 if (is_posix) {
312 sources += [
313 "unixfilesystem.cc",
314 "unixfilesystem.h",
315 ]
316 }
317
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000318 if (build_with_chromium) {
319 sources += [
320 "../overrides/webrtc/base/basictypes.h",
321 "../overrides/webrtc/base/constructormagic.h",
322 "../overrides/webrtc/base/logging.cc",
323 "../overrides/webrtc/base/logging.h",
324 ]
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000325
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000326 if (is_win) {
327 sources += [ "../overrides/webrtc/base/win32socketinit.cc" ]
328 }
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000329
330 include_dirs = [
331 "../overrides",
henrike@webrtc.org6ac22e62014-08-11 21:06:30 +0000332 "../../boringssl/src/include",
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000333 ]
334
335 direct_dependent_configs += [ ":webrtc_base_chromium_config" ]
336 } else {
337 sources += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000338 "asyncinvoker.cc",
339 "asyncinvoker.h",
340 "asyncinvoker-inl.h",
341 "asyncresolverinterface.h",
342 "atomicops.h",
343 "bandwidthsmoother.cc",
344 "bandwidthsmoother.h",
345 "basictypes.h",
346 "bind.h",
347 "bind.h.pump",
348 "buffer.h",
349 "callback.h",
350 "callback.h.pump",
351 "constructormagic.h",
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000352 "exp_filter.cc",
353 "exp_filter.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000354 "filelock.cc",
355 "filelock.h",
356 "fileutils_mock.h",
357 "genericslot.h",
358 "genericslot.h.pump",
359 "httpserver.cc",
360 "httpserver.h",
361 "json.cc",
362 "json.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000363 "logging.cc",
364 "logging.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000365 "mathutils.h",
366 "multipart.cc",
367 "multipart.h",
368 "natserver.cc",
369 "natserver.h",
370 "natsocketfactory.cc",
371 "natsocketfactory.h",
372 "nattypes.cc",
373 "nattypes.h",
374 "openssl.h",
375 "optionsfile.cc",
376 "optionsfile.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000377 "profiler.cc",
378 "profiler.h",
379 "proxyserver.cc",
380 "proxyserver.h",
381 "refcount.h",
382 "referencecountedsingletonfactory.h",
383 "rollingaccumulator.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000384 "scopedptrcollection.h",
385 "scoped_ref_ptr.h",
386 "sec_buffer.h",
387 "sharedexclusivelock.cc",
388 "sharedexclusivelock.h",
389 "sslconfig.h",
390 "sslroots.h",
391 "stringdigest.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000392 "testclient.cc",
393 "testclient.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000394 "transformadapter.cc",
395 "transformadapter.h",
396 "versionparsing.cc",
397 "versionparsing.h",
398 "virtualsocketserver.cc",
399 "virtualsocketserver.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000400 "window.h",
401 "windowpickerfactory.h",
402 "windowpicker.h",
403 ]
404
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000405 if (is_posix) {
406 sources += [
407 "latebindingsymboltable.cc",
408 "latebindingsymboltable.cc.def",
409 "latebindingsymboltable.h",
410 "latebindingsymboltable.h.def",
411 "posix.cc",
412 "posix.h",
413 ]
414 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000415
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000416 if (is_linux) {
417 sources += [
418 "dbus.cc",
419 "dbus.h",
420 "libdbusglibsymboltable.cc",
421 "libdbusglibsymboltable.h",
422 "linuxfdwalk.c",
423 "linuxfdwalk.h",
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +0000424 ]
425 }
426
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000427 if (is_mac) {
428 sources += [
429 "macasyncsocket.cc",
430 "macasyncsocket.h",
431 "maccocoasocketserver.h",
432 "maccocoasocketserver.mm",
433 "macsocketserver.cc",
434 "macsocketserver.h",
435 "macwindowpicker.cc",
436 "macwindowpicker.h",
437 ]
438 }
439
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000440 if (is_win) {
441 sources += [
442 "diskcache_win32.cc",
443 "diskcache_win32.h",
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000444 "win32regkey.cc",
445 "win32regkey.h",
446 "win32socketinit.cc",
447 "win32socketinit.h",
448 "win32socketserver.cc",
449 "win32socketserver.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000450 ]
451 }
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000452 if (rtc_build_json) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000453 deps += [ "//third_party/jsoncpp" ]
454 } else {
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000455 include_dirs += [ rtc_jsoncpp_root ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000456
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000457 # When defined changes the include path for json.h to where it is
458 # expected to be when building json outside of the standalone build.
459 defines += [ "WEBRTC_EXTERNAL_JSON" ]
460 }
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000461 } # !build_with_chromium
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000462
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000463 if (is_clang) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000464 # Suppress warnings from the Chrome Clang plugins.
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000465 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
466 configs -= [ "//build/config/clang:find_bad_constructs" ]
467 }
468
kjellander@webrtc.org62711f82014-06-29 13:37:08 +0000469 # TODO(henrike): issue 3307, make webrtc_base build with the Chromium default
470 # compiler settings.
471 configs -= [ "//build/config/compiler:chromium_code" ]
472 configs += [ "//build/config/compiler:no_chromium_code" ]
473 cflags += [ "-Wno-uninitialized" ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000474 cflags_cc += [ "-Wno-non-virtual-dtor" ]
475
476 if (use_openssl) {
477 direct_dependent_configs += [ ":openssl_config" ]
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000478 if (rtc_build_ssl) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000479 deps += [ "//third_party/boringssl" ]
480 } else {
481 configs += [ "external_ssl_library" ]
482 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000483 } else {
484 direct_dependent_configs += [ ":no_openssl_config" ]
485 }
486
487 if (is_android) {
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000488 sources += [
489 "ifaddrs-android.cc",
490 "ifaddrs-android.h",
491 ]
492
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000493 direct_dependent_configs += [ ":android_config" ]
494
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000495 libs += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000496 "log",
497 "GLESv2"
498 ]
499 } else {
500 direct_dependent_configs += [ ":no_android_config" ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000501 }
502
503 if (is_ios) {
504 all_dependent_configs += [ ":ios_config" ]
505
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000506 if (rtc_build_ssl) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000507 deps += [ "//net/third_party/nss/ssl:libssl" ]
508 } else {
509 configs += [ "external_ssl_library" ]
510 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000511 }
512
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000513 if (use_x11) {
514 sources += [
515 "x11windowpicker.cc",
516 "x11windowpicker.h",
517 ]
518 libs += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000519 "dl",
520 "rt",
521 "Xext",
522 "X11",
523 "Xcomposite",
524 "Xrender",
525 ]
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000526 }
527
528 if (is_linux) {
529 libs += [
530 "crypto",
531 "dl",
532 "rt",
533 ]
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000534 if (rtc_build_ssl) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000535 configs += [ "//third_party/nss:system_nss_no_ssl_config" ]
536 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000537 }
538
539 if (is_mac) {
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000540 sources += [
541 "maccocoathreadhelper.h",
542 "maccocoathreadhelper.mm",
543 "macconversion.cc",
544 "macconversion.h",
545 "macutils.cc",
546 "macutils.h",
547 ]
548
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000549 all_dependent_configs = [ ":mac_config" ]
550
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000551 libs += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000552 "crypto", # $(SDKROOT)/usr/lib/libcrypto.dylib
553 "ssl", # $(SDKROOT)/usr/lib/libssl.dylib
554 ]
555 if (cpu_arch == "x86") {
556 all_dependent_configs += [ ":mac_x86_config" ]
557 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000558 }
559
560 if (is_win) {
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000561 sources += [
562 "schanneladapter.cc",
563 "schanneladapter.h",
564 "win32.cc",
565 "win32.h",
566 "win32filesystem.cc",
567 "win32filesystem.h",
568 "win32securityerrors.cc",
569 "win32window.cc",
570 "win32window.h",
571 "win32windowpicker.cc",
572 "win32windowpicker.h",
573 "winfirewall.cc",
574 "winfirewall.h",
575 "winping.cc",
576 "winping.h",
577 ]
578
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000579 libs += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000580 "crypt32.lib",
581 "iphlpapi.lib",
582 "secur32.lib",
583 ]
584
585 cflags += [
586 # Suppress warnings about WIN32_LEAN_AND_MEAN.
587 "/wd4005",
588 "/wd4703",
589 ]
590
591 defines += [ "_CRT_NONSTDC_NO_DEPRECATE" ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000592 }
593
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000594 if (is_posix && is_debug) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000595 # The Chromium build/common.gypi defines this for all posix
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000596 # _except_ for ios & mac. We want it there as well, e.g.
597 # because ASSERT and friends trigger off of it.
598 defines += [ "_DEBUG" ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000599 }
600
601 if (is_ios || (is_mac && cpu_arch != "x86")) {
602 defines += [ "CARBON_DEPRECATED=YES" ]
603 }
604
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000605 if (!is_ios) {
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000606 sources += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000607 "openssl.h",
608 "openssladapter.cc",
609 "openssladapter.h",
610 "openssldigest.cc",
611 "openssldigest.h",
612 "opensslidentity.cc",
613 "opensslidentity.h",
614 "opensslstreamadapter.cc",
615 "opensslstreamadapter.h",
616 ]
617 }
618
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000619 if (is_linux || is_android) {
620 sources += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000621 "linux.cc",
622 "linux.h",
623 ]
624 }
625
626 if (is_mac || is_ios || is_win) {
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000627 if (rtc_build_ssl) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000628 deps += [
629 "//net/third_party/nss/ssl:libssl",
630 "//third_party/nss:nspr",
631 "//third_party/nss:nss",
632 ]
633 } else {
634 configs += [ "external_ssl_library" ]
635 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000636 }
637
638 if (is_posix && !is_mac && !is_ios && !is_android) {
kjellander@webrtc.org4a251992014-08-18 17:56:28 +0000639 if (build_with_chromium) {
640 deps += [ "//crypto:platform" ]
641 } else {
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000642 if (rtc_build_ssl) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000643 deps += [ ":linux_system_ssl" ]
644 } else {
645 configs += [ "external_ssl_library" ]
646 }
kjellander@webrtc.org4a251992014-08-18 17:56:28 +0000647 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000648 }
649}