Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: webrtc/pc/BUILD.gn

Issue 2854123003: Build WebRTC with data channel only. (Closed)
Patch Set: Revert the android changes. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 1 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
2 # 2 #
3 # Use of this source code is governed by a BSD-style license 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 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 5 # tree. An additional intellectual property rights grant can be found
6 # in the file PATENTS. All contributing project authors may 6 # in the file PATENTS. All contributing project authors may
7 # be found in the AUTHORS file in the root of the source tree. 7 # be found in the AUTHORS file in the root of the source tree.
8 8
9 import("../webrtc.gni") 9 import("../webrtc.gni")
10 if (is_android) { 10 if (is_android) {
11 import("//build/config/android/config.gni") 11 import("//build/config/android/config.gni")
12 import("//build/config/android/rules.gni") 12 import("//build/config/android/rules.gni")
13 } 13 }
14 14
15 group("pc") { 15 group("pc") {
16 public_deps = [ 16 public_deps = [
17 ":rtc_pc", 17 ":rtc_pc",
18 ] 18 ]
19 } 19 }
20 20
21 config("rtc_pc_config") { 21 config("rtc_pc_config") {
22 defines = [] 22 defines = []
23 if (rtc_enable_sctp) { 23 if (rtc_enable_sctp) {
24 defines += [ "HAVE_SCTP" ] 24 defines += [ "HAVE_SCTP" ]
25 } 25 }
26 } 26 }
27 27
28 rtc_static_library("rtc_pc") { 28 rtc_static_library("rtc_pc_base") {
29 defines = [] 29 defines = []
30 sources = [ 30 sources = [
31 "audiomonitor.cc", 31 "audiomonitor.cc",
32 "audiomonitor.h", 32 "audiomonitor.h",
33 "bundlefilter.cc", 33 "bundlefilter.cc",
34 "bundlefilter.h", 34 "bundlefilter.h",
35 "channel.cc", 35 "channel.cc",
36 "channel.h", 36 "channel.h",
37 "channelmanager.cc", 37 "channelmanager.cc",
38 "channelmanager.h", 38 "channelmanager.h",
(...skipping 13 matching lines...) Expand all
52 "srtpfilter.h", 52 "srtpfilter.h",
53 "voicechannel.h", 53 "voicechannel.h",
54 ] 54 ]
55 55
56 deps = [ 56 deps = [
57 "..:webrtc_common", 57 "..:webrtc_common",
58 "../api:call_api", 58 "../api:call_api",
59 "../api:libjingle_peerconnection_api", 59 "../api:libjingle_peerconnection_api",
60 "../api:ortc_api", 60 "../api:ortc_api",
61 "../base:rtc_base", 61 "../base:rtc_base",
62 "../common_video:common_video", 62 "../base:rtc_task_queue",
63 "../media", 63 "../media:rtc_data",
64 "../media:rtc_media_base_data",
64 "../p2p:rtc_p2p", 65 "../p2p:rtc_p2p",
65 ] 66 ]
66 67
67 if (rtc_build_libsrtp) { 68 if (rtc_build_libsrtp) {
68 deps += [ "//third_party/libsrtp" ] 69 deps += [ "//third_party/libsrtp" ]
69 } 70 }
70 71
71 public_configs = [ ":rtc_pc_config" ] 72 public_configs = [ ":rtc_pc_config" ]
72 73
73 if (!build_with_chromium && is_clang) { 74 if (!build_with_chromium && is_clang) {
74 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 75 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
75 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 76 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
76 } 77 }
77 } 78 }
78 79
80 # TODO(zhihuang): Remove this once the downstream dependencies start using the
81 # modular targets.
82 rtc_source_set("rtc_pc") {
83 public_deps = [
84 ":rtc_pc_base",
85 ]
86
87 deps = [
88 "../media:rtc_audio_video",
89 ]
90 }
91
79 config("libjingle_peerconnection_warnings_config") { 92 config("libjingle_peerconnection_warnings_config") {
80 # GN orders flags on a target before flags from configs. The default config 93 # GN orders flags on a target before flags from configs. The default config
81 # adds these flags so to cancel them out they need to come from a config and 94 # adds these flags so to cancel them out they need to come from a config and
82 # cannot be on the target directly. 95 # cannot be on the target directly.
83 if (!is_win && !is_clang) { 96 if (!is_win && !is_clang) {
84 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC. 97 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC.
85 } 98 }
86 } 99 }
87 100
88 rtc_static_library("libjingle_peerconnection") { 101 rtc_static_library("peerconnection") {
89 cflags = [] 102 cflags = []
90 sources = [ 103 sources = [
91 "audiotrack.cc", 104 "audiotrack.cc",
92 "audiotrack.h", 105 "audiotrack.h",
93 "datachannel.cc", 106 "datachannel.cc",
94 "datachannel.h", 107 "datachannel.h",
95 "dtmfsender.cc", 108 "dtmfsender.cc",
96 "dtmfsender.h", 109 "dtmfsender.h",
97 "iceserverparsing.cc", 110 "iceserverparsing.cc",
98 "iceserverparsing.h", 111 "iceserverparsing.h",
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 ] 152 ]
140 153
141 configs += [ ":libjingle_peerconnection_warnings_config" ] 154 configs += [ ":libjingle_peerconnection_warnings_config" ]
142 155
143 if (!build_with_chromium && is_clang) { 156 if (!build_with_chromium && is_clang) {
144 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 157 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
145 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 158 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
146 } 159 }
147 160
148 deps = [ 161 deps = [
149 ":rtc_pc", 162 ":rtc_pc_base",
150 "..:webrtc_common", 163 "..:webrtc_common",
151 "../api:call_api", 164 "../api:call_api",
152 "../api:rtc_stats_api", 165 "../api:rtc_stats_api",
153 "../api/audio_codecs:builtin_audio_decoder_factory",
154 "../api/audio_codecs:builtin_audio_encoder_factory",
155 "../api/video_codecs:video_codecs_api", 166 "../api/video_codecs:video_codecs_api",
156 "../base:rtc_base", 167 "../base:rtc_base",
157 "../base:rtc_base_approved", 168 "../base:rtc_base_approved",
158 "../call", 169 "../call:call_interfaces",
159 "../logging:rtc_event_log_api", 170 "../logging:rtc_event_log_api",
160 "../media", 171 "../media:rtc_data",
161 "../modules/audio_device:audio_device", 172 "../media:rtc_media_base_data",
162 "../p2p:rtc_p2p", 173 "../p2p:rtc_p2p",
163 "../stats", 174 "../stats",
164 "../system_wrappers:system_wrappers", 175 "../system_wrappers:system_wrappers",
165 ] 176 ]
166 177
167 public_deps = [ 178 public_deps = [
168 "../api:libjingle_peerconnection_api", 179 "../api:libjingle_peerconnection_api",
169 ] 180 ]
181 }
182
183 # This target implements the CreatePeerConnectionFactory methods to build WebRTC
184 # with full support(audio, video and datachannel). The applications would be
185 # responsible to create their own implementation of CreatePeerConnectionFactory
186 # methods with different dependencies based on their requirements.
Taylor Brandstetter 2017/06/14 01:54:16 This comment is somewhat confusing without the con
Zhi Huang 2017/06/14 06:57:01 Done.
187 rtc_static_library("create_pc_factory") {
188 sources = [
189 "createpeerconnectionfactory.cc",
190 ]
191
192 deps = [
193 "../api:audio_mixer_api",
194 "../api:libjingle_peerconnection_api",
195 "../api/audio_codecs:audio_codecs_api",
196 "../api/audio_codecs:builtin_audio_decoder_factory",
197 "../api/audio_codecs:builtin_audio_encoder_factory",
198 "../base:rtc_base",
199 "../base:rtc_base_approved",
200 "../call",
201 "../call:call_interfaces",
202 "../logging:rtc_event_log_api",
203 "../media:rtc_audio_video",
204 "../modules/audio_device:audio_device",
205 ]
206
207 configs += [ ":libjingle_peerconnection_warnings_config" ]
208
209 if (!build_with_chromium && is_clang) {
210 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
211 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
212 }
213 }
214
215 # TODO(zhihuang): Remove this once the downstream dependencies start using the
Taylor Brandstetter 2017/06/14 01:54:16 Again, I don't think we want to deprecate this yet
Zhi Huang 2017/06/14 06:57:01 Done.
216 # modular targets.
217 rtc_source_set("libjingle_peerconnection") {
218 public_deps = [
219 ":create_pc_factory",
220 ":peerconnection",
221 "../api:libjingle_peerconnection_api",
222 ]
170 223
171 if (rtc_use_quic) { 224 if (rtc_use_quic) {
172 sources += [ 225 sources += [
173 "quicdatachannel.cc", 226 "quicdatachannel.cc",
174 "quicdatachannel.h", 227 "quicdatachannel.h",
175 "quicdatatransport.cc", 228 "quicdatatransport.cc",
176 "quicdatatransport.h", 229 "quicdatatransport.h",
177 ] 230 ]
178 deps += [ "//third_party/libquic" ] 231 deps += [ "//third_party/libquic" ]
179 public_deps = [ 232 public_deps = [
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 "//testing/gmock", 445 "//testing/gmock",
393 ] 446 ]
394 447
395 if (is_android) { 448 if (is_android) {
396 deps += [ "//testing/android/native_test:native_test_support" ] 449 deps += [ "//testing/android/native_test:native_test_support" ]
397 450
398 shard_timeout = 900 451 shard_timeout = 900
399 } 452 }
400 } 453 }
401 } 454 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698