OLD | NEW |
1 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 1 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
2 # | 2 # |
3 # Use of this source code is governed by a BSD-style license | 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 | 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 | 5 # tree. An additional intellectual property rights grant can be found |
6 # in the file PATENTS. All contributing project authors may | 6 # in the file PATENTS. All contributing project authors may |
7 # be found in the AUTHORS file in the root of the source tree. | 7 # be found in the AUTHORS file in the root of the source tree. |
8 | 8 |
9 import("../build/webrtc.gni") | 9 import("../build/webrtc.gni") |
10 import("//testing/test.gni") | |
11 | 10 |
12 group("pc") { | 11 group("pc") { |
13 deps = [ | 12 deps = [ |
14 ":rtc_pc", | 13 ":rtc_pc", |
15 ] | 14 ] |
16 } | 15 } |
17 | 16 |
18 config("rtc_pc_config") { | 17 config("rtc_pc_config") { |
19 defines = [ | 18 defines = [ |
20 "SRTP_RELATIVE_PATH", | 19 "SRTP_RELATIVE_PATH", |
21 "HAVE_SCTP", | 20 "HAVE_SCTP", |
22 "HAVE_SRTP", | 21 "HAVE_SRTP", |
23 ] | 22 ] |
24 } | 23 } |
25 | 24 |
26 source_set("rtc_pc") { | 25 rtc_source_set("rtc_pc") { |
27 defines = [] | 26 defines = [] |
28 sources = [ | 27 sources = [ |
29 "audiomonitor.cc", | 28 "audiomonitor.cc", |
30 "audiomonitor.h", | 29 "audiomonitor.h", |
31 "bundlefilter.cc", | 30 "bundlefilter.cc", |
32 "bundlefilter.h", | 31 "bundlefilter.h", |
33 "channel.cc", | 32 "channel.cc", |
34 "channel.h", | 33 "channel.h", |
35 "channelmanager.cc", | 34 "channelmanager.cc", |
36 "channelmanager.h", | 35 "channelmanager.h", |
(...skipping 28 matching lines...) Expand all Loading... |
65 } | 64 } |
66 | 65 |
67 configs += [ "..:common_config" ] | 66 configs += [ "..:common_config" ] |
68 public_configs = [ | 67 public_configs = [ |
69 "..:common_inherited_config", | 68 "..:common_inherited_config", |
70 ":rtc_pc_config", | 69 ":rtc_pc_config", |
71 ] | 70 ] |
72 | 71 |
73 if (is_clang) { | 72 if (is_clang) { |
74 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 73 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
75 configs -= [ "//build/config/clang:find_bad_constructs" ] | 74 configs_suppressions += [ "//build/config/clang:find_bad_constructs" ] |
76 } | 75 } |
77 } | 76 } |
78 | 77 |
79 if (rtc_include_tests) { | 78 if (rtc_include_tests) { |
80 config("rtc_pc_unittests_config") { | 79 config("rtc_pc_unittests_config") { |
81 # GN orders flags on a target before flags from configs. The default config | 80 # GN orders flags on a target before flags from configs. The default config |
82 # adds -Wall, and this flag have to be after -Wall -- so they need to | 81 # adds -Wall, and this flag have to be after -Wall -- so they need to |
83 # come from a config and can't be on the target directly. | 82 # come from a config and can't be on the target directly. |
84 if (!is_win && !is_clang) { | 83 if (!is_win && !is_clang) { |
85 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC. | 84 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC. |
86 } | 85 } |
87 } | 86 } |
88 | 87 |
89 test("rtc_pc_unittests") { | 88 rtc_test("rtc_pc_unittests") { |
90 testonly = true | 89 testonly = true |
91 | 90 |
92 sources = [ | 91 sources = [ |
93 "bundlefilter_unittest.cc", | 92 "bundlefilter_unittest.cc", |
94 "channel_unittest.cc", | 93 "channel_unittest.cc", |
95 "channelmanager_unittest.cc", | 94 "channelmanager_unittest.cc", |
96 "currentspeakermonitor_unittest.cc", | 95 "currentspeakermonitor_unittest.cc", |
97 "mediasession_unittest.cc", | 96 "mediasession_unittest.cc", |
98 "rtcpmuxfilter_unittest.cc", | 97 "rtcpmuxfilter_unittest.cc", |
99 "srtpfilter_unittest.cc", | 98 "srtpfilter_unittest.cc", |
100 ] | 99 ] |
101 | 100 |
102 include_dirs = [ "//third_party/libsrtp/srtp" ] | 101 include_dirs = [ "//third_party/libsrtp/srtp" ] |
103 | 102 |
104 configs += [ | 103 configs += [ |
105 "..:common_config", | 104 "..:common_config", |
106 ":rtc_pc_unittests_config", | 105 ":rtc_pc_unittests_config", |
107 ] | 106 ] |
108 public_configs = [ "..:common_inherited_config" ] | 107 public_configs = [ "..:common_inherited_config" ] |
109 | 108 |
110 if (is_clang) { | 109 if (is_clang) { |
111 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 110 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
112 configs -= [ "//build/config/clang:find_bad_constructs" ] | 111 configs_suppressions += [ "//build/config/clang:find_bad_constructs" ] |
113 } | 112 } |
114 | 113 |
115 if (is_win) { | 114 if (is_win) { |
116 libs = [ "strmiids.lib" ] | 115 libs = [ "strmiids.lib" ] |
117 } | 116 } |
118 | 117 |
119 deps = [ | 118 deps = [ |
120 ":rtc_pc", | 119 ":rtc_pc", |
121 "../api:libjingle_peerconnection", | 120 "../api:libjingle_peerconnection", |
122 "../base:rtc_base_tests_utils", | 121 "../base:rtc_base_tests_utils", |
123 "../media:rtc_unittest_main", | 122 "../media:rtc_unittest_main", |
124 "../system_wrappers:metrics_default", | 123 "../system_wrappers:metrics_default", |
125 ] | 124 ] |
126 | 125 |
127 if (rtc_build_libsrtp) { | 126 if (rtc_build_libsrtp) { |
128 deps += [ "//third_party/libsrtp" ] | 127 deps += [ "//third_party/libsrtp" ] |
129 } | 128 } |
130 | 129 |
131 if (is_android) { | 130 if (is_android) { |
132 deps += [ "//testing/android/native_test:native_test_support" ] | 131 deps += [ "//testing/android/native_test:native_test_support" ] |
133 } | 132 } |
134 } | 133 } |
135 } | 134 } |
OLD | NEW |