# 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:no_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",
    "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" ]
    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",
  ]
}

config("rtc_base_warnings_config") {
  if (is_win && is_clang) {
    cflags = [
      # Disable warnings failing when compiling with Clang on Windows.
      # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
      "-Wno-sign-compare",
      "-Wno-missing-braces",
    ]
  }
}

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",
    "opensslcommon.cc",
    "opensslcommon.h",
    "openssldigest.cc",
    "openssldigest.h",
    "opensslidentity.cc",
    "opensslidentity.h",
    "opensslsessioncache.cc",
    "opensslsessioncache.h",
    "opensslstreamadapter.cc",
    "opensslstreamadapter.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",
    "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",
  ]

  # TODO(henrike): issue 3307, make rtc_base build with the Chromium default
  # compiler settings.
  suppressed_configs += [ "//build/config/compiler:chromium_code" ]
  configs += [ "//build/config/compiler:no_chromium_code" ]
  if (!is_win) {
    cflags += [ "-Wno-uninitialized" ]
  }

  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 {
    configs += [ ":rtc_base_warnings_config" ]
    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 (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" ]
}

config("rtc_base_tests_utils_warnings_config") {
  if (is_win && is_clang) {
    cflags = [
      # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6270
      "-Wno-reorder",
      "-Wno-sign-compare",
    ]
  }
}

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",
    "testclient.cc",
    "testclient.h",
    "testechoserver.cc",
    "testechoserver.h",
    "testutils.cc",
    "testutils.h",
    "timedelta.h",
    "virtualsocketserver.cc",
    "virtualsocketserver.h",
  ]
  configs += [ ":rtc_base_tests_utils_warnings_config" ]
  public_configs = [ ":rtc_base_tests_utils_exported_config" ]
  deps = [
    ":checks",
    ":rtc_base",
    ":stringutils",
    "../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",
      "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",
    ]
    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",
    ]
  }

  config("rtc_base_unittests_config") {
    if (is_clang) {
      cflags = [ "-Wno-unused-const-variable" ]
    }
  }
  rtc_source_set("rtc_base_unittests") {
    testonly = true

    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",
        "opensslcommon_unittest.cc",
        "opensslsessioncache_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",
    ]
    configs += [ ":rtc_base_unittests_config" ]
    if (build_with_chromium) {
      include_dirs = [ "../../boringssl/src/include" ]
    }
    if (rtc_build_ssl) {
      deps += [ "//third_party/boringssl" ]
    } else {
      configs += [ ":external_ssl_library" ]
    }
  }
}

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