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

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

Issue 2854123003: Build WebRTC with data channel only. (Closed)
Patch Set: Try to make work internallly. 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.
187 # The target "create_pc_factory_datachannelonly" is an example.
the sun 2017/06/13 14:34:38 nit: comment referes to nonexistent target
Zhi Huang 2017/06/14 06:57:00 Done.
188 rtc_static_library("create_pc_factory") {
189 sources = [
190 "createpeerconnectionfactory.cc",
191 ]
192
193 deps = [
194 "../api:audio_mixer_api",
195 "../api:libjingle_peerconnection_api",
196 "../api/audio_codecs:audio_codecs_api",
197 "../api/audio_codecs:builtin_audio_decoder_factory",
198 "../api/audio_codecs:builtin_audio_encoder_factory",
199 "../base:rtc_base",
200 "../base:rtc_base_approved",
201 "../call",
202 "../call:call_interfaces",
203 "../logging:rtc_event_log_api",
204 "../media:rtc_audio_video",
205 "../modules/audio_device:audio_device",
206 ]
207
208 configs += [ ":libjingle_peerconnection_warnings_config" ]
209
210 if (!build_with_chromium && is_clang) {
211 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
212 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
213 }
214 }
215
216 # TODO(zhihuang): Remove this once the downstream dependencies start using the
217 # modular targets.
218 rtc_source_set("libjingle_peerconnection") {
219 public_deps = [
220 ":create_pc_factory",
221 ":peerconnection",
222 "../api:libjingle_peerconnection_api",
223 ]
170 224
171 if (rtc_use_quic) { 225 if (rtc_use_quic) {
172 sources += [ 226 sources += [
173 "quicdatachannel.cc", 227 "quicdatachannel.cc",
174 "quicdatachannel.h", 228 "quicdatachannel.h",
175 "quicdatatransport.cc", 229 "quicdatatransport.cc",
176 "quicdatatransport.h", 230 "quicdatatransport.h",
177 ] 231 ]
178 deps += [ "//third_party/libquic" ] 232 deps += [ "//third_party/libquic" ]
179 public_deps = [ 233 public_deps = [
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 "//testing/gmock", 446 "//testing/gmock",
393 ] 447 ]
394 448
395 if (is_android) { 449 if (is_android) {
396 deps += [ "//testing/android/native_test:native_test_support" ] 450 deps += [ "//testing/android/native_test:native_test_support" ]
397 451
398 shard_timeout = 900 452 shard_timeout = 900
399 } 453 }
400 } 454 }
401 } 455 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698