# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS.  All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.

import("//build/config/crypto.gni")
import("//build/config/ui.gni")
import("../webrtc.gni")

if (is_android) {
  import("//build/config/android/config.gni")
  import("//build/config/android/rules.gni")
}

group("base") {
  public_deps = [
    ":rtc_base",
    ":rtc_base_approved",
    ":rtc_task_queue",
    ":weak_ptr",
  ]
  if (is_android) {
    public_deps += [ ":base_java" ]
  }
}

config("rtc_base_chromium_config") {
  defines = [ "NO_MAIN_THREAD_WRAPPING" ]
}

config("rtc_base_all_dependent_config") {
  if (is_ios) {
    libs = [
      "CFNetwork.framework",
      "Foundation.framework",
      "Security.framework",
      "SystemConfiguration.framework",
      "UIKit.framework",
    ]
  }
  if (is_mac) {
    libs = [
      "Cocoa.framework",
      "Foundation.framework",
      "IOKit.framework",
      "Security.framework",
      "SystemConfiguration.framework",
    ]
  }
}

if (!rtc_build_ssl) {
  config("external_ssl_library") {
    assert(rtc_ssl_root != "",
           "You must specify rtc_ssl_root when rtc_build_ssl==0.")
    include_dirs = [ rtc_ssl_root ]
  }
}

source_set("protobuf_utils") {
  visibility = [ "*" ]
  sources = [
    "protobuf_utils.h",
  ]
  if (rtc_enable_protobuf) {
    public_deps = [
      "//third_party/protobuf:protobuf_lite",
    ]
  }
}

source_set("compile_assert_c") {
  sources = [
    "compile_assert_c.h",
  ]
}

rtc_source_set("rtc_base_approved") {
  visibility = [ "*" ]
  public_deps = [
    ":atomicops",
    ":criticalsection",
    ":logging",
    ":macromagic",
    ":platform_thread",
    ":platform_thread_types",
    ":ptr_util",
    ":refcount",
    ":rtc_base_approved_generic",
    ":rtc_event",
    ":safe_conversions",
    ":stringutils",
    ":thread_checker",
    ":timeutils",
  ]
  if (is_mac && !build_with_chromium) {
    public_deps += [ ":rtc_base_approved_objc" ]
  }
}

rtc_source_set("macromagic") {
  sources = [
    "arraysize.h",
    "basictypes.h",
    "constructormagic.h",
    "format_macros.h",
    "stringize_macros.h",
    "thread_annotations.h",
  ]
}

rtc_source_set("platform_thread_types") {
  sources = [
    "platform_thread_types.cc",
    "platform_thread_types.h",
  ]
}

rtc_source_set("ptr_util") {
  sources = [
    "ptr_util.h",
    "scoped_ref_ptr.h",
  ]
}

rtc_source_set("refcount") {
  sources = [
    "refcount.h",
    "refcountedobject.h",
    "refcounter.h",
  ]
  deps = [
    ":atomicops",
    ":macromagic",
  ]
}

rtc_source_set("criticalsection") {
  sources = [
    "criticalsection.cc",
    "criticalsection.h",
  ]
  deps = [
    ":atomicops",
    ":checks",
    ":macromagic",
    ":platform_thread_types",
    "..:typedefs",
  ]
}

rtc_source_set("platform_thread") {
  visibility = [
    ":rtc_base_approved",
    ":rtc_base_approved_generic",
    ":rtc_task_queue_libevent",
    ":rtc_task_queue_win",
    ":sequenced_task_checker",
  ]
  sources = [
    "platform_thread.cc",
    "platform_thread.h",
  ]
  deps = [
    ":atomicops",
    ":checks",
    ":macromagic",
    ":platform_thread_types",
    ":rtc_event",
    ":thread_checker",
    ":timeutils",
    "..:typedefs",
  ]
}

rtc_source_set("rtc_event") {
  deps = [
    ":checks",
    ":macromagic",
  ]

  if (build_with_chromium) {
    # Dependency on chromium's waitable_event (in //base).
    deps += [ "//base:base" ]
    sources = [
      "../../webrtc_overrides/rtc_base/event.cc",
      "../../webrtc_overrides/rtc_base/event.h",
    ]
  } else {
    sources = [
      "event.cc",
      "event.h",
    ]
  }
}

rtc_source_set("logging") {
  deps = [
    ":criticalsection",
    ":macromagic",
    ":platform_thread_types",
    ":stringutils",
    ":timeutils",
  ]

  if (build_with_chromium) {
    # Dependency on chromium's logging (in //base).
    deps += [ "//base:base" ]
    sources = [
      "../../webrtc_overrides/rtc_base/logging.cc",
      "../../webrtc_overrides/rtc_base/logging.h",
    ]
  } else {
    sources = [
      "logging.cc",
      "logging.h",
    ]
    deps += [ "system:inline" ]

    # logging.h needs the deprecation header while downstream projects are
    # removing code that depends on logging implementation details.
    deps += [ ":deprecation" ]
  }
}

rtc_source_set("thread_checker") {
  sources = [
    "thread_checker.h",
    "thread_checker_impl.cc",
    "thread_checker_impl.h",
  ]
  deps = [
    ":checks",
    ":criticalsection",
    ":macromagic",
    ":platform_thread_types",
    "..:typedefs",
  ]
}

rtc_source_set("atomicops") {
  sources = [
    "atomicops.h",
  ]
}

rtc_source_set("checks") {
  sources = [
    "checks.cc",
    "checks.h",
  ]
  deps = [
    ":safe_compare",
    "..:typedefs",
  ]
}

rtc_source_set("rate_limiter") {
  sources = [
    "rate_limiter.cc",
    "rate_limiter.h",
  ]
  deps = [
    ":rtc_base_approved",
    "../system_wrappers",
  ]
}

rtc_source_set("sanitizer") {
  sources = [
    "sanitizer.h",
  ]
}

rtc_source_set("safe_compare") {
  sources = [
    "numerics/safe_compare.h",
  ]
  deps = [
    ":type_traits",
  ]
}

rtc_source_set("safe_minmax") {
  sources = [
    "numerics/safe_minmax.h",
  ]
  deps = [
    ":checks",
    ":safe_compare",
    ":type_traits",
  ]
}

rtc_source_set("safe_conversions") {
  sources = [
    "numerics/safe_conversions.h",
    "numerics/safe_conversions_impl.h",
  ]
  deps = [
    ":checks",
  ]
}

rtc_source_set("timeutils") {
  sources = [
    "timeutils.cc",
    "timeutils.h",
  ]
  deps = [
    ":checks",
    ":safe_conversions",
  ]
}

rtc_source_set("stringutils") {
  sources = [
    "stringencode.cc",
    "stringencode.h",
    "strings/string_builder.cc",
    "strings/string_builder.h",
    "stringutils.cc",
    "stringutils.h",
  ]
  deps = [
    ":checks",
    ":safe_minmax",
    "../api:array_view",
  ]
}

rtc_source_set("audio_format_to_string") {
  sources = [
    "strings/audio_format_to_string.cc",
    "strings/audio_format_to_string.h",
  ]
  deps = [
    ":stringutils",
    "../api/audio_codecs:audio_codecs_api",
  ]
}

rtc_source_set("type_traits") {
  sources = [
    "type_traits.h",
  ]
}

rtc_source_set("deprecation") {
  sources = [
    "deprecation.h",
  ]
}

# The subset of rtc_base approved for use outside of libjingle.
rtc_source_set("rtc_base_approved_generic") {
  visibility = [
    ":rtc_base_approved",
    ":weak_ptr_unittests",
  ]

  cflags = []
  defines = []
  libs = []
  data_deps = []
  deps = [
    ":atomicops",
    ":checks",
    ":criticalsection",
    ":logging",
    ":macromagic",
    ":platform_thread",
    ":platform_thread_types",
    ":ptr_util",
    ":refcount",
    ":rtc_event",
    ":rtc_task_queue",
    ":safe_compare",
    ":safe_conversions",
    ":stringutils",
    ":thread_checker",
    ":timeutils",
    ":type_traits",
    "../:typedefs",
  ]

  sources = [
    "base64.cc",
    "base64.h",
    "bind.h",
    "bitbuffer.cc",
    "bitbuffer.h",
    "bitrateallocationstrategy.cc",
    "bitrateallocationstrategy.h",
    "buffer.h",
    "bufferqueue.cc",
    "bufferqueue.h",
    "bytebuffer.cc",
    "bytebuffer.h",
    "byteorder.h",
    "copyonwritebuffer.cc",
    "copyonwritebuffer.h",
    "event_tracer.cc",
    "event_tracer.h",
    "file.cc",
    "file.h",
    "flags.cc",
    "flags.h",
    "function_view.h",
    "ignore_wundef.h",
    "location.cc",
    "location.h",
    "numerics/histogram_percentile_counter.cc",
    "numerics/histogram_percentile_counter.h",
    "numerics/mod_ops.h",
    "numerics/moving_max_counter.h",
    "numerics/sample_counter.cc",
    "numerics/sample_counter.h",
    "onetimeevent.h",
    "pathutils.cc",
    "pathutils.h",
    "platform_file.cc",
    "platform_file.h",
    "race_checker.cc",
    "race_checker.h",
    "random.cc",
    "random.h",
    "rate_statistics.cc",
    "rate_statistics.h",
    "ratetracker.cc",
    "ratetracker.h",
    "string_to_number.cc",
    "string_to_number.h",
    "swap_queue.h",
    "template_util.h",
    "timestampaligner.cc",
    "timestampaligner.h",
    "trace_event.h",
    "zero_memory.cc",
    "zero_memory.h",
  ]

  deps += [
    "..:webrtc_common",
    "../api:array_view",
    "../api:optional",
  ]

  if (is_android) {
    libs += [ "log" ]
  }

  if (is_posix || is_fuchsia) {
    sources += [ "file_posix.cc" ]
  }

  if (is_win) {
    sources += [
      "file_win.cc",
      "win/windows_version.cc",
      "win/windows_version.h",
    ]
    data_deps += [ "//build/win:runtime_libs" ]
  }

  if (is_nacl) {
    deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
  }
}

if (is_mac && !build_with_chromium) {
  config("rtc_base_approved_objc_all_dependent_config") {
    visibility = [ ":rtc_base_approved_objc" ]
    libs = [ "Foundation.framework" ]  # needed for logging_mac.mm
  }

  rtc_source_set("rtc_base_approved_objc") {
    visibility = [ ":rtc_base_approved" ]
    all_dependent_configs = [ ":rtc_base_approved_objc_all_dependent_config" ]
    sources = [
      "logging_mac.mm",
    ]
    deps = [
      ":logging",
    ]
  }
}

rtc_source_set("rtc_task_queue") {
  visibility = [ "*" ]
  deps = []
  public_deps = [
    ":rtc_task_queue_api",
  ]

  if (rtc_link_task_queue_impl) {
    deps += [ ":rtc_task_queue_impl" ]
  }
}

# WebRTC targets must not directly depend on rtc_task_queue_api or
# rtc_task_queue_impl. Instead, depend on rtc_task_queue.
# The build flag |rtc_link_task_queue_impl| decides if WebRTC targets will link
# to the default implemenation in rtc_task_queue_impl or if an externally
# provided implementation should be used. An external implementation should
# depend on rtc_task_queue_api.
rtc_source_set("rtc_task_queue_api") {
  # The visibility list is commented out so that we won't break external
  # implementations, but left here to manually test as well as for sake of what
  # targets we expect to depend on rtc_task_queue_api.
  # visibility = [
  #   ":rtc_task_queue",
  #   ":rtc_task_queue_impl",
  #   ":sequenced_task_checker",
  # ]
  sources = [
    "task_queue.h",
  ]
  deps = [
    ":macromagic",
    ":ptr_util",
  ]
}

if (rtc_enable_libevent) {
  rtc_source_set("rtc_task_queue_libevent") {
    visibility = [ ":rtc_task_queue_impl" ]
    sources = [
      "task_queue_libevent.cc",
      "task_queue_posix.cc",
      "task_queue_posix.h",
    ]
    deps = [
      ":checks",
      ":criticalsection",
      ":logging",
      ":platform_thread",
      ":ptr_util",
      ":refcount",
      ":rtc_task_queue_api",
      ":safe_conversions",
      ":timeutils",
    ]
    if (rtc_build_libevent) {
      deps += [ "//base/third_party/libevent" ]
    }
  }
}

if (is_mac || is_ios) {
  rtc_source_set("rtc_task_queue_gcd") {
    visibility = [ ":rtc_task_queue_impl" ]
    sources = [
      "task_queue_gcd.cc",
      "task_queue_posix.cc",
      "task_queue_posix.h",
    ]
    deps = [
      ":checks",
      ":logging",
      ":ptr_util",
      ":refcount",
      ":rtc_task_queue_api",
    ]
  }
}

if (is_win) {
  rtc_source_set("rtc_task_queue_win") {
    visibility = [ ":rtc_task_queue_impl" ]
    sources = [
      "task_queue_win.cc",
    ]
    deps = [
      ":checks",
      ":criticalsection",
      ":logging",
      ":macromagic",
      ":platform_thread",
      ":ptr_util",
      ":refcount",
      ":rtc_event",
      ":rtc_task_queue_api",
      ":safe_conversions",
      ":timeutils",
    ]
  }
}

rtc_source_set("rtc_task_queue_impl") {
  visibility = [ "*" ]
  if (rtc_enable_libevent) {
    deps = [
      ":rtc_task_queue_libevent",
    ]
  } else {
    if (is_mac || is_ios) {
      deps = [
        ":rtc_task_queue_gcd",
      ]
    }
    if (is_win) {
      deps = [
        ":rtc_task_queue_win",
      ]
    }
  }
}

rtc_source_set("sequenced_task_checker") {
  sources = [
    "sequenced_task_checker.h",
    "sequenced_task_checker_impl.cc",
    "sequenced_task_checker_impl.h",
  ]
  deps = [
    ":checks",
    ":criticalsection",
    ":macromagic",
    ":rtc_task_queue",
    ":thread_checker",
  ]
}

rtc_static_library("weak_ptr") {
  sources = [
    "weak_ptr.cc",
    "weak_ptr.h",
  ]
  deps = [
    ":ptr_util",
    ":refcount",
    ":sequenced_task_checker",
  ]
}

rtc_static_library("rtc_numerics") {
  sources = [
    "numerics/exp_filter.cc",
    "numerics/exp_filter.h",
    "numerics/moving_median_filter.h",
    "numerics/percentile_filter.h",
    "numerics/sequence_number_util.h",
  ]
  deps = [
    ":checks",
    ":rtc_base_approved",
    ":safe_compare",
    "../api:optional",
  ]
}

rtc_source_set("rtc_json") {
  defines = []
  sources = [
    "json.cc",
    "json.h",
  ]
  all_dependent_configs = [ "//third_party/jsoncpp:jsoncpp_config" ]
  if (rtc_build_json) {
    public_deps = [
      "//third_party/jsoncpp",
    ]
  } else {
    include_dirs = [ "$rtc_jsoncpp_root" ]

    # When defined changes the include path for json.h to where it is
    # expected to be when building json outside of the standalone build.
    defines += [ "WEBRTC_EXTERNAL_JSON" ]
  }
}

rtc_static_library("rtc_base") {
  visibility = [ "*" ]
  public_deps = []
  if (!build_with_mozilla) {
    public_deps += [ ":rtc_base_generic" ]
  }
  if (is_win) {
    sources = [
      "noop.cc",
    ]
  }
  if (is_ios || is_mac) {
    sources = [
      "noop.mm",
    ]
    public_deps += [ ":rtc_base_objc" ]
  }
}

if (is_ios || is_mac) {
  rtc_source_set("rtc_base_objc") {
    sources = [
      "thread_darwin.mm",
    ]
    deps = [
      ":rtc_base_generic",
    ]
    visibility = [ ":rtc_base" ]
  }
}

rtc_static_library("rtc_base_generic") {
  cflags = []
  cflags_cc = []
  libs = []
  defines = []
  deps = [
    ":checks",
    ":stringutils",
    "..:webrtc_common",
    "../api:array_view",
    "../api:optional",
  ]
  public_deps = [
    ":rtc_base_approved",
  ]
  public_configs = []

  all_dependent_configs = [ ":rtc_base_all_dependent_config" ]

  sources = [
    "asyncinvoker-inl.h",
    "asyncinvoker.cc",
    "asyncinvoker.h",
    "asyncpacketsocket.cc",
    "asyncpacketsocket.h",
    "asyncresolverinterface.cc",
    "asyncresolverinterface.h",
    "asyncsocket.cc",
    "asyncsocket.h",
    "asynctcpsocket.cc",
    "asynctcpsocket.h",
    "asyncudpsocket.cc",
    "asyncudpsocket.h",
    "crc32.cc",
    "crc32.h",
    "cryptstring.cc",
    "cryptstring.h",
    "data_rate_limiter.cc",
    "data_rate_limiter.h",
    "dscp.h",
    "filerotatingstream.cc",
    "filerotatingstream.h",
    "fileutils.cc",
    "fileutils.h",
    "gunit_prod.h",
    "helpers.cc",
    "helpers.h",
    "httpcommon-inl.h",
    "httpcommon.cc",
    "httpcommon.h",
    "ipaddress.cc",
    "ipaddress.h",
    "keep_ref_until_done.h",
    "messagedigest.cc",
    "messagedigest.h",
    "messagehandler.cc",
    "messagehandler.h",
    "messagequeue.cc",
    "messagequeue.h",
    "nethelper.cc",
    "nethelper.h",
    "nethelpers.cc",
    "nethelpers.h",
    "network.cc",
    "network.h",
    "network_constants.h",
    "networkmonitor.cc",
    "networkmonitor.h",
    "networkroute.h",
    "nullsocketserver.cc",
    "nullsocketserver.h",
    "openssl.h",
    "openssladapter.cc",
    "openssladapter.h",
    "opensslcertificate.cc",
    "opensslcertificate.h",
    "openssldigest.cc",
    "openssldigest.h",
    "opensslidentity.cc",
    "opensslidentity.h",
    "opensslsessioncache.cc",
    "opensslsessioncache.h",
    "opensslstreamadapter.cc",
    "opensslstreamadapter.h",
    "opensslutility.cc",
    "opensslutility.h",
    "physicalsocketserver.cc",
    "physicalsocketserver.h",
    "proxyinfo.cc",
    "proxyinfo.h",
    "rtccertificate.cc",
    "rtccertificate.h",
    "rtccertificategenerator.cc",
    "rtccertificategenerator.h",
    "signalthread.cc",
    "signalthread.h",
    "sigslot.cc",
    "sigslot.h",
    "sigslotrepeater.h",
    "socket.cc",
    "socket.h",
    "socketadapters.cc",
    "socketadapters.h",
    "socketaddress.cc",
    "socketaddress.h",
    "socketaddresspair.cc",
    "socketaddresspair.h",
    "socketfactory.h",
    "socketserver.h",
    "socketstream.cc",
    "socketstream.h",
    "ssladapter.cc",
    "ssladapter.h",
    "sslcertificate.cc",
    "sslcertificate.h",
    "sslfingerprint.cc",
    "sslfingerprint.h",
    "sslidentity.cc",
    "sslidentity.h",
    "sslstreamadapter.cc",
    "sslstreamadapter.h",
    "stream.cc",
    "stream.h",
    "thread.cc",
    "thread.h",
  ]

  visibility = [
    ":rtc_base",
    ":rtc_base_objc",
  ]

  if (build_with_chromium) {
    if (is_win) {
      sources += [ "../../webrtc_overrides/rtc_base/win32socketinit.cc" ]
    }
    include_dirs = [ "../../boringssl/src/include" ]
    public_configs += [ ":rtc_base_chromium_config" ]
  } else {
    sources += [
      "callback.h",
      "logsinks.cc",
      "logsinks.h",
      "numerics/mathutils.h",
      "optionsfile.cc",
      "optionsfile.h",
      "rollingaccumulator.h",
      "sslroots.h",
      "transformadapter.cc",
      "transformadapter.h",
    ]

    if (is_win) {
      sources += [
        "win32socketinit.cc",
        "win32socketinit.h",
        "win32socketserver.cc",
        "win32socketserver.h",
      ]
    }
  }  # !build_with_chromium

  if (rtc_build_ssl) {
    deps += [ "//third_party/boringssl" ]
  } else {
    configs += [ ":external_ssl_library" ]
  }

  if (rtc_builtin_ssl_root_certificates) {
    defines += [ "WEBRTC_ENABLE_BUILT_IN_SSL_ROOT_CERTIFICATES" ]
  }

  if (is_android) {
    sources += [
      "ifaddrs-android.cc",
      "ifaddrs-android.h",
    ]

    libs += [
      "log",
      "GLESv2",
    ]
  }

  if (is_ios || is_mac) {
    sources += [ "macifaddrs_converter.cc" ]
  }

  if (rtc_use_x11) {
    libs += [
      "dl",
      "rt",
      "Xext",
      "X11",
      "Xcomposite",
      "Xrender",
    ]
  }

  if (is_linux) {
    libs += [
      "dl",
      "rt",
    ]
  }

  if (is_mac) {
    sources += [
      "macutils.cc",
      "macutils.h",
    ]
    libs += [
      # For ProcessInformationCopyDictionary in unixfilesystem.cc.
      "ApplicationServices.framework",
    ]
  }

  if (is_win) {
    sources += [
      "win32.cc",
      "win32.h",
      "win32filesystem.cc",
      "win32filesystem.h",
      "win32window.cc",
      "win32window.h",
    ]

    libs += [
      "crypt32.lib",
      "iphlpapi.lib",
      "secur32.lib",
    ]

    cflags += [
      # Suppress warnings about WIN32_LEAN_AND_MEAN.
      "/wd4005",
      "/wd4703",
    ]

    defines += [ "_CRT_NONSTDC_NO_DEPRECATE" ]
  }

  if (is_posix || is_fuchsia) {
    sources += [
      "ifaddrs_converter.cc",
      "ifaddrs_converter.h",
      "unixfilesystem.cc",
      "unixfilesystem.h",
    ]
  }

  if (is_nacl) {
    deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
    defines += [ "timezone=_timezone" ]
    sources -= [ "ifaddrs_converter.cc" ]
  }
}

rtc_source_set("gtest_prod") {
  visibility = [ "*" ]
  sources = [
    "gtest_prod_util.h",
  ]
}

config("rtc_base_tests_utils_exported_config") {
  defines = [ "GTEST_RELATIVE_PATH" ]
}

rtc_source_set("rtc_base_tests_utils") {
  testonly = true
  sources = [
    # Also use this as a convenient dumping ground for misc files that are
    # included by multiple targets below.
    "cpu_time.cc",
    "cpu_time.h",
    "fakeclock.cc",
    "fakeclock.h",
    "fakenetwork.h",
    "fakesslidentity.cc",
    "fakesslidentity.h",
    "firewallsocketserver.cc",
    "firewallsocketserver.h",
    "gunit.cc",
    "gunit.h",
    "httpbase.cc",
    "httpbase.h",
    "httpserver.cc",
    "httpserver.h",
    "memory_usage.cc",
    "memory_usage.h",
    "natserver.cc",
    "natserver.h",
    "natsocketfactory.cc",
    "natsocketfactory.h",
    "nattypes.cc",
    "nattypes.h",
    "proxyserver.cc",
    "proxyserver.h",
    "sigslottester.h",
    "sigslottester.h.pump",
    "testbase64.h",
    "testcertificateverifier.h",
    "testclient.cc",
    "testclient.h",
    "testechoserver.cc",
    "testechoserver.h",
    "testutils.cc",
    "testutils.h",
    "virtualsocketserver.cc",
    "virtualsocketserver.h",
  ]
  public_configs = [ ":rtc_base_tests_utils_exported_config" ]
  deps = [
    ":checks",
    ":rtc_base",
    ":stringutils",
    "../api/units:time_delta",
    "../test:field_trial",
    "../test:test_support",
    "system:fallthrough",
  ]
  public_deps = [
    "//testing/gtest",
  ]
}

rtc_source_set("rtc_task_queue_for_test") {
  visibility = [ "*" ]
  testonly = true

  sources = [
    "task_queue_for_test.cc",
    "task_queue_for_test.h",
  ]
  deps = [
    ":checks",
    ":rtc_base_approved",
    ":rtc_task_queue",
  ]
}

if (rtc_include_tests) {
  rtc_source_set("rtc_base_tests_main") {
    testonly = true
    sources = [
      "unittest_main.cc",
    ]
    public_configs = [ ":rtc_base_tests_utils_exported_config" ]
    deps = [
      ":rtc_base",
      ":rtc_base_approved",
      ":rtc_base_tests_utils",
      "../system_wrappers:field_trial_default",
      "../test:field_trial",
      "../test:fileutils",
      "../test:test_support",
    ]

    public_deps = [
      "//testing/gtest",
    ]
  }

  rtc_source_set("rtc_base_nonparallel_tests") {
    testonly = true

    sources = [
      "cpu_time_unittest.cc",
      "filerotatingstream_unittest.cc",
      "nullsocketserver_unittest.cc",
      "physicalsocketserver_unittest.cc",
      "socket_unittest.cc",
      "socket_unittest.h",
      "socketaddress_unittest.cc",
    ]
    deps = [
      ":checks",
      ":rtc_base",
      ":rtc_base_tests_main",
      ":rtc_base_tests_utils",
      "../system_wrappers:system_wrappers",
      "../test:fileutils",
      "../test:test_support",
      "//testing/gtest",
    ]
    if (is_win) {
      sources += [ "win32socketserver_unittest.cc" ]
    }
  }

  rtc_source_set("rtc_base_approved_unittests") {
    testonly = true
    if (is_msan) {
      cflags = [ "-fsanitize=memory" ]
    }
    sources = [
      "atomicops_unittest.cc",
      "base64_unittest.cc",
      "basictypes_unittest.cc",
      "bind_unittest.cc",
      "bitbuffer_unittest.cc",
      "bitrateallocationstrategy_unittest.cc",
      "buffer_unittest.cc",
      "bufferqueue_unittest.cc",
      "bytebuffer_unittest.cc",
      "byteorder_unittest.cc",
      "copyonwritebuffer_unittest.cc",
      "criticalsection_unittest.cc",
      "event_tracer_unittest.cc",
      "event_unittest.cc",
      "file_unittest.cc",
      "function_view_unittest.cc",
      "logging_unittest.cc",
      "numerics/histogram_percentile_counter_unittest.cc",
      "numerics/mod_ops_unittest.cc",
      "numerics/moving_max_counter_unittest.cc",
      "numerics/safe_compare_unittest.cc",
      "numerics/safe_minmax_unittest.cc",
      "numerics/sample_counter_unittest.cc",
      "onetimeevent_unittest.cc",
      "pathutils_unittest.cc",
      "platform_file_unittest.cc",
      "platform_thread_unittest.cc",
      "random_unittest.cc",
      "rate_limiter_unittest.cc",
      "rate_statistics_unittest.cc",
      "ratetracker_unittest.cc",
      "refcountedobject_unittest.cc",
      "sanitizer_unittest.cc",
      "string_to_number_unittest.cc",
      "stringencode_unittest.cc",
      "stringize_macros_unittest.cc",
      "strings/string_builder_unittest.cc",
      "stringutils_unittest.cc",
      "swap_queue_unittest.cc",
      "thread_annotations_unittest.cc",
      "thread_checker_unittest.cc",
      "timestampaligner_unittest.cc",
      "timeutils_unittest.cc",
      "virtualsocket_unittest.cc",
      "zero_memory_unittest.cc",
    ]
    if (is_win) {
      sources += [ "win/windows_version_unittest.cc" ]
    }
    deps = [
      ":checks",
      ":rate_limiter",
      ":rtc_base",
      ":rtc_base_approved",
      ":rtc_base_tests_main",
      ":rtc_base_tests_utils",
      ":rtc_task_queue",
      ":safe_compare",
      ":safe_minmax",
      ":sanitizer",
      ":stringutils",
      "../api:array_view",
      "../system_wrappers:system_wrappers",
      "../test:fileutils",
      "../test:test_support",
      "memory:unittests",
    ]
  }

  rtc_source_set("rtc_task_queue_unittests") {
    visibility = [ "*" ]
    testonly = true

    sources = [
      "task_queue_unittest.cc",
    ]
    deps = [
      ":rtc_base_approved",
      ":rtc_base_tests_main",
      ":rtc_base_tests_utils",
      ":rtc_task_queue",
      ":rtc_task_queue_for_test",
      "../test:test_support",
    ]
  }

  rtc_source_set("sequenced_task_checker_unittests") {
    testonly = true

    sources = [
      "sequenced_task_checker_unittest.cc",
    ]
    deps = [
      ":checks",
      ":rtc_base_approved",
      ":rtc_base_tests_main",
      ":rtc_task_queue",
      ":sequenced_task_checker",
      "../test:test_support",
    ]
  }

  rtc_source_set("weak_ptr_unittests") {
    testonly = true

    sources = [
      "weak_ptr_unittest.cc",
    ]
    deps = [
      ":rtc_base_approved_generic",
      ":rtc_base_tests_main",
      ":rtc_base_tests_utils",
      ":rtc_event",
      ":rtc_task_queue",
      ":weak_ptr",
      "../test:test_support",
    ]
  }

  rtc_source_set("rtc_numerics_unittests") {
    testonly = true

    sources = [
      "numerics/exp_filter_unittest.cc",
      "numerics/moving_median_filter_unittest.cc",
      "numerics/percentile_filter_unittest.cc",
      "numerics/sequence_number_util_unittest.cc",
    ]
    deps = [
      ":rtc_base_approved",
      ":rtc_base_tests_main",
      ":rtc_numerics",
      "../test:test_support",
    ]
  }

  rtc_source_set("rtc_base_unittests") {
    testonly = true
    defines = []

    sources = [
      "callback_unittest.cc",
      "crc32_unittest.cc",
      "data_rate_limiter_unittest.cc",
      "helpers_unittest.cc",
      "httpbase_unittest.cc",
      "httpcommon_unittest.cc",
      "httpserver_unittest.cc",
      "ipaddress_unittest.cc",
      "memory_usage_unittest.cc",
      "messagedigest_unittest.cc",
      "messagequeue_unittest.cc",
      "nat_unittest.cc",
      "network_unittest.cc",
      "optionsfile_unittest.cc",
      "proxy_unittest.cc",
      "ptr_util_unittest.cc",
      "rollingaccumulator_unittest.cc",
      "rtccertificate_unittest.cc",
      "rtccertificategenerator_unittest.cc",
      "signalthread_unittest.cc",
      "sigslot_unittest.cc",
      "sigslottester_unittest.cc",
      "stream_unittest.cc",
      "testclient_unittest.cc",
      "thread_unittest.cc",
    ]
    if (is_win) {
      sources += [
        "win32_unittest.cc",
        "win32window_unittest.cc",
      ]
    }
    if (is_posix || is_fuchsia) {
      sources += [
        "openssladapter_unittest.cc",
        "opensslsessioncache_unittest.cc",
        "opensslutility_unittest.cc",
        "ssladapter_unittest.cc",
        "sslidentity_unittest.cc",
        "sslstreamadapter_unittest.cc",
      ]
    }
    deps = [
      ":checks",
      ":rtc_base_tests_main",
      ":rtc_base_tests_utils",
      ":stringutils",
      "../api:array_view",
      "../api:optional",
      "../test:fileutils",
      "../test:test_support",
    ]
    public_deps = [
      ":rtc_base",
    ]
    if (build_with_chromium) {
      include_dirs = [ "../../boringssl/src/include" ]
    }
    if (rtc_build_ssl) {
      deps += [ "//third_party/boringssl" ]
    } else {
      configs += [ ":external_ssl_library" ]
    }

    if (!rtc_builtin_ssl_root_certificates) {
      defines += [ "WEBRTC_DISABLE_BUILT_IN_SSL_ROOT_CERTIFICATES" ]
    }
  }
}

if (is_android) {
  rtc_android_library("base_java") {
    java_files = [
      "java/src/org/webrtc/ContextUtils.java",
      "java/src/org/webrtc/Loggable.java",
      "java/src/org/webrtc/Logging.java",
      "java/src/org/webrtc/Size.java",
      "java/src/org/webrtc/ThreadUtils.java",
    ]
  }
}
