blob: 143e06572212f6c64d2d2431db8d1b6d88fab0da [file] [log] [blame]
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/chromecast_build.gni")
group("webrtc_overrides") {
public_deps = [
":webrtc",
]
}
config("jingle_unexported_configs") {
include_dirs = [
"../../third_party/webrtc_overrides",
"../../testing/gtest/include",
"../../third_party/libyuv/include",
"../../third_party/usrsctp/usrsctplib",
"../../third_party/webrtc",
]
}
config("jingle_public_configs") {
include_dirs = [
"../../third_party/webrtc_overrides",
"../../testing/gtest/include",
"../../third_party/webrtc",
]
}
source_set("webrtc") {
public_deps = [
# TODO(kjellander): Start cleaning up this target as soon as
# https://codereview.chromium.org/2022833002/ is landed. The target should
# be removed entirely if possible.
"//third_party/libjingle_xmpp:rtc_task_runner",
"//third_party/webrtc/rtc_base:rtc_base_approved",
]
deps = [
"//third_party/webrtc/p2p:rtc_p2p",
]
if (is_win) {
cflags = [ "/wd4005" ]
}
# When Chromium is built for NACL or Chromecast, WebRTC provides a
# field_trial implementation so there is no need to depend on
# ":field_trial".
# This configuration happens here:
# https://cs.chromium.org/chromium/src/third_party/webrtc/webrtc.gni?l=44-51&rcl=95c56eebe0a2b31ad5752138d15b431124e17d36
if (is_nacl) {
deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
} else if (!is_chromecast) {
# When Chromium doesn't build for NaCL or Chromecast, WebRTC doesn't
# provide an implementation for field_trial and a custom one (that uses
# base/metrics/field_trial.h is provided).
deps += [
":field_trial",
"//base",
]
}
configs += [
":jingle_unexported_configs",
"//third_party/webrtc:common_config",
]
public_configs = [
":jingle_public_configs",
"//third_party/webrtc:common_inherited_config",
]
}
static_library("init_webrtc") {
sources = [
"init_webrtc.cc",
"init_webrtc.h",
]
configs += [
":jingle_unexported_configs",
"//third_party/webrtc:common_config",
]
public_configs = [
":jingle_public_configs",
"//third_party/webrtc:common_inherited_config",
]
public_deps = [
":libjingle_webrtc_common",
]
deps = [
":metrics",
":task_queue_impl",
"//base",
"//third_party/webrtc/rtc_base",
"//third_party/webrtc/system_wrappers",
]
}
static_library("metrics") {
sources = [
"metrics.cc",
]
deps = [
"//base",
]
}
static_library("field_trial") {
sources = [
"field_trial.cc",
]
deps = [
"//base",
]
}
source_set("libjingle_webrtc_common") {
configs += [
":jingle_unexported_configs",
"//third_party/webrtc:common_config",
]
public_configs = [
":jingle_public_configs",
"//third_party/webrtc:common_inherited_config",
]
deps = [
":webrtc",
"//third_party/libsrtp",
"//third_party/usrsctp",
"//third_party/webrtc/media:rtc_media",
"//third_party/webrtc/media:rtc_media_base",
"//third_party/webrtc/modules/video_capture",
"//third_party/webrtc/pc:libjingle_peerconnection",
"//third_party/webrtc/pc:rtc_pc",
"//third_party/webrtc/system_wrappers",
]
}
source_set("task_queue_impl") {
sources = [
"rtc_base/task_queue.cc",
]
configs += [ "//third_party/webrtc:library_impl_config" ]
deps = [
"//base",
"//third_party/webrtc/rtc_base:refcount",
"//third_party/webrtc/rtc_base:rtc_task_queue_api",
]
}