blob: a15945513df668f86cbaabbdc75e808f987f4690 [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
mbonadei35a32702017-01-24 04:49:35 -08009import("../webrtc.gni")
skvladcc91d282016-10-03 18:31:22 -070010import("//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",
skvladcc91d282016-10-03 18:31:22 -070045 "../modules/rtp_rtcp",
46 ]
47
48 if (rtc_enable_protobuf) {
49 defines += [ "ENABLE_RTC_EVENT_LOG" ]
50 deps += [ ":rtc_event_log_proto" ]
51 }
kjellandere40a7ee2016-10-16 23:56:12 -070052 if (!build_with_chromium && is_clang) {
53 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
skvladcc91d282016-10-03 18:31:22 -070054 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
55 }
56}
57
skvladcc91d282016-10-03 18:31:22 -070058if (rtc_enable_protobuf) {
59 proto_library("rtc_event_log_proto") {
60 sources = [
61 "rtc_event_log/rtc_event_log.proto",
62 ]
sakal363a2912017-01-13 06:52:12 -080063 proto_out_dir = "webrtc/logging/rtc_event_log"
skvladcc91d282016-10-03 18:31:22 -070064 }
skvladcc91d282016-10-03 18:31:22 -070065
skvladcc91d282016-10-03 18:31:22 -070066 rtc_static_library("rtc_event_log_parser") {
67 sources = [
68 "rtc_event_log/rtc_event_log_parser.cc",
69 "rtc_event_log/rtc_event_log_parser.h",
70 ]
71
72 public_deps = [
73 ":rtc_event_log_proto",
74 "..:webrtc_common",
75 ]
76
kjellandere40a7ee2016-10-16 23:56:12 -070077 if (!build_with_chromium && is_clang) {
78 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
skvladcc91d282016-10-03 18:31:22 -070079 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
80 }
81 }
ehmaldonado1fd08c12017-01-17 02:37:34 -080082
83 if (rtc_include_tests) {
84 rtc_source_set("rtc_event_log_tests") {
85 testonly = true
86 sources = [
87 "rtc_event_log/ringbuffer_unittest.cc",
88 "rtc_event_log/rtc_event_log_unittest.cc",
89 "rtc_event_log/rtc_event_log_unittest_helper.cc",
90 ]
91 deps = [
92 ":rtc_event_log_impl",
93 ":rtc_event_log_parser",
94 "../call",
95 "../modules/rtp_rtcp",
96 "../system_wrappers:metrics_default",
97 "//testing/gmock",
98 "//testing/gtest",
99 ]
100 if (!build_with_chromium && is_clang) {
101 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
102 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
103 }
104 }
105 }
skvladcc91d282016-10-03 18:31:22 -0700106}