kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 1 | # 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 | |
kjellander@webrtc.org | 7497fa7 | 2014-06-28 18:05:22 +0000 | [diff] [blame] | 9 | # TODO(kjellander): Rebase this to base.gyp changes after r6438. |
| 10 | |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 11 | import("//build/config/crypto.gni") |
henrike@webrtc.org | fb1eb43 | 2014-08-15 14:44:13 +0000 | [diff] [blame] | 12 | import("//build/config/ui.gni") |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 13 | import("../build/webrtc.gni") |
| 14 | |
| 15 | config("webrtc_base_config") { |
| 16 | include_dirs = [ |
| 17 | "//third_party/jsoncpp/overrides/include", |
| 18 | "//third_party/jsoncpp/source/include", |
| 19 | ] |
| 20 | |
| 21 | defines = [ |
| 22 | "FEATURE_ENABLE_SSL", |
| 23 | "GTEST_RELATIVE_PATH", |
| 24 | ] |
| 25 | |
| 26 | # TODO(henrike): issue 3307, make webrtc_base build without disabling |
| 27 | # these flags. |
| 28 | cflags_cc = [ "-Wno-non-virtual-dtor" ] |
| 29 | } |
| 30 | |
| 31 | config("webrtc_base_chromium_config") { |
| 32 | defines = [ |
| 33 | "NO_MAIN_THREAD_WRAPPING", |
| 34 | "SSL_USE_NSS", |
| 35 | ] |
| 36 | } |
| 37 | |
| 38 | config("openssl_config") { |
| 39 | defines = [ |
| 40 | "SSL_USE_OPENSSL", |
| 41 | "HAVE_OPENSSL_SSL_H", |
| 42 | ] |
| 43 | } |
| 44 | |
| 45 | config("no_openssl_config") { |
| 46 | defines = [ |
| 47 | "SSL_USE_NSS", |
| 48 | "HAVE_NSS_SSL_H", |
| 49 | "SSL_USE_NSS_RNG", |
| 50 | ] |
| 51 | } |
| 52 | |
| 53 | config("android_config") { |
| 54 | defines = [ "HAVE_OPENSSL_SSL_H" ] |
| 55 | } |
| 56 | |
| 57 | config("no_android_config") { |
| 58 | defines = [ |
| 59 | "HAVE_NSS_SSL_H", |
| 60 | "SSL_USE_NSS_RNG", |
| 61 | ] |
| 62 | } |
| 63 | |
| 64 | config("ios_config") { |
| 65 | ldflags = [ |
| 66 | #"Foundation.framework", # Already included in //build/config:default_libs. |
| 67 | "Security.framework", |
| 68 | "SystemConfiguration.framework", |
| 69 | #"UIKit.framework", # Already included in //build/config:default_libs. |
| 70 | ] |
| 71 | } |
| 72 | |
| 73 | config("mac_config") { |
| 74 | ldflags = [ |
| 75 | "Cocoa.framework", |
| 76 | #"Foundation.framework", # Already included in //build/config:default_libs. |
| 77 | #"IOKit.framework", # Already included in //build/config:default_libs. |
| 78 | #"Security.framework", # Already included in //build/config:default_libs. |
| 79 | "SystemConfiguration.framework", |
| 80 | ] |
| 81 | } |
| 82 | |
| 83 | config("mac_x86_config") { |
| 84 | libs = [ |
| 85 | #"Carbon.framework", # Already included in //build/config:default_libs. |
| 86 | ] |
| 87 | } |
| 88 | |
kjellander@webrtc.org | 4a25199 | 2014-08-18 17:56:28 +0000 | [diff] [blame] | 89 | if (is_linux && !build_with_chromium) { |
| 90 | # Provides the same functionality as the //crypto:platform target, which |
| 91 | # WebRTC cannot use as we don't sync src/crypto from Chromium. |
| 92 | group("linux_system_ssl") { |
| 93 | if (use_openssl) { |
| 94 | deps = [ "//third_party/boringssl" ] |
| 95 | } else { |
| 96 | deps = [ "//net/third_party/nss/ssl:libssl" ] |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 97 | |
kjellander@webrtc.org | 4a25199 | 2014-08-18 17:56:28 +0000 | [diff] [blame] | 98 | direct_dependent_configs = [ |
| 99 | "//net/third_party/nss/ssl:ssl_config", |
| 100 | "//third_party/nss:system_nss_no_ssl_config", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 101 | ] |
| 102 | } |
| 103 | } |
| 104 | } |
| 105 | |
kjellander@webrtc.org | 4a25199 | 2014-08-18 17:56:28 +0000 | [diff] [blame] | 106 | |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 107 | static_library("webrtc_base") { |
| 108 | cflags = [] |
| 109 | cflags_cc = [] |
kjellander@webrtc.org | 7497fa7 | 2014-06-28 18:05:22 +0000 | [diff] [blame] | 110 | deps= [] |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 111 | |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 112 | configs += [ |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 113 | "..:common_config", |
| 114 | ":webrtc_base_config", |
| 115 | ] |
| 116 | |
| 117 | direct_dependent_configs = [ |
| 118 | "..:common_inherited_config", |
| 119 | ":webrtc_base_config", |
| 120 | ] |
| 121 | |
| 122 | defines = [ |
| 123 | "LOGGING=1", |
| 124 | "USE_WEBRTC_DEV_BRANCH", |
| 125 | ] |
| 126 | |
| 127 | sources = [ |
| 128 | "asyncfile.cc", |
| 129 | "asyncfile.h", |
| 130 | "asynchttprequest.cc", |
| 131 | "asynchttprequest.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 132 | "asyncpacketsocket.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 133 | "asyncsocket.cc", |
| 134 | "asyncsocket.h", |
| 135 | "asynctcpsocket.cc", |
| 136 | "asynctcpsocket.h", |
| 137 | "asyncudpsocket.cc", |
| 138 | "asyncudpsocket.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 139 | "autodetectproxy.cc", |
| 140 | "autodetectproxy.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 141 | "base64.cc", |
| 142 | "base64.h", |
| 143 | "basicdefs.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 144 | "bytebuffer.cc", |
| 145 | "bytebuffer.h", |
| 146 | "byteorder.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 147 | "checks.cc", |
| 148 | "checks.h", |
| 149 | "common.cc", |
| 150 | "common.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 151 | "cpumonitor.cc", |
| 152 | "cpumonitor.h", |
| 153 | "crc32.cc", |
| 154 | "crc32.h", |
| 155 | "criticalsection.h", |
| 156 | "cryptstring.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 157 | "diskcache.cc", |
| 158 | "diskcache.h", |
| 159 | "event.cc", |
| 160 | "event.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 161 | "fileutils.cc", |
| 162 | "fileutils.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 163 | "firewallsocketserver.cc", |
| 164 | "firewallsocketserver.h", |
| 165 | "flags.cc", |
| 166 | "flags.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 167 | "gunit_prod.h", |
| 168 | "helpers.cc", |
| 169 | "helpers.h", |
| 170 | "httpbase.cc", |
| 171 | "httpbase.h", |
| 172 | "httpclient.cc", |
| 173 | "httpclient.h", |
| 174 | "httpcommon-inl.h", |
| 175 | "httpcommon.cc", |
| 176 | "httpcommon.h", |
| 177 | "httprequest.cc", |
| 178 | "httprequest.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 179 | "iosfilesystem.mm", |
| 180 | "ipaddress.cc", |
| 181 | "ipaddress.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 182 | "linked_ptr.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 183 | "mathutils.h", |
| 184 | "md5.cc", |
| 185 | "md5.h", |
| 186 | "md5digest.h", |
| 187 | "messagedigest.cc", |
| 188 | "messagedigest.h", |
| 189 | "messagehandler.cc", |
| 190 | "messagehandler.h", |
| 191 | "messagequeue.cc", |
| 192 | "messagequeue.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 193 | "nethelpers.cc", |
| 194 | "nethelpers.h", |
| 195 | "network.cc", |
| 196 | "network.h", |
| 197 | "nssidentity.cc", |
| 198 | "nssidentity.h", |
| 199 | "nssstreamadapter.cc", |
| 200 | "nssstreamadapter.h", |
| 201 | "nullsocketserver.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 202 | "pathutils.cc", |
| 203 | "pathutils.h", |
| 204 | "physicalsocketserver.cc", |
| 205 | "physicalsocketserver.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 206 | "proxydetect.cc", |
| 207 | "proxydetect.h", |
| 208 | "proxyinfo.cc", |
| 209 | "proxyinfo.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 210 | "ratelimiter.cc", |
| 211 | "ratelimiter.h", |
| 212 | "ratetracker.cc", |
| 213 | "ratetracker.h", |
kjellander@webrtc.org | 7497fa7 | 2014-06-28 18:05:22 +0000 | [diff] [blame] | 214 | "safe_conversions.h", |
| 215 | "safe_conversions_impl.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 216 | "scoped_autorelease_pool.h", |
| 217 | "scoped_autorelease_pool.mm", |
| 218 | "scoped_ptr.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 219 | "sha1.cc", |
| 220 | "sha1.h", |
| 221 | "sha1digest.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 222 | "signalthread.cc", |
| 223 | "signalthread.h", |
| 224 | "sigslot.h", |
| 225 | "sigslotrepeater.h", |
| 226 | "socket.h", |
| 227 | "socketadapters.cc", |
| 228 | "socketadapters.h", |
| 229 | "socketaddress.cc", |
| 230 | "socketaddress.h", |
| 231 | "socketaddresspair.cc", |
| 232 | "socketaddresspair.h", |
| 233 | "socketfactory.h", |
| 234 | "socketpool.cc", |
| 235 | "socketpool.h", |
| 236 | "socketserver.h", |
| 237 | "socketstream.cc", |
| 238 | "socketstream.h", |
| 239 | "ssladapter.cc", |
| 240 | "ssladapter.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 241 | "sslfingerprint.cc", |
| 242 | "sslfingerprint.h", |
| 243 | "sslidentity.cc", |
| 244 | "sslidentity.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 245 | "sslsocketfactory.cc", |
| 246 | "sslsocketfactory.h", |
| 247 | "sslstreamadapter.cc", |
| 248 | "sslstreamadapter.h", |
| 249 | "sslstreamadapterhelper.cc", |
| 250 | "sslstreamadapterhelper.h", |
| 251 | "stream.cc", |
| 252 | "stream.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 253 | "stringencode.cc", |
| 254 | "stringencode.h", |
| 255 | "stringutils.cc", |
| 256 | "stringutils.h", |
| 257 | "systeminfo.cc", |
| 258 | "systeminfo.h", |
| 259 | "task.cc", |
| 260 | "task.h", |
| 261 | "taskparent.cc", |
| 262 | "taskparent.h", |
| 263 | "taskrunner.cc", |
| 264 | "taskrunner.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 265 | "thread.cc", |
| 266 | "thread.h", |
| 267 | "timeutils.cc", |
| 268 | "timeutils.h", |
| 269 | "timing.cc", |
| 270 | "timing.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 271 | "urlencode.cc", |
| 272 | "urlencode.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 273 | "worker.cc", |
| 274 | "worker.h", |
| 275 | ] |
| 276 | |
kjellander@webrtc.org | 7497fa7 | 2014-06-28 18:05:22 +0000 | [diff] [blame] | 277 | if (is_posix) { |
| 278 | sources += [ |
| 279 | "unixfilesystem.cc", |
| 280 | "unixfilesystem.h", |
| 281 | ] |
| 282 | } |
| 283 | |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 284 | if (build_with_chromium) { |
| 285 | sources += [ |
| 286 | "../overrides/webrtc/base/basictypes.h", |
| 287 | "../overrides/webrtc/base/constructormagic.h", |
| 288 | "../overrides/webrtc/base/logging.cc", |
| 289 | "../overrides/webrtc/base/logging.h", |
| 290 | ] |
kjellander@webrtc.org | 7497fa7 | 2014-06-28 18:05:22 +0000 | [diff] [blame] | 291 | |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 292 | if (is_win) { |
| 293 | sources += [ "../overrides/webrtc/base/win32socketinit.cc" ] |
| 294 | } |
kjellander@webrtc.org | 7497fa7 | 2014-06-28 18:05:22 +0000 | [diff] [blame] | 295 | |
| 296 | include_dirs = [ |
| 297 | "../overrides", |
henrike@webrtc.org | 6ac22e6 | 2014-08-11 21:06:30 +0000 | [diff] [blame] | 298 | "../../boringssl/src/include", |
kjellander@webrtc.org | 7497fa7 | 2014-06-28 18:05:22 +0000 | [diff] [blame] | 299 | ] |
| 300 | |
| 301 | direct_dependent_configs += [ ":webrtc_base_chromium_config" ] |
| 302 | } else { |
| 303 | sources += [ |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 304 | "asyncinvoker.cc", |
| 305 | "asyncinvoker.h", |
| 306 | "asyncinvoker-inl.h", |
| 307 | "asyncresolverinterface.h", |
| 308 | "atomicops.h", |
| 309 | "bandwidthsmoother.cc", |
| 310 | "bandwidthsmoother.h", |
| 311 | "basictypes.h", |
| 312 | "bind.h", |
| 313 | "bind.h.pump", |
| 314 | "buffer.h", |
| 315 | "callback.h", |
| 316 | "callback.h.pump", |
| 317 | "constructormagic.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 318 | "filelock.cc", |
| 319 | "filelock.h", |
| 320 | "fileutils_mock.h", |
| 321 | "genericslot.h", |
| 322 | "genericslot.h.pump", |
| 323 | "httpserver.cc", |
| 324 | "httpserver.h", |
| 325 | "json.cc", |
| 326 | "json.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 327 | "logging.cc", |
| 328 | "logging.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 329 | "mathutils.h", |
| 330 | "multipart.cc", |
| 331 | "multipart.h", |
| 332 | "natserver.cc", |
| 333 | "natserver.h", |
| 334 | "natsocketfactory.cc", |
| 335 | "natsocketfactory.h", |
| 336 | "nattypes.cc", |
| 337 | "nattypes.h", |
| 338 | "openssl.h", |
| 339 | "optionsfile.cc", |
| 340 | "optionsfile.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 341 | "profiler.cc", |
| 342 | "profiler.h", |
| 343 | "proxyserver.cc", |
| 344 | "proxyserver.h", |
| 345 | "refcount.h", |
| 346 | "referencecountedsingletonfactory.h", |
| 347 | "rollingaccumulator.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 348 | "scopedptrcollection.h", |
| 349 | "scoped_ref_ptr.h", |
| 350 | "sec_buffer.h", |
| 351 | "sharedexclusivelock.cc", |
| 352 | "sharedexclusivelock.h", |
| 353 | "sslconfig.h", |
| 354 | "sslroots.h", |
| 355 | "stringdigest.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 356 | "testclient.cc", |
| 357 | "testclient.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 358 | "transformadapter.cc", |
| 359 | "transformadapter.h", |
| 360 | "versionparsing.cc", |
| 361 | "versionparsing.h", |
| 362 | "virtualsocketserver.cc", |
| 363 | "virtualsocketserver.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 364 | "window.h", |
| 365 | "windowpickerfactory.h", |
| 366 | "windowpicker.h", |
| 367 | ] |
| 368 | |
kjellander@webrtc.org | 7497fa7 | 2014-06-28 18:05:22 +0000 | [diff] [blame] | 369 | if (is_posix) { |
| 370 | sources += [ |
| 371 | "latebindingsymboltable.cc", |
| 372 | "latebindingsymboltable.cc.def", |
| 373 | "latebindingsymboltable.h", |
| 374 | "latebindingsymboltable.h.def", |
| 375 | "posix.cc", |
| 376 | "posix.h", |
| 377 | ] |
| 378 | } |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 379 | |
kjellander@webrtc.org | 7497fa7 | 2014-06-28 18:05:22 +0000 | [diff] [blame] | 380 | if (is_linux) { |
| 381 | sources += [ |
| 382 | "dbus.cc", |
| 383 | "dbus.h", |
| 384 | "libdbusglibsymboltable.cc", |
| 385 | "libdbusglibsymboltable.h", |
| 386 | "linuxfdwalk.c", |
| 387 | "linuxfdwalk.h", |
henrike@webrtc.org | fb1eb43 | 2014-08-15 14:44:13 +0000 | [diff] [blame] | 388 | ] |
| 389 | } |
| 390 | |
| 391 | if (use_x11) { |
| 392 | sources += [ |
| 393 | "x11windowpicker.cc", |
| 394 | "x11windowpicker.h", |
kjellander@webrtc.org | 7497fa7 | 2014-06-28 18:05:22 +0000 | [diff] [blame] | 395 | ] |
| 396 | } |
| 397 | |
| 398 | if (is_mac) { |
| 399 | sources += [ |
| 400 | "macasyncsocket.cc", |
| 401 | "macasyncsocket.h", |
| 402 | "maccocoasocketserver.h", |
| 403 | "maccocoasocketserver.mm", |
| 404 | "macsocketserver.cc", |
| 405 | "macsocketserver.h", |
| 406 | "macwindowpicker.cc", |
| 407 | "macwindowpicker.h", |
| 408 | ] |
| 409 | } |
| 410 | |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 411 | if (is_win) { |
| 412 | sources += [ |
| 413 | "diskcache_win32.cc", |
| 414 | "diskcache_win32.h", |
kjellander@webrtc.org | 7497fa7 | 2014-06-28 18:05:22 +0000 | [diff] [blame] | 415 | "win32regkey.cc", |
| 416 | "win32regkey.h", |
| 417 | "win32socketinit.cc", |
| 418 | "win32socketinit.h", |
| 419 | "win32socketserver.cc", |
| 420 | "win32socketserver.h", |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 421 | ] |
| 422 | } |
| 423 | |
kjellander@webrtc.org | 7497fa7 | 2014-06-28 18:05:22 +0000 | [diff] [blame] | 424 | deps += [ "//third_party/jsoncpp" ] |
| 425 | } # !build_with_chromium |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 426 | |
kjellander@webrtc.org | 42ee5b5 | 2014-08-25 14:15:35 +0000 | [diff] [blame^] | 427 | if (is_clang) { |
| 428 | # Suppress warnings from Chrome's Clang plugins. |
| 429 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| 430 | configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 431 | } |
| 432 | |
kjellander@webrtc.org | 62711f8 | 2014-06-29 13:37:08 +0000 | [diff] [blame] | 433 | # TODO(henrike): issue 3307, make webrtc_base build with the Chromium default |
| 434 | # compiler settings. |
| 435 | configs -= [ "//build/config/compiler:chromium_code" ] |
| 436 | configs += [ "//build/config/compiler:no_chromium_code" ] |
| 437 | cflags += [ "-Wno-uninitialized" ] |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 438 | cflags_cc += [ "-Wno-non-virtual-dtor" ] |
| 439 | |
| 440 | if (use_openssl) { |
| 441 | direct_dependent_configs += [ ":openssl_config" ] |
| 442 | |
henrike@webrtc.org | 6ac22e6 | 2014-08-11 21:06:30 +0000 | [diff] [blame] | 443 | deps += [ "//third_party/boringssl" ] |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 444 | } else { |
| 445 | direct_dependent_configs += [ ":no_openssl_config" ] |
| 446 | } |
| 447 | |
| 448 | if (is_android) { |
kjellander@webrtc.org | 7497fa7 | 2014-06-28 18:05:22 +0000 | [diff] [blame] | 449 | sources += [ |
| 450 | "ifaddrs-android.cc", |
| 451 | "ifaddrs-android.h", |
| 452 | ] |
| 453 | |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 454 | direct_dependent_configs += [ ":android_config" ] |
| 455 | |
| 456 | libs = [ |
| 457 | "log", |
| 458 | "GLESv2" |
| 459 | ] |
| 460 | } else { |
| 461 | direct_dependent_configs += [ ":no_android_config" ] |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 462 | } |
| 463 | |
| 464 | if (is_ios) { |
| 465 | all_dependent_configs += [ ":ios_config" ] |
| 466 | |
kjellander@webrtc.org | 7497fa7 | 2014-06-28 18:05:22 +0000 | [diff] [blame] | 467 | deps += [ "//net/third_party/nss/ssl:libssl" ] |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 468 | } |
| 469 | |
| 470 | if (is_linux) { |
| 471 | libs = [ |
| 472 | "crypto", |
| 473 | "dl", |
| 474 | "rt", |
| 475 | "Xext", |
| 476 | "X11", |
| 477 | "Xcomposite", |
| 478 | "Xrender", |
| 479 | ] |
| 480 | configs += [ "//third_party/nss:system_nss_no_ssl_config" ] |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 481 | } |
| 482 | |
| 483 | if (is_mac) { |
kjellander@webrtc.org | 7497fa7 | 2014-06-28 18:05:22 +0000 | [diff] [blame] | 484 | sources += [ |
| 485 | "maccocoathreadhelper.h", |
| 486 | "maccocoathreadhelper.mm", |
| 487 | "macconversion.cc", |
| 488 | "macconversion.h", |
| 489 | "macutils.cc", |
| 490 | "macutils.h", |
| 491 | ] |
| 492 | |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 493 | all_dependent_configs = [ ":mac_config" ] |
| 494 | |
| 495 | libs = [ |
| 496 | "crypto", # $(SDKROOT)/usr/lib/libcrypto.dylib |
| 497 | "ssl", # $(SDKROOT)/usr/lib/libssl.dylib |
| 498 | ] |
| 499 | if (cpu_arch == "x86") { |
| 500 | all_dependent_configs += [ ":mac_x86_config" ] |
| 501 | } |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 502 | } |
| 503 | |
| 504 | if (is_win) { |
kjellander@webrtc.org | 7497fa7 | 2014-06-28 18:05:22 +0000 | [diff] [blame] | 505 | sources += [ |
| 506 | "schanneladapter.cc", |
| 507 | "schanneladapter.h", |
| 508 | "win32.cc", |
| 509 | "win32.h", |
| 510 | "win32filesystem.cc", |
| 511 | "win32filesystem.h", |
| 512 | "win32securityerrors.cc", |
| 513 | "win32window.cc", |
| 514 | "win32window.h", |
| 515 | "win32windowpicker.cc", |
| 516 | "win32windowpicker.h", |
| 517 | "winfirewall.cc", |
| 518 | "winfirewall.h", |
| 519 | "winping.cc", |
| 520 | "winping.h", |
| 521 | ] |
| 522 | |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 523 | libs = [ |
| 524 | "crypt32.lib", |
| 525 | "iphlpapi.lib", |
| 526 | "secur32.lib", |
| 527 | ] |
| 528 | |
| 529 | cflags += [ |
| 530 | # Suppress warnings about WIN32_LEAN_AND_MEAN. |
| 531 | "/wd4005", |
| 532 | "/wd4703", |
| 533 | ] |
| 534 | |
| 535 | defines += [ "_CRT_NONSTDC_NO_DEPRECATE" ] |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 536 | } |
| 537 | |
kjellander@webrtc.org | 7497fa7 | 2014-06-28 18:05:22 +0000 | [diff] [blame] | 538 | if (is_posix && is_debug) { |
| 539 | # Chromium's build/common.gypi defines this for all posix |
| 540 | # _except_ for ios & mac. We want it there as well, e.g. |
| 541 | # because ASSERT and friends trigger off of it. |
| 542 | defines += [ "_DEBUG" ] |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 543 | } |
| 544 | |
| 545 | if (is_ios || (is_mac && cpu_arch != "x86")) { |
| 546 | defines += [ "CARBON_DEPRECATED=YES" ] |
| 547 | } |
| 548 | |
kjellander@webrtc.org | 7497fa7 | 2014-06-28 18:05:22 +0000 | [diff] [blame] | 549 | if (!is_ios && is_posix) { |
| 550 | sources += [ |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 551 | "openssl.h", |
| 552 | "openssladapter.cc", |
| 553 | "openssladapter.h", |
| 554 | "openssldigest.cc", |
| 555 | "openssldigest.h", |
| 556 | "opensslidentity.cc", |
| 557 | "opensslidentity.h", |
| 558 | "opensslstreamadapter.cc", |
| 559 | "opensslstreamadapter.h", |
| 560 | ] |
| 561 | } |
| 562 | |
kjellander@webrtc.org | 7497fa7 | 2014-06-28 18:05:22 +0000 | [diff] [blame] | 563 | if (is_linux || is_android) { |
| 564 | sources += [ |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 565 | "linux.cc", |
| 566 | "linux.h", |
| 567 | ] |
| 568 | } |
| 569 | |
| 570 | if (is_mac || is_ios || is_win) { |
| 571 | deps += [ |
| 572 | "//net/third_party/nss/ssl:libssl", |
| 573 | "//third_party/nss:nspr", |
| 574 | "//third_party/nss:nss", |
| 575 | ] |
| 576 | } |
| 577 | |
| 578 | if (is_posix && !is_mac && !is_ios && !is_android) { |
kjellander@webrtc.org | 4a25199 | 2014-08-18 17:56:28 +0000 | [diff] [blame] | 579 | if (build_with_chromium) { |
| 580 | deps += [ "//crypto:platform" ] |
| 581 | } else { |
| 582 | deps += [ ":linux_system_ssl" ] |
| 583 | } |
kjellander@webrtc.org | 851a09e | 2014-06-17 08:54:03 +0000 | [diff] [blame] | 584 | } |
| 585 | } |