blob: fbed1a52485232ed43122bc4db704c9103b22f32 [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",
pbos@webrtc.org38344ed2014-09-24 06:05:00 +0000130 "thread_annotations.h",
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +0000131 "timeutils.cc",
132 "timeutils.h",
133 ]
134}
135
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000136static_library("webrtc_base") {
137 cflags = []
138 cflags_cc = []
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000139 libs = []
andrew@webrtc.org6ae5a6d2014-09-16 01:03:29 +0000140 deps = [
141 ":rtc_base_approved",
142 ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000143
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000144 configs += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000145 "..:common_config",
146 ":webrtc_base_config",
147 ]
148
149 direct_dependent_configs = [
150 "..:common_inherited_config",
151 ":webrtc_base_config",
152 ]
153
154 defines = [
155 "LOGGING=1",
156 "USE_WEBRTC_DEV_BRANCH",
157 ]
158
159 sources = [
160 "asyncfile.cc",
161 "asyncfile.h",
162 "asynchttprequest.cc",
163 "asynchttprequest.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000164 "asyncpacketsocket.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000165 "asyncsocket.cc",
166 "asyncsocket.h",
167 "asynctcpsocket.cc",
168 "asynctcpsocket.h",
169 "asyncudpsocket.cc",
170 "asyncudpsocket.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000171 "autodetectproxy.cc",
172 "autodetectproxy.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000173 "base64.cc",
174 "base64.h",
175 "basicdefs.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000176 "bytebuffer.cc",
177 "bytebuffer.h",
178 "byteorder.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000179 "common.cc",
180 "common.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000181 "cpumonitor.cc",
182 "cpumonitor.h",
183 "crc32.cc",
184 "crc32.h",
185 "criticalsection.h",
186 "cryptstring.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000187 "diskcache.cc",
188 "diskcache.h",
189 "event.cc",
190 "event.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000191 "fileutils.cc",
192 "fileutils.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000193 "firewallsocketserver.cc",
194 "firewallsocketserver.h",
195 "flags.cc",
196 "flags.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000197 "gunit_prod.h",
198 "helpers.cc",
199 "helpers.h",
200 "httpbase.cc",
201 "httpbase.h",
202 "httpclient.cc",
203 "httpclient.h",
204 "httpcommon-inl.h",
205 "httpcommon.cc",
206 "httpcommon.h",
207 "httprequest.cc",
208 "httprequest.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000209 "iosfilesystem.mm",
210 "ipaddress.cc",
211 "ipaddress.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000212 "linked_ptr.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000213 "mathutils.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000214 "messagedigest.cc",
215 "messagedigest.h",
216 "messagehandler.cc",
217 "messagehandler.h",
218 "messagequeue.cc",
219 "messagequeue.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000220 "nethelpers.cc",
221 "nethelpers.h",
222 "network.cc",
223 "network.h",
224 "nssidentity.cc",
225 "nssidentity.h",
226 "nssstreamadapter.cc",
227 "nssstreamadapter.h",
228 "nullsocketserver.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000229 "pathutils.cc",
230 "pathutils.h",
231 "physicalsocketserver.cc",
232 "physicalsocketserver.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000233 "proxydetect.cc",
234 "proxydetect.h",
235 "proxyinfo.cc",
236 "proxyinfo.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000237 "ratelimiter.cc",
238 "ratelimiter.h",
239 "ratetracker.cc",
240 "ratetracker.h",
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000241 "safe_conversions.h",
242 "safe_conversions_impl.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000243 "scoped_autorelease_pool.h",
244 "scoped_autorelease_pool.mm",
245 "scoped_ptr.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000246 "sha1.cc",
247 "sha1.h",
248 "sha1digest.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000249 "signalthread.cc",
250 "signalthread.h",
251 "sigslot.h",
252 "sigslotrepeater.h",
253 "socket.h",
254 "socketadapters.cc",
255 "socketadapters.h",
256 "socketaddress.cc",
257 "socketaddress.h",
258 "socketaddresspair.cc",
259 "socketaddresspair.h",
260 "socketfactory.h",
261 "socketpool.cc",
262 "socketpool.h",
263 "socketserver.h",
264 "socketstream.cc",
265 "socketstream.h",
266 "ssladapter.cc",
267 "ssladapter.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000268 "sslfingerprint.cc",
269 "sslfingerprint.h",
270 "sslidentity.cc",
271 "sslidentity.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000272 "sslsocketfactory.cc",
273 "sslsocketfactory.h",
274 "sslstreamadapter.cc",
275 "sslstreamadapter.h",
276 "sslstreamadapterhelper.cc",
277 "sslstreamadapterhelper.h",
278 "stream.cc",
279 "stream.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000280 "systeminfo.cc",
281 "systeminfo.h",
282 "task.cc",
283 "task.h",
284 "taskparent.cc",
285 "taskparent.h",
286 "taskrunner.cc",
287 "taskrunner.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000288 "thread.cc",
289 "thread.h",
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000290 "thread_checker.h",
291 "thread_checker_impl.cc",
292 "thread_checker_impl.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000293 "timing.cc",
294 "timing.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000295 "urlencode.cc",
296 "urlencode.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000297 "worker.cc",
298 "worker.h",
299 ]
300
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000301 if (is_posix) {
302 sources += [
303 "unixfilesystem.cc",
304 "unixfilesystem.h",
305 ]
306 }
307
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000308 if (build_with_chromium) {
309 sources += [
310 "../overrides/webrtc/base/basictypes.h",
311 "../overrides/webrtc/base/constructormagic.h",
312 "../overrides/webrtc/base/logging.cc",
313 "../overrides/webrtc/base/logging.h",
314 ]
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000315
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000316 if (is_win) {
317 sources += [ "../overrides/webrtc/base/win32socketinit.cc" ]
318 }
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000319
320 include_dirs = [
321 "../overrides",
henrike@webrtc.org6ac22e62014-08-11 21:06:30 +0000322 "../../boringssl/src/include",
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000323 ]
324
325 direct_dependent_configs += [ ":webrtc_base_chromium_config" ]
326 } else {
327 sources += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000328 "asyncinvoker.cc",
329 "asyncinvoker.h",
330 "asyncinvoker-inl.h",
331 "asyncresolverinterface.h",
332 "atomicops.h",
333 "bandwidthsmoother.cc",
334 "bandwidthsmoother.h",
335 "basictypes.h",
336 "bind.h",
337 "bind.h.pump",
338 "buffer.h",
339 "callback.h",
340 "callback.h.pump",
341 "constructormagic.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000342 "filelock.cc",
343 "filelock.h",
344 "fileutils_mock.h",
345 "genericslot.h",
346 "genericslot.h.pump",
347 "httpserver.cc",
348 "httpserver.h",
349 "json.cc",
350 "json.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000351 "logging.cc",
352 "logging.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000353 "mathutils.h",
354 "multipart.cc",
355 "multipart.h",
356 "natserver.cc",
357 "natserver.h",
358 "natsocketfactory.cc",
359 "natsocketfactory.h",
360 "nattypes.cc",
361 "nattypes.h",
362 "openssl.h",
363 "optionsfile.cc",
364 "optionsfile.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000365 "profiler.cc",
366 "profiler.h",
367 "proxyserver.cc",
368 "proxyserver.h",
369 "refcount.h",
370 "referencecountedsingletonfactory.h",
371 "rollingaccumulator.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000372 "scopedptrcollection.h",
373 "scoped_ref_ptr.h",
374 "sec_buffer.h",
375 "sharedexclusivelock.cc",
376 "sharedexclusivelock.h",
377 "sslconfig.h",
378 "sslroots.h",
379 "stringdigest.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000380 "testclient.cc",
381 "testclient.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000382 "transformadapter.cc",
383 "transformadapter.h",
384 "versionparsing.cc",
385 "versionparsing.h",
386 "virtualsocketserver.cc",
387 "virtualsocketserver.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000388 "window.h",
389 "windowpickerfactory.h",
390 "windowpicker.h",
391 ]
392
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000393 if (is_posix) {
394 sources += [
395 "latebindingsymboltable.cc",
396 "latebindingsymboltable.cc.def",
397 "latebindingsymboltable.h",
398 "latebindingsymboltable.h.def",
399 "posix.cc",
400 "posix.h",
401 ]
402 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000403
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000404 if (is_linux) {
405 sources += [
406 "dbus.cc",
407 "dbus.h",
408 "libdbusglibsymboltable.cc",
409 "libdbusglibsymboltable.h",
410 "linuxfdwalk.c",
411 "linuxfdwalk.h",
henrike@webrtc.orgfb1eb432014-08-15 14:44:13 +0000412 ]
413 }
414
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000415 if (is_mac) {
416 sources += [
417 "macasyncsocket.cc",
418 "macasyncsocket.h",
419 "maccocoasocketserver.h",
420 "maccocoasocketserver.mm",
421 "macsocketserver.cc",
422 "macsocketserver.h",
423 "macwindowpicker.cc",
424 "macwindowpicker.h",
425 ]
426 }
427
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000428 if (is_win) {
429 sources += [
430 "diskcache_win32.cc",
431 "diskcache_win32.h",
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000432 "win32regkey.cc",
433 "win32regkey.h",
434 "win32socketinit.cc",
435 "win32socketinit.h",
436 "win32socketserver.cc",
437 "win32socketserver.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000438 ]
439 }
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000440 if (rtc_build_json) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000441 deps += [ "//third_party/jsoncpp" ]
442 } else {
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000443 include_dirs += [ rtc_jsoncpp_root ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000444
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000445 # When defined changes the include path for json.h to where it is
446 # expected to be when building json outside of the standalone build.
447 defines += [ "WEBRTC_EXTERNAL_JSON" ]
448 }
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000449 } # !build_with_chromium
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000450
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000451 if (is_clang) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000452 # Suppress warnings from the Chrome Clang plugins.
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000453 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
454 configs -= [ "//build/config/clang:find_bad_constructs" ]
455 }
456
kjellander@webrtc.org62711f82014-06-29 13:37:08 +0000457 # TODO(henrike): issue 3307, make webrtc_base build with the Chromium default
458 # compiler settings.
459 configs -= [ "//build/config/compiler:chromium_code" ]
460 configs += [ "//build/config/compiler:no_chromium_code" ]
461 cflags += [ "-Wno-uninitialized" ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000462 cflags_cc += [ "-Wno-non-virtual-dtor" ]
463
464 if (use_openssl) {
465 direct_dependent_configs += [ ":openssl_config" ]
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000466 if (rtc_build_ssl) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000467 deps += [ "//third_party/boringssl" ]
468 } else {
469 configs += [ "external_ssl_library" ]
470 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000471 } else {
472 direct_dependent_configs += [ ":no_openssl_config" ]
473 }
474
475 if (is_android) {
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000476 sources += [
477 "ifaddrs-android.cc",
478 "ifaddrs-android.h",
479 ]
480
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000481 direct_dependent_configs += [ ":android_config" ]
482
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000483 libs += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000484 "log",
485 "GLESv2"
486 ]
487 } else {
488 direct_dependent_configs += [ ":no_android_config" ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000489 }
490
491 if (is_ios) {
492 all_dependent_configs += [ ":ios_config" ]
493
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000494 if (rtc_build_ssl) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000495 deps += [ "//net/third_party/nss/ssl:libssl" ]
496 } else {
497 configs += [ "external_ssl_library" ]
498 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000499 }
500
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000501 if (use_x11) {
502 sources += [
503 "x11windowpicker.cc",
504 "x11windowpicker.h",
505 ]
506 libs += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000507 "dl",
508 "rt",
509 "Xext",
510 "X11",
511 "Xcomposite",
512 "Xrender",
513 ]
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000514 }
515
516 if (is_linux) {
517 libs += [
518 "crypto",
519 "dl",
520 "rt",
521 ]
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000522 if (rtc_build_ssl) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000523 configs += [ "//third_party/nss:system_nss_no_ssl_config" ]
524 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000525 }
526
527 if (is_mac) {
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000528 sources += [
529 "maccocoathreadhelper.h",
530 "maccocoathreadhelper.mm",
531 "macconversion.cc",
532 "macconversion.h",
533 "macutils.cc",
534 "macutils.h",
535 ]
536
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000537 all_dependent_configs = [ ":mac_config" ]
538
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000539 libs += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000540 "crypto", # $(SDKROOT)/usr/lib/libcrypto.dylib
541 "ssl", # $(SDKROOT)/usr/lib/libssl.dylib
542 ]
543 if (cpu_arch == "x86") {
544 all_dependent_configs += [ ":mac_x86_config" ]
545 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000546 }
547
548 if (is_win) {
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000549 sources += [
550 "schanneladapter.cc",
551 "schanneladapter.h",
552 "win32.cc",
553 "win32.h",
554 "win32filesystem.cc",
555 "win32filesystem.h",
556 "win32securityerrors.cc",
557 "win32window.cc",
558 "win32window.h",
559 "win32windowpicker.cc",
560 "win32windowpicker.h",
561 "winfirewall.cc",
562 "winfirewall.h",
563 "winping.cc",
564 "winping.h",
565 ]
566
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000567 libs += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000568 "crypt32.lib",
569 "iphlpapi.lib",
570 "secur32.lib",
571 ]
572
573 cflags += [
574 # Suppress warnings about WIN32_LEAN_AND_MEAN.
575 "/wd4005",
576 "/wd4703",
577 ]
578
579 defines += [ "_CRT_NONSTDC_NO_DEPRECATE" ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000580 }
581
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000582 if (is_posix && is_debug) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000583 # The Chromium build/common.gypi defines this for all posix
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000584 # _except_ for ios & mac. We want it there as well, e.g.
585 # because ASSERT and friends trigger off of it.
586 defines += [ "_DEBUG" ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000587 }
588
589 if (is_ios || (is_mac && cpu_arch != "x86")) {
590 defines += [ "CARBON_DEPRECATED=YES" ]
591 }
592
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000593 if (!is_ios) {
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000594 sources += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000595 "openssl.h",
596 "openssladapter.cc",
597 "openssladapter.h",
598 "openssldigest.cc",
599 "openssldigest.h",
600 "opensslidentity.cc",
601 "opensslidentity.h",
602 "opensslstreamadapter.cc",
603 "opensslstreamadapter.h",
604 ]
605 }
606
kjellander@webrtc.org7497fa72014-06-28 18:05:22 +0000607 if (is_linux || is_android) {
608 sources += [
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000609 "linux.cc",
610 "linux.h",
611 ]
612 }
613
614 if (is_mac || is_ios || is_win) {
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000615 if (rtc_build_ssl) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000616 deps += [
617 "//net/third_party/nss/ssl:libssl",
618 "//third_party/nss:nspr",
619 "//third_party/nss:nss",
620 ]
621 } else {
622 configs += [ "external_ssl_library" ]
623 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000624 }
625
626 if (is_posix && !is_mac && !is_ios && !is_android) {
kjellander@webrtc.org4a251992014-08-18 17:56:28 +0000627 if (build_with_chromium) {
628 deps += [ "//crypto:platform" ]
629 } else {
kjellander@webrtc.org6d08ca62014-09-07 17:36:10 +0000630 if (rtc_build_ssl) {
kjellander@webrtc.orge281f7f2014-09-02 11:22:06 +0000631 deps += [ ":linux_system_ssl" ]
632 } else {
633 configs += [ "external_ssl_library" ]
634 }
kjellander@webrtc.org4a251992014-08-18 17:56:28 +0000635 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03 +0000636 }
637}