OLD | NEW |
---|---|
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("//build/config/linux/pkg_config.gni") | 9 import("//build/config/linux/pkg_config.gni") |
10 import("../build/webrtc.gni") | 10 import("../build/webrtc.gni") |
11 import("//testing/test.gni") | |
11 | 12 |
12 group("media") { | 13 group("media") { |
13 deps = [ | 14 deps = [ |
14 ":rtc_media", | 15 ":rtc_media", |
15 ] | 16 ] |
16 } | 17 } |
17 | 18 |
18 config("rtc_media_defines_config") { | 19 config("rtc_media_defines_config") { |
19 defines = [ | 20 defines = [ |
20 "HAVE_WEBRTC_VIDEO", | 21 "HAVE_WEBRTC_VIDEO", |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
118 ] | 119 ] |
119 | 120 |
120 configs += [ | 121 configs += [ |
121 "..:common_config", | 122 "..:common_config", |
122 ":rtc_media_warnings_config", | 123 ":rtc_media_warnings_config", |
123 ] | 124 ] |
124 | 125 |
125 public_configs = [ "..:common_inherited_config" ] | 126 public_configs = [ "..:common_inherited_config" ] |
126 | 127 |
127 if (is_clang) { | 128 if (is_clang) { |
128 # Suppress warnings from Chrome's Clang plugins. | 129 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
129 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. | 130 configs -= [ |
130 configs -= [ "//build/config/clang:extra_warnings" ] | 131 "//build/config/clang:extra_warnings", |
131 configs -= [ "//build/config/clang:find_bad_constructs" ] | 132 "//build/config/clang:find_bad_constructs", |
133 ] | |
132 } | 134 } |
133 | 135 |
134 if (is_win) { | 136 if (is_win) { |
135 cflags = [ | 137 cflags = [ |
136 "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch. | 138 "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch. |
137 "/wd4267", # conversion from "size_t" to "int", possible loss of data. | 139 "/wd4267", # conversion from "size_t" to "int", possible loss of data. |
138 "/wd4389", # signed/unsigned mismatch. | 140 "/wd4389", # signed/unsigned mismatch. |
139 ] | 141 ] |
140 } | 142 } |
141 | 143 |
(...skipping 12 matching lines...) Expand all Loading... | |
154 # TODO(jiayl): move this into the public_configs of | 156 # TODO(jiayl): move this into the public_configs of |
155 # //third_party/usrsctp/BUILD.gn. | 157 # //third_party/usrsctp/BUILD.gn. |
156 "//third_party/usrsctp/usrsctplib", | 158 "//third_party/usrsctp/usrsctplib", |
157 ] | 159 ] |
158 deps += [ "//third_party/usrsctp" ] | 160 deps += [ "//third_party/usrsctp" ] |
159 } | 161 } |
160 | 162 |
161 if (build_with_chromium) { | 163 if (build_with_chromium) { |
162 deps += [ "../modules/video_capture:video_capture" ] | 164 deps += [ "../modules/video_capture:video_capture" ] |
163 } else { | 165 } else { |
164 configs += [ ":rtc_media_defines_config" ] | |
kjellander_webrtc
2016/06/10 09:33:33
(since already present as public_configs, this doe
| |
165 public_configs += [ ":rtc_media_defines_config" ] | 166 public_configs += [ ":rtc_media_defines_config" ] |
166 deps += [ "../modules/video_capture:video_capture_internal_impl" ] | 167 deps += [ "../modules/video_capture:video_capture_internal_impl" ] |
167 } | 168 } |
168 if (is_linux && rtc_use_gtk) { | 169 if (is_linux && rtc_use_gtk) { |
169 sources += [ | 170 sources += [ |
170 "devices/gtkvideorenderer.cc", | 171 "devices/gtkvideorenderer.cc", |
171 "devices/gtkvideorenderer.h", | 172 "devices/gtkvideorenderer.h", |
172 ] | 173 ] |
173 public_configs += [ ":gtk-lib" ] | 174 public_configs += [ ":gtk-lib" ] |
174 } | 175 } |
(...skipping 15 matching lines...) Expand all Loading... | |
190 ] | 191 ] |
191 libs += [ "Carbon.framework" ] | 192 libs += [ "Carbon.framework" ] |
192 } | 193 } |
193 if (is_ios || (is_mac && current_cpu != "x86")) { | 194 if (is_ios || (is_mac && current_cpu != "x86")) { |
194 defines += [ "CARBON_DEPRECATED=YES" ] | 195 defines += [ "CARBON_DEPRECATED=YES" ] |
195 } | 196 } |
196 | 197 |
197 deps += [ | 198 deps += [ |
198 "..:webrtc_common", | 199 "..:webrtc_common", |
199 "../base:rtc_base_approved", | 200 "../base:rtc_base_approved", |
201 "../call", | |
200 "../libjingle/xmllite", | 202 "../libjingle/xmllite", |
201 "../libjingle/xmpp", | 203 "../libjingle/xmpp", |
204 "../modules/video_coding", | |
202 "../p2p", | 205 "../p2p", |
203 "../system_wrappers", | 206 "../system_wrappers", |
207 "../video", | |
204 "../voice_engine", | 208 "../voice_engine", |
205 ] | 209 ] |
206 } | 210 } |
211 | |
212 if (rtc_include_tests) { | |
213 config("rtc_unittest_main_config") { | |
214 # GN orders flags on a target before flags from configs. The default config | |
215 # adds -Wall, and this flag have to be after -Wall -- so they need to | |
216 # come from a config and can"t be on the target directly. | |
217 if (is_clang && is_ios) { | |
218 cflags = [ "-Wno-unused-variable" ] | |
219 } | |
220 } | |
221 | |
222 source_set("rtc_unittest_main") { | |
223 testonly = true | |
224 | |
225 deps = [] | |
226 sources = [ | |
227 "base/fakemediaengine.h", | |
228 "base/fakenetworkinterface.h", | |
229 "base/fakertp.h", | |
230 "base/fakevideocapturer.h", | |
231 "base/fakevideorenderer.h", | |
232 "base/testutils.cc", | |
233 "base/testutils.h", | |
234 "engine/fakewebrtccall.cc", | |
235 "engine/fakewebrtccall.h", | |
236 "engine/fakewebrtccommon.h", | |
237 "engine/fakewebrtcdeviceinfo.h", | |
238 "engine/fakewebrtcvcmfactory.h", | |
239 "engine/fakewebrtcvideocapturemodule.h", | |
240 "engine/fakewebrtcvideoengine.h", | |
241 "engine/fakewebrtcvoiceengine.h", | |
242 ] | |
243 | |
244 configs += [ | |
245 "..:common_config", | |
246 ":rtc_unittest_main_config", | |
247 ] | |
248 public_configs = [ "..:common_inherited_config" ] | |
249 | |
250 if (rtc_build_libyuv) { | |
251 deps += [ "$rtc_libyuv_dir" ] | |
252 public_deps = [ | |
253 "$rtc_libyuv_dir", | |
254 ] | |
255 } else { | |
256 # Need to add a directory normally exported by libyuv. | |
257 include_dirs += [ "$rtc_libyuv_dir/include" ] | |
258 } | |
259 | |
260 if (is_clang) { | |
261 # Suppress warnings from the Chromium Clang plugin. | |
262 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. | |
263 configs -= [ "//build/config/clang:find_bad_constructs" ] | |
264 } | |
265 | |
266 deps += [ | |
267 "../base:rtc_base_tests_utils", | |
268 "//testing/gtest", | |
269 ] | |
270 public_deps += [ "//testing/gmock" ] | |
271 } | |
272 | |
273 config("rtc_media_unittests_config") { | |
274 # GN orders flags on a target before flags from configs. The default config | |
275 # adds -Wall, and this flag have to be after -Wall -- so they need to | |
276 # come from a config and can"t be on the target directly. | |
277 # TODO(kjellander): Make the code compile without disabling these flags. | |
278 # See https://bugs.webrtc.org/3307. | |
279 if (is_clang) { | |
280 cflags = [ "-Wno-sign-compare" ] | |
281 if (is_win) { | |
282 cflags += [ "-Wno-unused-function" ] | |
283 } | |
284 } | |
285 if (!is_win) { | |
286 cflags_cc = [ "-Wno-overloaded-virtual" ] | |
287 } | |
288 } | |
289 | |
290 test("rtc_media_unittests") { | |
291 testonly = true | |
292 | |
293 deps = [] | |
294 sources = [ | |
295 "base/codec_unittest.cc", | |
296 "base/rtpdataengine_unittest.cc", | |
297 "base/rtpdump_unittest.cc", | |
298 "base/rtputils_unittest.cc", | |
299 "base/streamparams_unittest.cc", | |
300 "base/turnutils_unittest.cc", | |
301 "base/videoadapter_unittest.cc", | |
302 "base/videobroadcaster_unittest.cc", | |
303 "base/videocapturer_unittest.cc", | |
304 "base/videocommon_unittest.cc", | |
305 "base/videoengine_unittest.h", | |
306 "base/videoframe_unittest.h", | |
307 "engine/nullwebrtcvideoengine_unittest.cc", | |
308 "engine/simulcast_unittest.cc", | |
309 "engine/webrtcmediaengine_unittest.cc", | |
310 "engine/webrtcvideocapturer_unittest.cc", | |
311 "engine/webrtcvideoengine2_unittest.cc", | |
312 "engine/webrtcvideoframe_unittest.cc", | |
313 "engine/webrtcvideoframefactory_unittest.cc", | |
314 "engine/webrtcvoiceengine_unittest.cc", | |
315 "sctp/sctpdataengine_unittest.cc", | |
316 ] | |
317 | |
318 configs += [ | |
319 "..:common_config", | |
320 ":rtc_media_unittests_config", | |
321 ] | |
322 public_configs = [ "..:common_inherited_config" ] | |
323 | |
324 if (is_win) { | |
325 cflags = [ | |
326 "/wd4245", # conversion from int to size_t, signed/unsigned mismatch. | |
327 "/wd4389", # signed/unsigned mismatch. | |
328 ] | |
329 } | |
330 | |
331 if (is_clang) { | |
332 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | |
333 configs -= [ | |
334 "//build/config/clang:extra_warnings", | |
335 "//build/config/clang:find_bad_constructs", | |
336 ] | |
337 } | |
338 | |
339 if (is_android) { | |
340 deps += [ "//testing/android/native_test:native_test_support" ] | |
341 | |
342 # This needs to be kept in sync with the rtc_media_unittests.isolate file. | |
343 # TODO(kjellander); Move this to android_assets targets instead. | |
344 data = [ | |
345 "//resources/media/captured-320x240-2s-48.frames", | |
346 "//resources/media/faces.1280x720_P420.yuv", | |
347 "//resources/media/faces_I420.jpg", | |
348 "//resources/media/faces_I422.jpg", | |
349 "//resources/media/faces_I444.jpg", | |
350 "//resources/media/faces_I411.jpg", | |
351 "//resources/media/faces_I400.jpg", | |
352 ] | |
353 } | |
354 | |
355 deps += [ | |
356 # TODO(kjellander): Move as part of work in bugs.webrtc.org/4243. | |
357 ":rtc_media", | |
358 ":rtc_unittest_main", | |
359 "../audio", | |
360 "../base:rtc_base_tests_utils", | |
361 "../system_wrappers:metrics_default", | |
362 ] | |
363 } | |
364 } | |
OLD | NEW |