blob: 7078963d1ee32655c1e099b11b89f95d0c802dcc [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 }
42 if (is_clang && !is_nacl) {
43 # Suppress warnings from Chrome's Clang plugins.
44 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
45 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 ]
65 if (is_clang) {
66 # Suppress warnings from the Chromium Clang plugin.
67 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
68 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
69 }
70 }
71}
72
73if (rtc_enable_protobuf) {
74 proto_library("rtc_event_log_proto") {
75 sources = [
76 "rtc_event_log/rtc_event_log.proto",
77 ]
78 proto_out_dir = "webrtc/logging/rtc_event_log"
79 }
80}
81
82if (rtc_enable_protobuf) {
83 rtc_static_library("rtc_event_log_parser") {
84 sources = [
85 "rtc_event_log/rtc_event_log_parser.cc",
86 "rtc_event_log/rtc_event_log_parser.h",
87 ]
88
89 public_deps = [
90 ":rtc_event_log_proto",
91 "..:webrtc_common",
92 ]
93
94 if (is_clang && !is_nacl) {
95 # Suppress warnings from Chrome's Clang plugins.
96 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
97 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
98 }
99 }
100}