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

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

Issue 2514883002: Create //webrtc/api:libjingle_peerconnection_api + refactorings. (Closed)
Patch Set: Rebase 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
46 # TODO(ossu): Put fakemetricobserver in a separate target for api mock/fake
47 # classes.
48 "fakemetricsobserver.cc",
49 "fakemetricsobserver.h",
59 "jsep.h", 50 "jsep.h",
60 "jsepicecandidate.cc",
61 "jsepicecandidate.h",
62 "jsepsessiondescription.cc",
63 "jsepsessiondescription.h", 51 "jsepsessiondescription.h",
64 "localaudiosource.cc",
65 "localaudiosource.h",
66 "mediaconstraintsinterface.cc", 52 "mediaconstraintsinterface.cc",
67 "mediaconstraintsinterface.h", 53 "mediaconstraintsinterface.h",
68 "mediacontroller.cc",
69 "mediacontroller.h", 54 "mediacontroller.h",
70 "mediastream.cc",
71 "mediastream.h", 55 "mediastream.h",
72 "mediastreaminterface.h", 56 "mediastreaminterface.h",
73 "mediastreamobserver.cc",
74 "mediastreamobserver.h",
75 "mediastreamproxy.h", 57 "mediastreamproxy.h",
76 "mediastreamtrack.h", 58 "mediastreamtrack.h",
77 "mediastreamtrackproxy.h", 59 "mediastreamtrackproxy.h",
60 "mediatypes.cc",
61 "mediatypes.h",
78 "notifier.h", 62 "notifier.h",
79 "peerconnection.cc",
80 "peerconnection.h",
81 "peerconnectionfactory.cc",
82 "peerconnectionfactory.h",
83 "peerconnectionfactoryproxy.h", 63 "peerconnectionfactoryproxy.h",
84 "peerconnectioninterface.h", 64 "peerconnectioninterface.h",
85 "peerconnectionproxy.h", 65 "peerconnectionproxy.h",
86 "proxy.h", 66 "proxy.h",
87 "remoteaudiosource.cc",
88 "remoteaudiosource.h",
89 "rtcstatscollector.cc",
90 "rtcstatscollector.h",
91 "rtpparameters.h", 67 "rtpparameters.h",
92 "rtpreceiver.cc",
93 "rtpreceiver.h",
94 "rtpreceiverinterface.h", 68 "rtpreceiverinterface.h",
95 "rtpsender.cc",
96 "rtpsender.h", 69 "rtpsender.h",
97 "rtpsenderinterface.h", 70 "rtpsenderinterface.h",
98 "sctputils.cc",
99 "sctputils.h",
100 "statscollector.cc",
101 "statscollector.h",
102 "statstypes.cc", 71 "statstypes.cc",
103 "statstypes.h", 72 "statstypes.h",
104 "streamcollection.h", 73 "streamcollection.h",
105 "videocapturertracksource.cc", 74 "test/fakeconstraints.h",
kjellander_webrtc 2016/12/20 07:17:06 This wasn't here before and seems to be only inclu
ossu 2017/01/12 14:03:06 Yeah, putting testing-specific things into a separ
106 "videocapturertracksource.h", 75 "umametrics.h",
107 "videosourceproxy.h", 76 "videosourceproxy.h",
108 "videotrack.cc",
109 "videotrack.h",
110 "videotracksource.cc",
111 "videotracksource.h", 77 "videotracksource.h",
112 "webrtcsdp.cc",
113 "webrtcsdp.h",
114 "webrtcsession.cc",
115 "webrtcsession.h",
116 "webrtcsessiondescriptionfactory.cc",
117 "webrtcsessiondescriptionfactory.h",
118 ] 78 ]
119 79
120 configs += [ ":libjingle_peerconnection_warnings_config" ]
121
122 if (!build_with_chromium && is_clang) { 80 if (!build_with_chromium && is_clang) {
123 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 81 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
124 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 82 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
125 } 83 }
126 84
127 deps = [ 85 deps = [
128 ":call_api",
129 ":rtc_stats_api", 86 ":rtc_stats_api",
130 "../call",
131 "../media",
132 "../pc",
133 "../stats",
134 ] 87 ]
88 }
135 89
136 if (rtc_use_quic) { 90 # TODO(ossu): Remove once downstream projects have updated.
137 sources += [ 91 rtc_source_set("libjingle_peerconnection") {
138 "quicdatachannel.cc", 92 deps = [
139 "quicdatachannel.h", 93 "../pc:libjingle_peerconnection",
140 "quicdatatransport.cc", 94 ]
141 "quicdatatransport.h",
142 ]
143 deps += [ "//third_party/libquic" ]
144 public_deps = [
145 "//third_party/libquic",
146 ]
147 }
148 } 95 }
149 96
150 rtc_source_set("rtc_stats_api") { 97 rtc_source_set("rtc_stats_api") {
151 cflags = [] 98 cflags = []
152 sources = [ 99 sources = [
153 "stats/rtcstats.h", 100 "stats/rtcstats.h",
154 "stats/rtcstats_objects.h", 101 "stats/rtcstats_objects.h",
102 "stats/rtcstatscollectorcallback.h",
155 "stats/rtcstatsreport.h", 103 "stats/rtcstatsreport.h",
156 ] 104 ]
157 105
158 deps = [ 106 deps = [
159 "../base:rtc_base_approved", 107 "../base:rtc_base_approved",
160 ] 108 ]
161 } 109 }
162 110
163 rtc_source_set("audio_mixer_api") { 111 rtc_source_set("audio_mixer_api") {
164 sources = [ 112 sources = [
(...skipping 27 matching lines...) Expand all
192 public_deps = [ 140 public_deps = [
193 "$rtc_libyuv_dir", 141 "$rtc_libyuv_dir",
194 ] 142 ]
195 } else { 143 } else {
196 # Need to add a directory normally exported by libyuv. 144 # Need to add a directory normally exported by libyuv.
197 include_dirs = [ "$rtc_libyuv_dir/include" ] 145 include_dirs = [ "$rtc_libyuv_dir/include" ]
198 } 146 }
199 } 147 }
200 148
201 if (rtc_include_tests) { 149 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") { 150 rtc_source_set("mock_audio_mixer") {
326 testonly = true 151 testonly = true
327 sources = [ 152 sources = [
328 "test/mock_audio_mixer.h", 153 "test/mock_audio_mixer.h",
329 ] 154 ]
330 155
331 public_deps = [ 156 public_deps = [
332 ":audio_mixer_api", 157 ":audio_mixer_api",
333 ] 158 ]
334 159
335 deps = [ 160 deps = [
336 "//testing/gmock", 161 "//testing/gmock",
337 "//webrtc/test:test_support", 162 "//webrtc/test:test_support",
338 ] 163 ]
339 } 164 }
340 } 165 }
OLDNEW
« no previous file with comments | « webrtc/BUILD.gn ('k') | webrtc/api/DEPS » ('j') | webrtc/api/jsepicecandidate.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698