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