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 | |
| 16 | rtc_source_set("rtc_event_log_api") { |
| 17 | sources = [ |
| 18 | "rtc_event_log/rtc_event_log.h", |
| 19 | ] |
| 20 | } |
| 21 | |
| 22 | rtc_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 | } |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 42 | if (!build_with_chromium && is_clang) { |
| 43 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
skvlad | cc91d28 | 2016-10-03 18:31:22 -0700 | [diff] [blame] | 44 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | if (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 | ] |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 64 | if (!build_with_chromium && is_clang) { |
| 65 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
skvlad | cc91d28 | 2016-10-03 18:31:22 -0700 | [diff] [blame] | 66 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 67 | } |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | if (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 | |
| 80 | if (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 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 92 | if (!build_with_chromium && is_clang) { |
| 93 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
skvlad | cc91d28 | 2016-10-03 18:31:22 -0700 | [diff] [blame] | 94 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 95 | } |
| 96 | } |
| 97 | } |