blob: 54daa20929226e95f7783ba30dd3dd9fead17823 [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
16rtc_source_set("rtc_event_log_api") {
17 sources = [
18 "rtc_event_log/rtc_event_log.h",
19 ]
20}
21
22rtc_static_library("rtc_event_log_impl") {
23 sources = [
24 "rtc_event_log/ringbuffer.h",
25 "rtc_event_log/rtc_event_log.cc",
26 "rtc_event_log/rtc_event_log_helper_thread.cc",
27 "rtc_event_log/rtc_event_log_helper_thread.h",
28 ]
29
30 defines = []
31
32 deps = [
33 ":rtc_event_log_api",
34 "..:webrtc_common",
solenberg940b6d62016-10-25 11:19:07 -070035 "../api:call_api",
skvladcc91d282016-10-03 18:31:22 -070036 "../modules/rtp_rtcp",
37 ]
38
39 if (rtc_enable_protobuf) {
40 defines += [ "ENABLE_RTC_EVENT_LOG" ]
41 deps += [ ":rtc_event_log_proto" ]
42 }
kjellandere40a7ee2016-10-16 23:56:12 -070043 if (!build_with_chromium && is_clang) {
44 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
skvladcc91d282016-10-03 18:31:22 -070045 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
46 }
47}
48
49if (rtc_include_tests) {
50 rtc_source_set("rtc_event_log_tests") {
51 testonly = true
52 sources = [
53 "rtc_event_log/ringbuffer_unittest.cc",
54 "rtc_event_log/rtc_event_log_unittest.cc",
55 "rtc_event_log/rtc_event_log_unittest_helper.cc",
56 ]
57 deps = [
58 ":rtc_event_log_impl",
59 ":rtc_event_log_parser",
60 "../modules/rtp_rtcp",
61 "../system_wrappers:metrics_default",
62 "//testing/gmock",
63 "//testing/gtest",
64 ]
kjellandere40a7ee2016-10-16 23:56:12 -070065 if (!build_with_chromium && is_clang) {
66 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
skvladcc91d282016-10-03 18:31:22 -070067 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
68 }
69 }
70}
71
72if (rtc_enable_protobuf) {
73 proto_library("rtc_event_log_proto") {
74 sources = [
75 "rtc_event_log/rtc_event_log.proto",
76 ]
77 proto_out_dir = "webrtc/logging/rtc_event_log"
78 }
79}
80
81if (rtc_enable_protobuf) {
82 rtc_static_library("rtc_event_log_parser") {
83 sources = [
84 "rtc_event_log/rtc_event_log_parser.cc",
85 "rtc_event_log/rtc_event_log_parser.h",
86 ]
87
88 public_deps = [
89 ":rtc_event_log_proto",
90 "..:webrtc_common",
91 ]
92
kjellandere40a7ee2016-10-16 23:56:12 -070093 if (!build_with_chromium && is_clang) {
94 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
skvladcc91d282016-10-03 18:31:22 -070095 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
96 }
97 }
98}