blob: 589b2818cc1c95729fc9885c74a2ddc94993ce6e [file] [log] [blame]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +00001# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
2#
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
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
mbonadei9aa3f0a2017-01-24 06:58:22 -08009import("../../webrtc.gni")
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000010
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +000011config("media_file_config") {
brettw@chromium.org519c9e22014-09-08 22:45:18 +000012 visibility = [ ":*" ] # Only targets in this file can depend on this.
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000013}
14
kjellanderb62dbbe2016-09-23 00:38:52 -070015rtc_static_library("media_file") {
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000016 sources = [
Henrik Kjellander0b9e29c2015-11-16 11:12:24 +010017 "media_file.h",
18 "media_file_defines.h",
19 "media_file_impl.cc",
20 "media_file_impl.h",
21 "media_file_utility.cc",
22 "media_file_utility.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000023 ]
24
ehmaldonadoe9cc6862016-09-05 06:10:18 -070025 public_configs = [ ":media_file_config" ]
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +000026
kjellander8f4419b2016-06-02 02:09:52 -070027 # TODO(jschuh): Bug 1348: fix this warning.
28 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
29
kjellandere40a7ee2016-10-16 23:56:12 -070030 if (!build_with_chromium && is_clang) {
31 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070032 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +000033 }
34
andresp@webrtc.org87a592d2015-02-25 03:18:23 +000035 deps = [
mbonadei1140f972017-04-26 03:38:35 -070036 "..:module_api",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000037 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +010038 "../../:typedefs",
andresp@webrtc.org87a592d2015-02-25 03:18:23 +000039 "../../common_audio",
ehmaldonadof6a861a2017-07-19 10:40:47 -070040 "../../rtc_base:rtc_base_approved",
andresp@webrtc.org87a592d2015-02-25 03:18:23 +000041 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000042}
ehmaldonado36268652017-01-19 08:27:11 -080043
44if (rtc_include_tests) {
45 rtc_source_set("media_file_unittests") {
46 testonly = true
kjellandere0629c02017-04-25 04:04:50 -070047
ehmaldonado36268652017-01-19 08:27:11 -080048 sources = [
49 "media_file_unittest.cc",
50 ]
51 deps = [
52 ":media_file",
ehmaldonado36268652017-01-19 08:27:11 -080053 "../../test:test_support",
54 ]
55 if (is_win) {
56 cflags = [
57 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
58 "/wd4373", # virtual function override.
59 ]
60 }
61 if (!build_with_chromium && is_clang) {
62 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
63 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
64 }
65 }
66}