blob: fa280653733699537ce406be3c7e95d63b53945c [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",
35 "../modules/rtp_rtcp",
36 ]
37
38 if (rtc_enable_protobuf) {
39 defines += [ "ENABLE_RTC_EVENT_LOG" ]
40 deps += [ ":rtc_event_log_proto" ]
41 }
kjellandere40a7ee2016-10-16 23:56:12 -070042 if (!build_with_chromium && is_clang) {
43 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
skvladcc91d282016-10-03 18:31:22 -070044 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
45 }
46}
47
48if (rtc_include_tests) {
49 rtc_source_set("rtc_event_log_tests") {
50 testonly = true
51 sources = [
52 "rtc_event_log/ringbuffer_unittest.cc",
53 "rtc_event_log/rtc_event_log_unittest.cc",
54 "rtc_event_log/rtc_event_log_unittest_helper.cc",
55 ]
56 deps = [
57 ":rtc_event_log_impl",
58 ":rtc_event_log_parser",
59 "../modules/rtp_rtcp",
60 "../system_wrappers:metrics_default",
61 "//testing/gmock",
62 "//testing/gtest",
63 ]
kjellandere40a7ee2016-10-16 23:56:12 -070064 if (!build_with_chromium && is_clang) {
65 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
skvladcc91d282016-10-03 18:31:22 -070066 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
67 }
68 }
69}
70
71if (rtc_enable_protobuf) {
72 proto_library("rtc_event_log_proto") {
73 sources = [
74 "rtc_event_log/rtc_event_log.proto",
75 ]
76 proto_out_dir = "webrtc/logging/rtc_event_log"
77 }
78}
79
80if (rtc_enable_protobuf) {
81 rtc_static_library("rtc_event_log_parser") {
82 sources = [
83 "rtc_event_log/rtc_event_log_parser.cc",
84 "rtc_event_log/rtc_event_log_parser.h",
85 ]
86
87 public_deps = [
88 ":rtc_event_log_proto",
89 "..:webrtc_common",
90 ]
91
kjellandere40a7ee2016-10-16 23:56:12 -070092 if (!build_with_chromium && is_clang) {
93 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
skvladcc91d282016-10-03 18:31:22 -070094 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
95 }
96 }
97}