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

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

Issue 2514883002: Create //webrtc/api:libjingle_peerconnection_api + refactorings. (Closed)
Patch Set: Added three headers for backwards-compatibility, specifically for building chromium. Created 4 years 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) 2015 The WebRTC project authors. All Rights Reserved. 1 # Copyright (c) 2015 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("../build/webrtc.gni") 9 import("../build/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("api") { 15 group("api") {
16 public_deps = [ 16 public_deps = [
17 ":libjingle_peerconnection", 17 ":libjingle_peerconnection_api",
18 ] 18 ]
19 } 19 }
20 20
21 rtc_source_set("call_api") { 21 rtc_source_set("call_api") {
22 sources = [ 22 sources = [
23 "call/audio_sink.h", 23 "call/audio_sink.h",
24 "call/flexfec_receive_stream.h", 24 "call/flexfec_receive_stream.h",
25 ] 25 ]
26 26
27 deps = [ 27 deps = [
28 # TODO(kjellander): Add remaining dependencies when webrtc:4243 is done. 28 # TODO(kjellander): Add remaining dependencies when webrtc:4243 is done.
29 ":audio_mixer_api", 29 ":audio_mixer_api",
30 ":transport_api", 30 ":transport_api",
31 "..:webrtc_common", 31 "..:webrtc_common",
32 "../base:rtc_base_approved", 32 "../base:rtc_base_approved",
33 "../modules/audio_coding:audio_decoder_factory_interface", 33 "../modules/audio_coding:audio_decoder_factory_interface",
34 "../modules/audio_coding:audio_encoder_interface", 34 "../modules/audio_coding:audio_encoder_interface",
35 ] 35 ]
36 } 36 }
37 37
38 config("libjingle_peerconnection_warnings_config") { 38 rtc_static_library("libjingle_peerconnection_api") {
39 # GN orders flags on a target before flags from configs. The default config
40 # adds these flags so to cancel them out they need to come from a config and
41 # cannot be on the target directly.
42 if (!is_win && !is_clang) {
43 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC.
44 }
45 }
46
47 rtc_static_library("libjingle_peerconnection") {
48 check_includes = false # TODO(kjellander): Remove (bugs.webrtc.org/6828) 39 check_includes = false # TODO(kjellander): Remove (bugs.webrtc.org/6828)
49 cflags = [] 40 cflags = []
50 sources = [ 41 sources = [
51 "audiotrack.cc",
52 "audiotrack.h",
53 "datachannel.cc",
54 "datachannel.h", 42 "datachannel.h",
55 "datachannelinterface.h", 43 "datachannelinterface.h",
56 "dtmfsender.cc",
57 "dtmfsender.h",
58 "dtmfsenderinterface.h", 44 "dtmfsenderinterface.h",
45 "fakemetricsobserver.cc",
Taylor Brandstetter 2016/12/15 21:31:54 I'd still add a "TODO: Put this in a separate targ
ossu 2016/12/16 09:45:33 Will do!
46 "fakemetricsobserver.h",
59 "jsep.h", 47 "jsep.h",
60 "jsepicecandidate.cc",
61 "jsepicecandidate.h",
62 "jsepsessiondescription.cc",
63 "jsepsessiondescription.h", 48 "jsepsessiondescription.h",
64 "localaudiosource.cc",
65 "localaudiosource.h",
66 "mediaconstraintsinterface.cc", 49 "mediaconstraintsinterface.cc",
67 "mediaconstraintsinterface.h", 50 "mediaconstraintsinterface.h",
68 "mediacontroller.cc",
69 "mediacontroller.h", 51 "mediacontroller.h",
70 "mediastream.cc",
71 "mediastream.h", 52 "mediastream.h",
72 "mediastreaminterface.h", 53 "mediastreaminterface.h",
73 "mediastreamobserver.cc",
74 "mediastreamobserver.h",
75 "mediastreamproxy.h", 54 "mediastreamproxy.h",
76 "mediastreamtrack.h", 55 "mediastreamtrack.h",
77 "mediastreamtrackproxy.h", 56 "mediastreamtrackproxy.h",
57 "mediatypes.cc",
58 "mediatypes.h",
78 "notifier.h", 59 "notifier.h",
79 "peerconnection.cc",
80 "peerconnection.h",
81 "peerconnectionfactory.cc",
82 "peerconnectionfactory.h",
83 "peerconnectionfactoryproxy.h", 60 "peerconnectionfactoryproxy.h",
84 "peerconnectioninterface.h", 61 "peerconnectioninterface.h",
85 "peerconnectionproxy.h", 62 "peerconnectionproxy.h",
86 "proxy.h", 63 "proxy.h",
87 "remoteaudiosource.cc",
88 "remoteaudiosource.h",
89 "rtcstatscollector.cc",
90 "rtcstatscollector.h",
91 "rtpparameters.h", 64 "rtpparameters.h",
92 "rtpreceiver.cc",
93 "rtpreceiver.h",
94 "rtpreceiverinterface.h", 65 "rtpreceiverinterface.h",
95 "rtpsender.cc",
96 "rtpsender.h", 66 "rtpsender.h",
97 "rtpsenderinterface.h", 67 "rtpsenderinterface.h",
98 "sctputils.cc",
99 "sctputils.h",
100 "statscollector.cc",
101 "statscollector.h",
102 "statstypes.cc", 68 "statstypes.cc",
103 "statstypes.h", 69 "statstypes.h",
104 "streamcollection.h", 70 "streamcollection.h",
105 "videocapturertracksource.cc", 71 "test/fakeconstraints.h",
106 "videocapturertracksource.h", 72 "umametrics.h",
107 "videosourceproxy.h", 73 "videosourceproxy.h",
108 "videotrack.cc",
109 "videotrack.h",
110 "videotracksource.cc",
111 "videotracksource.h", 74 "videotracksource.h",
112 "webrtcsdp.cc",
113 "webrtcsdp.h",
114 "webrtcsession.cc",
115 "webrtcsession.h",
116 "webrtcsessiondescriptionfactory.cc",
117 "webrtcsessiondescriptionfactory.h",
118 ] 75 ]
119 76
120 configs += [ ":libjingle_peerconnection_warnings_config" ]
121
122 if (!build_with_chromium && is_clang) { 77 if (!build_with_chromium && is_clang) {
123 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 78 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
124 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 79 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
125 } 80 }
126 81
127 deps = [ 82 deps = [
128 ":call_api",
129 ":rtc_stats_api", 83 ":rtc_stats_api",
130 "../call",
131 "../media",
132 "../pc",
133 "../stats",
134 ] 84 ]
85 }
135 86
136 if (rtc_use_quic) { 87 # TODO(ossu): Remove once downstream projects have updated.
137 sources += [ 88 rtc_source_set("libjingle_peerconnection") {
138 "quicdatachannel.cc", 89 deps = [
139 "quicdatachannel.h", 90 "../pc:libjingle_peerconnection",
140 "quicdatatransport.cc", 91 ]
141 "quicdatatransport.h",
142 ]
143 deps += [ "//third_party/libquic" ]
144 public_deps = [
145 "//third_party/libquic",
146 ]
147 }
148 } 92 }
149 93
150 rtc_source_set("rtc_stats_api") { 94 rtc_source_set("rtc_stats_api") {
151 cflags = [] 95 cflags = []
152 sources = [ 96 sources = [
153 "stats/rtcstats.h", 97 "stats/rtcstats.h",
154 "stats/rtcstats_objects.h", 98 "stats/rtcstats_objects.h",
99 "stats/rtcstatscollectorcallback.h",
155 "stats/rtcstatsreport.h", 100 "stats/rtcstatsreport.h",
156 ] 101 ]
157 102
158 deps = [ 103 deps = [
159 "../base:rtc_base_approved", 104 "../base:rtc_base_approved",
160 ] 105 ]
161 } 106 }
162 107
163 rtc_source_set("audio_mixer_api") { 108 rtc_source_set("audio_mixer_api") {
164 sources = [ 109 sources = [
(...skipping 27 matching lines...) Expand all
192 public_deps = [ 137 public_deps = [
193 "$rtc_libyuv_dir", 138 "$rtc_libyuv_dir",
194 ] 139 ]
195 } else { 140 } else {
196 # Need to add a directory normally exported by libyuv. 141 # Need to add a directory normally exported by libyuv.
197 include_dirs = [ "$rtc_libyuv_dir/include" ] 142 include_dirs = [ "$rtc_libyuv_dir/include" ]
198 } 143 }
199 } 144 }
200 145
201 if (rtc_include_tests) { 146 if (rtc_include_tests) {
202 config("peerconnection_unittests_config") {
203 # The warnings below are enabled by default. Since GN orders compiler flags
204 # for a target before flags from configs, the only way to disable such
205 # warnings is by having them in a separate config, loaded from the target.
206 # TODO(kjellander): Make the code compile without disabling these flags.
207 # See https://bugs.webrtc.org/3307.
208 if (is_clang && is_win) {
209 cflags = [
210 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6267
211 # for -Wno-sign-compare
212 "-Wno-sign-compare",
213 "-Wno-unused-function",
214 ]
215 }
216
217 if (!is_win) {
218 cflags = [ "-Wno-sign-compare" ]
219 }
220 }
221
222 rtc_test("peerconnection_unittests") {
223 check_includes = false # TODO(kjellander): Remove (bugs.webrtc.org/6828)
224 testonly = true
225 sources = [
226 "datachannel_unittest.cc",
227 "dtmfsender_unittest.cc",
228 "fakemetricsobserver.cc",
229 "fakemetricsobserver.h",
230 "jsepsessiondescription_unittest.cc",
231 "localaudiosource_unittest.cc",
232 "mediaconstraintsinterface_unittest.cc",
233 "mediastream_unittest.cc",
234 "peerconnection_unittest.cc",
235 "peerconnectionendtoend_unittest.cc",
236 "peerconnectionfactory_unittest.cc",
237 "peerconnectioninterface_unittest.cc",
238 "proxy_unittest.cc",
239 "rtcstats_integrationtest.cc",
240 "rtcstatscollector_unittest.cc",
241 "rtpsenderreceiver_unittest.cc",
242 "sctputils_unittest.cc",
243 "statscollector_unittest.cc",
244 "test/fakeaudiocapturemodule.cc",
245 "test/fakeaudiocapturemodule.h",
246 "test/fakeaudiocapturemodule_unittest.cc",
247 "test/fakeconstraints.h",
248 "test/fakedatachannelprovider.h",
249 "test/fakeperiodicvideocapturer.h",
250 "test/fakertccertificategenerator.h",
251 "test/fakevideotrackrenderer.h",
252 "test/mock_datachannel.h",
253 "test/mock_peerconnection.h",
254 "test/mock_webrtcsession.h",
255 "test/mockpeerconnectionobservers.h",
256 "test/peerconnectiontestwrapper.cc",
257 "test/peerconnectiontestwrapper.h",
258 "test/rtcstatsobtainer.h",
259 "test/testsdpstrings.h",
260 "videocapturertracksource_unittest.cc",
261 "videotrack_unittest.cc",
262 "webrtcsdp_unittest.cc",
263 "webrtcsession_unittest.cc",
264 ]
265
266 defines = [ "HAVE_SCTP" ]
267
268 configs += [ ":peerconnection_unittests_config" ]
269
270 if (!build_with_chromium && is_clang) {
271 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
272 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
273 }
274
275 # TODO(jschuh): Bug 1348: fix this warning.
276 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
277
278 if (is_win) {
279 cflags = [
280 "/wd4245", # conversion from int to size_t, signed/unsigned mismatch.
281 "/wd4389", # signed/unsigned mismatch.
282 ]
283 }
284
285 if (rtc_use_quic) {
286 public_deps = [
287 "//third_party/libquic",
288 ]
289 sources += [
290 "quicdatachannel_unittest.cc",
291 "quicdatatransport_unittest.cc",
292 ]
293 }
294
295 deps = []
296 if (is_android) {
297 sources += [
298 "test/androidtestinitializer.cc",
299 "test/androidtestinitializer.h",
300 ]
301 deps += [
302 "//testing/android/native_test:native_test_support",
303 "//webrtc/sdk/android:libjingle_peerconnection_java",
304 "//webrtc/sdk/android:libjingle_peerconnection_jni",
305 ]
306 }
307
308 deps += [
309 ":libjingle_peerconnection",
310 "..:webrtc_common",
311 "../base:rtc_base_tests_utils",
312 "../media:rtc_unittest_main",
313 "../pc:rtc_pc",
314 "../system_wrappers:metrics_default",
315 "//testing/gmock",
316 ]
317
318 if (is_android) {
319 deps += [ "//testing/android/native_test:native_test_support" ]
320
321 shard_timeout = 900
322 }
323 }
324
325 rtc_source_set("mock_audio_mixer") { 147 rtc_source_set("mock_audio_mixer") {
326 testonly = true 148 testonly = true
327 sources = [ 149 sources = [
328 "test/mock_audio_mixer.h", 150 "test/mock_audio_mixer.h",
329 ] 151 ]
330 152
331 public_deps = [ 153 public_deps = [
332 ":audio_mixer_api", 154 ":audio_mixer_api",
333 ] 155 ]
334 156
335 deps = [ 157 deps = [
336 "//testing/gmock", 158 "//testing/gmock",
337 "//webrtc/test:test_support", 159 "//webrtc/test:test_support",
338 ] 160 ]
339 } 161 }
340 } 162 }
OLDNEW
« no previous file with comments | « webrtc/BUILD.gn ('k') | webrtc/api/DEPS » ('j') | webrtc/api/datachannel.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698