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

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

Issue 2301053002: GN: Introduce templates. (Closed)
Patch Set: Rebase Created 4 years, 3 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
« no previous file with comments | « webrtc/libjingle/xmpp/BUILD.gn ('k') | webrtc/modules/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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("//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")
12 11
13 group("media") { 12 group("media") {
14 deps = [ 13 deps = [
15 ":rtc_media", 14 ":rtc_media",
16 ] 15 ]
17 } 16 }
18 17
19 config("rtc_media_defines_config") { 18 config("rtc_media_defines_config") {
20 defines = [ 19 defines = [
21 "HAVE_WEBRTC_VIDEO", 20 "HAVE_WEBRTC_VIDEO",
(...skipping 14 matching lines...) Expand all
36 if (is_linux && rtc_use_gtk) { 35 if (is_linux && rtc_use_gtk) {
37 pkg_config("gtk-lib") { 36 pkg_config("gtk-lib") {
38 packages = [ 37 packages = [
39 "gobject-2.0", 38 "gobject-2.0",
40 "gthread-2.0", 39 "gthread-2.0",
41 "gtk+-2.0", 40 "gtk+-2.0",
42 ] 41 ]
43 } 42 }
44 } 43 }
45 44
46 source_set("rtc_media") { 45 rtc_source_set("rtc_media") {
47 defines = [] 46 defines = []
48 libs = [] 47 libs = []
49 deps = [] 48 deps = []
50 sources = [ 49 sources = [
51 "base/audiosource.h", 50 "base/audiosource.h",
52 "base/codec.cc", 51 "base/codec.cc",
53 "base/codec.h", 52 "base/codec.h",
54 "base/cpuid.cc", 53 "base/cpuid.cc",
55 "base/cpuid.h", 54 "base/cpuid.h",
56 "base/cryptoparams.h", 55 "base/cryptoparams.h",
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 119
121 configs += [ 120 configs += [
122 "..:common_config", 121 "..:common_config",
123 ":rtc_media_warnings_config", 122 ":rtc_media_warnings_config",
124 ] 123 ]
125 124
126 public_configs = [ "..:common_inherited_config" ] 125 public_configs = [ "..:common_inherited_config" ]
127 126
128 if (is_clang) { 127 if (is_clang) {
129 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 128 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
130 configs -= [ 129 suppressed_configs += [
131 "//build/config/clang:extra_warnings", 130 "//build/config/clang:extra_warnings",
132 "//build/config/clang:find_bad_constructs", 131 "//build/config/clang:find_bad_constructs",
133 ] 132 ]
134 } 133 }
135 134
136 if (is_win) { 135 if (is_win) {
137 cflags = [ 136 cflags = [
138 "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch. 137 "/wd4245", # conversion from "int" to "size_t", signed/unsigned mismatch.
139 "/wd4267", # conversion from "size_t" to "int", possible loss of data. 138 "/wd4267", # conversion from "size_t" to "int", possible loss of data.
140 "/wd4389", # signed/unsigned mismatch. 139 "/wd4389", # signed/unsigned mismatch.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 if (rtc_include_tests) { 219 if (rtc_include_tests) {
221 config("rtc_unittest_main_config") { 220 config("rtc_unittest_main_config") {
222 # GN orders flags on a target before flags from configs. The default config 221 # GN orders flags on a target before flags from configs. The default config
223 # adds -Wall, and this flag have to be after -Wall -- so they need to 222 # adds -Wall, and this flag have to be after -Wall -- so they need to
224 # come from a config and can"t be on the target directly. 223 # come from a config and can"t be on the target directly.
225 if (is_clang && is_ios) { 224 if (is_clang && is_ios) {
226 cflags = [ "-Wno-unused-variable" ] 225 cflags = [ "-Wno-unused-variable" ]
227 } 226 }
228 } 227 }
229 228
230 source_set("rtc_unittest_main") { 229 rtc_source_set("rtc_unittest_main") {
231 testonly = true 230 testonly = true
232 231
233 include_dirs = [] 232 include_dirs = []
234 public_deps = [] 233 public_deps = []
235 deps = [] 234 deps = []
236 sources = [ 235 sources = [
237 "base/fakemediaengine.h", 236 "base/fakemediaengine.h",
238 "base/fakenetworkinterface.h", 237 "base/fakenetworkinterface.h",
239 "base/fakertp.h", 238 "base/fakertp.h",
240 "base/fakevideocapturer.h", 239 "base/fakevideocapturer.h",
(...skipping 20 matching lines...) Expand all
261 deps += [ "$rtc_libyuv_dir" ] 260 deps += [ "$rtc_libyuv_dir" ]
262 public_deps += [ "$rtc_libyuv_dir" ] 261 public_deps += [ "$rtc_libyuv_dir" ]
263 } else { 262 } else {
264 # Need to add a directory normally exported by libyuv. 263 # Need to add a directory normally exported by libyuv.
265 include_dirs += [ "$rtc_libyuv_dir/include" ] 264 include_dirs += [ "$rtc_libyuv_dir/include" ]
266 } 265 }
267 266
268 if (is_clang) { 267 if (is_clang) {
269 # Suppress warnings from the Chromium Clang plugin. 268 # Suppress warnings from the Chromium Clang plugin.
270 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. 269 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
271 configs -= [ "//build/config/clang:find_bad_constructs" ] 270 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
272 } 271 }
273 272
274 deps += [ 273 deps += [
275 "../base:rtc_base_tests_utils", 274 "../base:rtc_base_tests_utils",
276 "//testing/gtest", 275 "//testing/gtest",
277 ] 276 ]
278 public_deps += [ "//testing/gmock" ] 277 public_deps += [ "//testing/gmock" ]
279 } 278 }
280 279
281 config("rtc_media_unittests_config") { 280 config("rtc_media_unittests_config") {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 if (is_ios) { 312 if (is_ios) {
314 bundle_data("rtc_media_unittests_bundle_data") { 313 bundle_data("rtc_media_unittests_bundle_data") {
315 testonly = true 314 testonly = true
316 sources = rtc_media_unittests_resources 315 sources = rtc_media_unittests_resources
317 outputs = [ 316 outputs = [
318 "{{bundle_resources_dir}}/{{source_file_part}}", 317 "{{bundle_resources_dir}}/{{source_file_part}}",
319 ] 318 ]
320 } 319 }
321 } 320 }
322 321
323 test("rtc_media_unittests") { 322 rtc_test("rtc_media_unittests") {
324 testonly = true 323 testonly = true
325 324
326 defines = [] 325 defines = []
327 deps = [] 326 deps = []
328 sources = [ 327 sources = [
329 "base/codec_unittest.cc", 328 "base/codec_unittest.cc",
330 "base/rtpdataengine_unittest.cc", 329 "base/rtpdataengine_unittest.cc",
331 "base/rtpdump_unittest.cc", 330 "base/rtpdump_unittest.cc",
332 "base/rtputils_unittest.cc", 331 "base/rtputils_unittest.cc",
333 "base/streamparams_unittest.cc", 332 "base/streamparams_unittest.cc",
(...skipping 28 matching lines...) Expand all
362 if (is_win) { 361 if (is_win) {
363 cflags = [ 362 cflags = [
364 "/wd4245", # conversion from int to size_t, signed/unsigned mismatch. 363 "/wd4245", # conversion from int to size_t, signed/unsigned mismatch.
365 "/wd4373", # virtual function override. 364 "/wd4373", # virtual function override.
366 "/wd4389", # signed/unsigned mismatch. 365 "/wd4389", # signed/unsigned mismatch.
367 ] 366 ]
368 } 367 }
369 368
370 if (is_clang) { 369 if (is_clang) {
371 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 370 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
372 configs -= [ 371 suppressed_configs += [
373 "//build/config/clang:extra_warnings", 372 "//build/config/clang:extra_warnings",
374 "//build/config/clang:find_bad_constructs", 373 "//build/config/clang:find_bad_constructs",
375 ] 374 ]
376 } 375 }
377 376
378 if (is_android) { 377 if (is_android) {
379 deps += [ "//testing/android/native_test:native_test_support" ] 378 deps += [ "//testing/android/native_test:native_test_support" ]
380 data = rtc_media_unittests_resources 379 data = rtc_media_unittests_resources
381 shard_timeout = 900 380 shard_timeout = 900
382 } 381 }
383 382
384 if (is_ios) { 383 if (is_ios) {
385 deps += [ ":rtc_media_unittests_bundle_data" ] 384 deps += [ ":rtc_media_unittests_bundle_data" ]
386 } 385 }
387 386
388 deps += [ 387 deps += [
389 # TODO(kjellander): Move as part of work in bugs.webrtc.org/4243. 388 # TODO(kjellander): Move as part of work in bugs.webrtc.org/4243.
390 ":rtc_media", 389 ":rtc_media",
391 ":rtc_unittest_main", 390 ":rtc_unittest_main",
392 "../audio", 391 "../audio",
393 "../base:rtc_base_tests_utils", 392 "../base:rtc_base_tests_utils",
394 "../system_wrappers:metrics_default", 393 "../system_wrappers:metrics_default",
395 ] 394 ]
396 } 395 }
397 } 396 }
OLDNEW
« no previous file with comments | « webrtc/libjingle/xmpp/BUILD.gn ('k') | webrtc/modules/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698