blob: 8bce39a5616e349e289dc6adf8da648e868c1c7b [file] [log] [blame]
skvladcc91d282016-10-03 18:31:22 -07001# Copyright (c) 2016 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
9import("../build/webrtc.gni")
10import("//third_party/protobuf/proto_library.gni")
11if (is_android) {
12 import("//build/config/android/config.gni")
13 import("//build/config/android/rules.gni")
14}
15
kjellander6ceab082016-10-28 05:44:03 -070016group("logging") {
17 public_deps = [
18 ":rtc_event_log_impl",
19 ]
20 if (rtc_enable_protobuf) {
21 public_deps += [ ":rtc_event_log_parser" ]
22 }
23}
24
skvladcc91d282016-10-03 18:31:22 -070025rtc_source_set("rtc_event_log_api") {
26 sources = [
27 "rtc_event_log/rtc_event_log.h",
28 ]
29}
30
31rtc_static_library("rtc_event_log_impl") {
32 sources = [
33 "rtc_event_log/ringbuffer.h",
34 "rtc_event_log/rtc_event_log.cc",
35 "rtc_event_log/rtc_event_log_helper_thread.cc",
36 "rtc_event_log/rtc_event_log_helper_thread.h",
37 ]
38
39 defines = []
40
41 deps = [
42 ":rtc_event_log_api",
43 "..:webrtc_common",
ossuf515ab82016-12-07 04:52:58 -080044 "../call:call_interfaces",
michaelt36636812017-01-13 06:10:16 -080045 "../modules/audio_coding:audio_network_adaptor",
skvladcc91d282016-10-03 18:31:22 -070046 "../modules/rtp_rtcp",
47 ]
48
49 if (rtc_enable_protobuf) {
50 defines += [ "ENABLE_RTC_EVENT_LOG" ]
51 deps += [ ":rtc_event_log_proto" ]
52 }
kjellandere40a7ee2016-10-16 23:56:12 -070053 if (!build_with_chromium && is_clang) {
54 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
skvladcc91d282016-10-03 18:31:22 -070055 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
56 }
57}
58
59if (rtc_include_tests) {
60 rtc_source_set("rtc_event_log_tests") {
61 testonly = true
62 sources = [
63 "rtc_event_log/ringbuffer_unittest.cc",
64 "rtc_event_log/rtc_event_log_unittest.cc",
65 "rtc_event_log/rtc_event_log_unittest_helper.cc",
66 ]
67 deps = [
68 ":rtc_event_log_impl",
69 ":rtc_event_log_parser",
ossuf515ab82016-12-07 04:52:58 -080070 "../call",
skvladcc91d282016-10-03 18:31:22 -070071 "../modules/rtp_rtcp",
72 "../system_wrappers:metrics_default",
73 "//testing/gmock",
74 "//testing/gtest",
75 ]
kjellandere40a7ee2016-10-16 23:56:12 -070076 if (!build_with_chromium && is_clang) {
77 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
skvladcc91d282016-10-03 18:31:22 -070078 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
79 }
80 }
81}
82
83if (rtc_enable_protobuf) {
84 proto_library("rtc_event_log_proto") {
85 sources = [
86 "rtc_event_log/rtc_event_log.proto",
87 ]
michaelt36636812017-01-13 06:10:16 -080088 proto_in_dir = "//"
89 proto_out_dir = "."
skvladcc91d282016-10-03 18:31:22 -070090 }
91}
92
93if (rtc_enable_protobuf) {
94 rtc_static_library("rtc_event_log_parser") {
95 sources = [
96 "rtc_event_log/rtc_event_log_parser.cc",
97 "rtc_event_log/rtc_event_log_parser.h",
98 ]
99
100 public_deps = [
101 ":rtc_event_log_proto",
102 "..:webrtc_common",
103 ]
104
kjellandere40a7ee2016-10-16 23:56:12 -0700105 if (!build_with_chromium && is_clang) {
106 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
skvladcc91d282016-10-03 18:31:22 -0700107 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
108 }
109 }
110}