summaryrefslogtreecommitdiff
path: root/chromium/third_party/webrtc_overrides/BUILD.gn
blob: ee7025025984bcda03c190ea05db1f11fb52b943 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# 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",
  ]
}

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/webrtc/rtc_base:rtc_base_approved",
  ]
  deps = [
    "//third_party/webrtc/p2p:rtc_p2p",
  ]

  # 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_chromecast && !is_nacl) {
    # 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 += [
    "//third_party/webrtc:common_config",
  ]
  public_configs = [
    "//third_party/webrtc:common_inherited_config",
  ]
}

static_library("init_webrtc") {
  sources = [
    "init_webrtc.cc",
    "init_webrtc.h",
  ]
  configs += [
    "//third_party/webrtc:common_config",
  ]
  public_configs = [
    "//third_party/webrtc:common_inherited_config",

    # TODO(mbonadei): Abseil config propagation is needed because
    # WebRTC's BUILD.gn files don't use `public_deps`, there are
    # good reasons for this, but they may disappear in the future.
    # In that case it is ok to remove these two lines.
    "//third_party/abseil-cpp:absl_include_config",
    "//third_party/abseil-cpp:absl_define_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 += [
    "//third_party/webrtc:common_config",
  ]
  public_configs = [
    "//third_party/webrtc:common_inherited_config",
  ]

  deps = [
    ":webrtc",
    "//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",
  ]
}