kjellander | c76dc95 | 2016-06-03 10:09:32 | [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 | |
mbonadei | 9aa3f0a | 2017-01-24 14:58:22 | [diff] [blame] | 9 | import("../webrtc.gni") |
kjellander | c76dc95 | 2016-06-03 10:09:32 | [diff] [blame] | 10 | |
| 11 | group("p2p") { |
kjellander | 705ecc5 | 2016-09-15 07:53:26 | [diff] [blame] | 12 | public_deps = [ |
kjellander | 6ceab08 | 2016-10-28 12:44:03 | [diff] [blame] | 13 | ":libstunprober", |
kjellander | c76dc95 | 2016-06-03 10:09:32 | [diff] [blame] | 14 | ":rtc_p2p", |
| 15 | ] |
| 16 | } |
| 17 | |
| 18 | config("rtc_p2p_inherited_config") { |
| 19 | defines = [ "FEATURE_ENABLE_VOICEMAIL" ] |
| 20 | } |
| 21 | |
kjellander | b62dbbe | 2016-09-23 07:38:52 | [diff] [blame] | 22 | rtc_static_library("rtc_p2p") { |
kjellander | c76dc95 | 2016-06-03 10:09:32 | [diff] [blame] | 23 | sources = [ |
| 24 | "base/asyncstuntcpsocket.cc", |
| 25 | "base/asyncstuntcpsocket.h", |
| 26 | "base/basicpacketsocketfactory.cc", |
| 27 | "base/basicpacketsocketfactory.h", |
| 28 | "base/candidate.h", |
| 29 | "base/common.h", |
| 30 | "base/dtlstransportchannel.cc", |
| 31 | "base/dtlstransportchannel.h", |
zhihuang | e50658d | 2017-01-03 19:34:12 | [diff] [blame] | 32 | "base/dtlstransportinternal.h", |
zhihuang | 86abd6f | 2016-12-19 19:54:05 | [diff] [blame] | 33 | "base/icetransportinternal.h", |
deadbeef | 49f34fd | 2016-12-07 00:22:06 | [diff] [blame] | 34 | "base/jseptransport.cc", |
| 35 | "base/jseptransport.h", |
kjellander | c76dc95 | 2016-06-03 10:09:32 | [diff] [blame] | 36 | "base/p2pconstants.cc", |
| 37 | "base/p2pconstants.h", |
kjellander | c76dc95 | 2016-06-03 10:09:32 | [diff] [blame] | 38 | "base/p2ptransportchannel.cc", |
| 39 | "base/p2ptransportchannel.h", |
zstein | abbacbf | 2017-03-20 17:53:12 | [diff] [blame] | 40 | "base/packetlossestimator.cc", |
| 41 | "base/packetlossestimator.h", |
kjellander | c76dc95 | 2016-06-03 10:09:32 | [diff] [blame] | 42 | "base/packetsocketfactory.h", |
johan | a9c7cfa | 2016-10-18 22:38:38 | [diff] [blame] | 43 | "base/packettransportinterface.h", |
deadbeef | 5bd5ca3 | 2017-02-10 19:31:50 | [diff] [blame] | 44 | "base/packettransportinternal.h", |
kjellander | c76dc95 | 2016-06-03 10:09:32 | [diff] [blame] | 45 | "base/port.cc", |
| 46 | "base/port.h", |
| 47 | "base/portallocator.cc", |
| 48 | "base/portallocator.h", |
| 49 | "base/portinterface.h", |
| 50 | "base/pseudotcp.cc", |
| 51 | "base/pseudotcp.h", |
| 52 | "base/relayport.cc", |
| 53 | "base/relayport.h", |
kjellander | 5023d41 | 2016-06-18 11:23:01 | [diff] [blame] | 54 | "base/session.cc", |
| 55 | "base/session.h", |
kjellander | c76dc95 | 2016-06-03 10:09:32 | [diff] [blame] | 56 | "base/sessiondescription.cc", |
| 57 | "base/sessiondescription.h", |
kjellander | c76dc95 | 2016-06-03 10:09:32 | [diff] [blame] | 58 | "base/stun.cc", |
| 59 | "base/stun.h", |
| 60 | "base/stunport.cc", |
| 61 | "base/stunport.h", |
| 62 | "base/stunrequest.cc", |
| 63 | "base/stunrequest.h", |
kjellander | c76dc95 | 2016-06-03 10:09:32 | [diff] [blame] | 64 | "base/tcpport.cc", |
| 65 | "base/tcpport.h", |
deadbeef | 57fd726 | 2016-12-06 23:28:55 | [diff] [blame] | 66 | "base/transport.h", |
kjellander | c76dc95 | 2016-06-03 10:09:32 | [diff] [blame] | 67 | "base/transportcontroller.cc", |
| 68 | "base/transportcontroller.h", |
| 69 | "base/transportdescription.cc", |
| 70 | "base/transportdescription.h", |
| 71 | "base/transportdescriptionfactory.cc", |
| 72 | "base/transportdescriptionfactory.h", |
| 73 | "base/transportinfo.h", |
| 74 | "base/turnport.cc", |
| 75 | "base/turnport.h", |
kjellander | c76dc95 | 2016-06-03 10:09:32 | [diff] [blame] | 76 | "base/udpport.h", |
deadbeef | d1c0998 | 2017-01-18 23:16:37 | [diff] [blame] | 77 | "base/udptransport.cc", |
| 78 | "base/udptransport.h", |
kjellander | c76dc95 | 2016-06-03 10:09:32 | [diff] [blame] | 79 | "client/basicportallocator.cc", |
| 80 | "client/basicportallocator.h", |
kjellander | c76dc95 | 2016-06-03 10:09:32 | [diff] [blame] | 81 | "client/socketmonitor.cc", |
| 82 | "client/socketmonitor.h", |
| 83 | ] |
| 84 | |
deadbeef | 1b54a5f | 2017-01-24 03:39:57 | [diff] [blame] | 85 | defines = [] |
kjellander | c76dc95 | 2016-06-03 10:09:32 | [diff] [blame] | 86 | |
| 87 | deps = [ |
| 88 | "../base:rtc_base", |
kjellander | c76dc95 | 2016-06-03 10:09:32 | [diff] [blame] | 89 | ] |
| 90 | |
| 91 | if (rtc_build_expat) { |
| 92 | deps += [ "//third_party/expat" ] |
| 93 | public_deps = [ |
| 94 | "//third_party/expat", |
| 95 | ] |
| 96 | } |
| 97 | |
ehmaldonado | e9cc686 | 2016-09-05 13:10:18 | [diff] [blame] | 98 | public_configs = [ ":rtc_p2p_inherited_config" ] |
kjellander | c76dc95 | 2016-06-03 10:09:32 | [diff] [blame] | 99 | |
kjellander | 5023d41 | 2016-06-18 11:23:01 | [diff] [blame] | 100 | if (build_with_chromium) { |
| 101 | if (is_nacl) { |
| 102 | deps += [ "//native_client_sdk/src/libraries/nacl_io" ] |
| 103 | } |
| 104 | } else { |
| 105 | sources += [ |
| 106 | "base/relayserver.cc", |
| 107 | "base/relayserver.h", |
| 108 | "base/stunserver.cc", |
| 109 | "base/stunserver.h", |
| 110 | "base/turnserver.cc", |
| 111 | "base/turnserver.h", |
| 112 | ] |
kjellander | c76dc95 | 2016-06-03 10:09:32 | [diff] [blame] | 113 | defines += [ |
| 114 | "FEATURE_ENABLE_VOICEMAIL", |
| 115 | "FEATURE_ENABLE_PSTN", |
| 116 | ] |
| 117 | |
kjellander | e40a7ee | 2016-10-17 06:56:12 | [diff] [blame] | 118 | if (!build_with_chromium && is_clang) { |
| 119 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 11:10:34 | [diff] [blame] | 120 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | c76dc95 | 2016-06-03 10:09:32 | [diff] [blame] | 121 | } |
| 122 | } |
| 123 | |
| 124 | if (rtc_use_quic) { |
| 125 | deps = [ |
| 126 | "//third_party/libquic", |
| 127 | ] |
| 128 | sources += [ |
| 129 | "quic/quicconnectionhelper.cc", |
| 130 | "quic/quicconnectionhelper.h", |
| 131 | "quic/quicsession.cc", |
| 132 | "quic/quicsession.h", |
| 133 | "quic/quictransport.cc", |
| 134 | "quic/quictransport.h", |
| 135 | "quic/quictransportchannel.cc", |
| 136 | "quic/quictransportchannel.h", |
| 137 | "quic/reliablequicstream.cc", |
| 138 | "quic/reliablequicstream.h", |
| 139 | ] |
| 140 | public_deps += [ "//third_party/libquic" ] |
| 141 | } |
| 142 | } |
| 143 | |
ehmaldonado | da8dcfb | 2017-01-04 15:11:23 | [diff] [blame] | 144 | if (rtc_include_tests) { |
deadbeef | 59edb92 | 2017-04-18 22:49:09 | [diff] [blame^] | 145 | rtc_source_set("p2p_test_utils") { |
ehmaldonado | da8dcfb | 2017-01-04 15:11:23 | [diff] [blame] | 146 | testonly = true |
| 147 | sources = [ |
kjellander | 98e1531 | 2017-03-04 23:08:44 | [diff] [blame] | 148 | "base/fakedtlstransport.h", |
| 149 | "base/fakeicetransport.h", |
| 150 | "base/fakepackettransport.h", |
| 151 | "base/fakeportallocator.h", |
| 152 | "base/faketransportcontroller.h", |
kjellander | 98e1531 | 2017-03-04 23:08:44 | [diff] [blame] | 153 | "base/mockicetransport.h", |
deadbeef | 59edb92 | 2017-04-18 22:49:09 | [diff] [blame^] | 154 | "base/testrelayserver.h", |
| 155 | "base/teststunserver.h", |
| 156 | "base/testturnserver.h", |
| 157 | ] |
| 158 | |
| 159 | deps = [ |
| 160 | ":rtc_p2p", |
| 161 | "//testing/gmock", |
| 162 | ] |
| 163 | |
| 164 | if (!build_with_chromium && is_clang) { |
| 165 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 166 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | rtc_source_set("rtc_p2p_unittests") { |
| 171 | testonly = true |
| 172 | sources = [ |
| 173 | "base/asyncstuntcpsocket_unittest.cc", |
| 174 | "base/dtlstransportchannel_unittest.cc", |
| 175 | "base/jseptransport_unittest.cc", |
ehmaldonado | da8dcfb | 2017-01-04 15:11:23 | [diff] [blame] | 176 | "base/p2ptransportchannel_unittest.cc", |
zstein | abbacbf | 2017-03-20 17:53:12 | [diff] [blame] | 177 | "base/packetlossestimator_unittest.cc", |
ehmaldonado | da8dcfb | 2017-01-04 15:11:23 | [diff] [blame] | 178 | "base/port_unittest.cc", |
| 179 | "base/portallocator_unittest.cc", |
| 180 | "base/pseudotcp_unittest.cc", |
| 181 | "base/relayport_unittest.cc", |
| 182 | "base/relayserver_unittest.cc", |
| 183 | "base/stun_unittest.cc", |
| 184 | "base/stunport_unittest.cc", |
| 185 | "base/stunrequest_unittest.cc", |
| 186 | "base/stunserver_unittest.cc", |
| 187 | "base/tcpport_unittest.cc", |
ehmaldonado | da8dcfb | 2017-01-04 15:11:23 | [diff] [blame] | 188 | "base/transportcontroller_unittest.cc", |
| 189 | "base/transportdescriptionfactory_unittest.cc", |
| 190 | "base/turnport_unittest.cc", |
| 191 | "base/turnserver_unittest.cc", |
deadbeef | d1c0998 | 2017-01-18 23:16:37 | [diff] [blame] | 192 | "base/udptransport_unittest.cc", |
ehmaldonado | da8dcfb | 2017-01-04 15:11:23 | [diff] [blame] | 193 | "client/basicportallocator_unittest.cc", |
| 194 | ] |
| 195 | if (rtc_use_quic) { |
| 196 | sources += [ |
| 197 | "quic/quicconnectionhelper_unittest.cc", |
| 198 | "quic/quicsession_unittest.cc", |
| 199 | "quic/quictransport_unittest.cc", |
| 200 | "quic/quictransportchannel_unittest.cc", |
| 201 | "quic/reliablequicstream_unittest.cc", |
| 202 | ] |
| 203 | } |
| 204 | deps = [ |
deadbeef | 59edb92 | 2017-04-18 22:49:09 | [diff] [blame^] | 205 | ":p2p_test_utils", |
ehmaldonado | da8dcfb | 2017-01-04 15:11:23 | [diff] [blame] | 206 | ":rtc_p2p", |
| 207 | "../api:fakemetricsobserver", |
| 208 | "//testing/gmock", |
| 209 | "//testing/gtest", |
| 210 | ] |
| 211 | if (!build_with_chromium && is_clang) { |
| 212 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 213 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 214 | } |
| 215 | defines = [ "GTEST_RELATIVE_PATH" ] |
| 216 | } |
| 217 | } |
| 218 | |
kjellander | b62dbbe | 2016-09-23 07:38:52 | [diff] [blame] | 219 | rtc_static_library("libstunprober") { |
kjellander | c76dc95 | 2016-06-03 10:09:32 | [diff] [blame] | 220 | sources = [ |
| 221 | "stunprober/stunprober.cc", |
| 222 | ] |
| 223 | |
| 224 | if (!build_with_chromium && is_clang) { |
| 225 | # Suppress warnings from Chrome's Clang plugins. |
| 226 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
ehmaldonado | 38a2132 | 2016-09-02 11:10:34 | [diff] [blame] | 227 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | c76dc95 | 2016-06-03 10:09:32 | [diff] [blame] | 228 | } |
| 229 | |
| 230 | deps = [ |
| 231 | "..:webrtc_common", |
| 232 | "../base:rtc_base", |
| 233 | ] |
| 234 | } |
ehmaldonado | da8dcfb | 2017-01-04 15:11:23 | [diff] [blame] | 235 | |
| 236 | if (rtc_include_tests) { |
| 237 | rtc_source_set("libstunprober_unittests") { |
| 238 | testonly = true |
| 239 | sources = [ |
| 240 | "stunprober/stunprober_unittest.cc", |
| 241 | ] |
| 242 | deps = [ |
| 243 | ":libstunprober", |
| 244 | "//testing/gmock", |
| 245 | "//testing/gtest", |
| 246 | ] |
| 247 | if (!build_with_chromium && is_clang) { |
| 248 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 249 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 250 | } |
| 251 | defines = [ "GTEST_RELATIVE_PATH" ] |
| 252 | } |
| 253 | } |