skvlad | cc91d28 | 2016-10-03 18:31:22 -0700 | [diff] [blame] | 1 | # 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 | |
| 9 | import("../build/webrtc.gni") |
| 10 | import("//third_party/protobuf/proto_library.gni") |
| 11 | if (is_android) { |
| 12 | import("//build/config/android/config.gni") |
| 13 | import("//build/config/android/rules.gni") |
| 14 | } |
| 15 | |
kjellander | 6ceab08 | 2016-10-28 05:44:03 -0700 | [diff] [blame] | 16 | group("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 | |
skvlad | cc91d28 | 2016-10-03 18:31:22 -0700 | [diff] [blame] | 25 | rtc_source_set("rtc_event_log_api") { |
| 26 | sources = [ |
| 27 | "rtc_event_log/rtc_event_log.h", |
| 28 | ] |
| 29 | } |
| 30 | |
| 31 | rtc_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", |
solenberg | 940b6d6 | 2016-10-25 11:19:07 -0700 | [diff] [blame] | 44 | "../api:call_api", |
skvlad | cc91d28 | 2016-10-03 18:31:22 -0700 | [diff] [blame] | 45 | "../modules/rtp_rtcp", |
| 46 | ] |
| 47 | |
| 48 | if (rtc_enable_protobuf) { |
| 49 | defines += [ "ENABLE_RTC_EVENT_LOG" ] |
| 50 | deps += [ ":rtc_event_log_proto" ] |
| 51 | } |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 52 | if (!build_with_chromium && is_clang) { |
| 53 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
skvlad | cc91d28 | 2016-10-03 18:31:22 -0700 | [diff] [blame] | 54 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | if (rtc_include_tests) { |
| 59 | rtc_source_set("rtc_event_log_tests") { |
| 60 | testonly = true |
| 61 | sources = [ |
| 62 | "rtc_event_log/ringbuffer_unittest.cc", |
| 63 | "rtc_event_log/rtc_event_log_unittest.cc", |
| 64 | "rtc_event_log/rtc_event_log_unittest_helper.cc", |
| 65 | ] |
| 66 | deps = [ |
| 67 | ":rtc_event_log_impl", |
| 68 | ":rtc_event_log_parser", |
| 69 | "../modules/rtp_rtcp", |
| 70 | "../system_wrappers:metrics_default", |
| 71 | "//testing/gmock", |
| 72 | "//testing/gtest", |
| 73 | ] |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 74 | if (!build_with_chromium && is_clang) { |
| 75 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
skvlad | cc91d28 | 2016-10-03 18:31:22 -0700 | [diff] [blame] | 76 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 77 | } |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | if (rtc_enable_protobuf) { |
| 82 | proto_library("rtc_event_log_proto") { |
| 83 | sources = [ |
| 84 | "rtc_event_log/rtc_event_log.proto", |
| 85 | ] |
| 86 | proto_out_dir = "webrtc/logging/rtc_event_log" |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | if (rtc_enable_protobuf) { |
| 91 | rtc_static_library("rtc_event_log_parser") { |
| 92 | sources = [ |
| 93 | "rtc_event_log/rtc_event_log_parser.cc", |
| 94 | "rtc_event_log/rtc_event_log_parser.h", |
| 95 | ] |
| 96 | |
| 97 | public_deps = [ |
| 98 | ":rtc_event_log_proto", |
| 99 | "..:webrtc_common", |
| 100 | ] |
| 101 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 102 | if (!build_with_chromium && is_clang) { |
| 103 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
skvlad | cc91d28 | 2016-10-03 18:31:22 -0700 | [diff] [blame] | 104 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 105 | } |
| 106 | } |
| 107 | } |