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 = [ |
| 86 | "../base:rtc_base", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 87 | ] |
| 88 | |
| 89 | if (rtc_build_expat) { |
| 90 | deps += [ "//third_party/expat" ] |
| 91 | public_deps = [ |
| 92 | "//third_party/expat", |
| 93 | ] |
| 94 | } |
| 95 | |
ehmaldonado | e9cc686 | 2016-09-05 06:10:18 -0700 | [diff] [blame] | 96 | public_configs = [ ":rtc_p2p_inherited_config" ] |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 97 | |
kjellander | 5023d41 | 2016-06-18 04:23:01 -0700 | [diff] [blame] | 98 | if (build_with_chromium) { |
| 99 | if (is_nacl) { |
| 100 | deps += [ "//native_client_sdk/src/libraries/nacl_io" ] |
| 101 | } |
| 102 | } else { |
| 103 | sources += [ |
| 104 | "base/relayserver.cc", |
| 105 | "base/relayserver.h", |
| 106 | "base/stunserver.cc", |
| 107 | "base/stunserver.h", |
| 108 | "base/turnserver.cc", |
| 109 | "base/turnserver.h", |
| 110 | ] |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 111 | defines += [ |
| 112 | "FEATURE_ENABLE_VOICEMAIL", |
| 113 | "FEATURE_ENABLE_PSTN", |
| 114 | ] |
| 115 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 116 | if (!build_with_chromium && is_clang) { |
| 117 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 118 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 119 | } |
| 120 | } |
| 121 | |
| 122 | if (rtc_use_quic) { |
| 123 | deps = [ |
| 124 | "//third_party/libquic", |
| 125 | ] |
| 126 | sources += [ |
| 127 | "quic/quicconnectionhelper.cc", |
| 128 | "quic/quicconnectionhelper.h", |
| 129 | "quic/quicsession.cc", |
| 130 | "quic/quicsession.h", |
| 131 | "quic/quictransport.cc", |
| 132 | "quic/quictransport.h", |
| 133 | "quic/quictransportchannel.cc", |
| 134 | "quic/quictransportchannel.h", |
| 135 | "quic/reliablequicstream.cc", |
| 136 | "quic/reliablequicstream.h", |
| 137 | ] |
| 138 | public_deps += [ "//third_party/libquic" ] |
| 139 | } |
| 140 | } |
| 141 | |
ehmaldonado | da8dcfb | 2017-01-04 07:11:23 -0800 | [diff] [blame] | 142 | if (rtc_include_tests) { |
| 143 | rtc_source_set("rtc_p2p_unittests") { |
| 144 | testonly = true |
| 145 | sources = [ |
| 146 | "base/asyncstuntcpsocket_unittest.cc", |
| 147 | "base/dtlstransportchannel_unittest.cc", |
kjellander | 98e1531 | 2017-03-04 15:08:44 -0800 | [diff] [blame^] | 148 | "base/fakedtlstransport.h", |
| 149 | "base/fakeicetransport.h", |
| 150 | "base/fakepackettransport.h", |
| 151 | "base/fakeportallocator.h", |
| 152 | "base/faketransportcontroller.h", |
ehmaldonado | da8dcfb | 2017-01-04 07:11:23 -0800 | [diff] [blame] | 153 | "base/jseptransport_unittest.cc", |
kjellander | 98e1531 | 2017-03-04 15:08:44 -0800 | [diff] [blame^] | 154 | "base/mockicetransport.h", |
ehmaldonado | da8dcfb | 2017-01-04 07:11:23 -0800 | [diff] [blame] | 155 | "base/p2ptransportchannel_unittest.cc", |
| 156 | "base/port_unittest.cc", |
| 157 | "base/portallocator_unittest.cc", |
| 158 | "base/pseudotcp_unittest.cc", |
| 159 | "base/relayport_unittest.cc", |
| 160 | "base/relayserver_unittest.cc", |
| 161 | "base/stun_unittest.cc", |
| 162 | "base/stunport_unittest.cc", |
| 163 | "base/stunrequest_unittest.cc", |
| 164 | "base/stunserver_unittest.cc", |
| 165 | "base/tcpport_unittest.cc", |
kjellander | 98e1531 | 2017-03-04 15:08:44 -0800 | [diff] [blame^] | 166 | "base/testrelayserver.h", |
| 167 | "base/teststunserver.h", |
| 168 | "base/testturnserver.h", |
ehmaldonado | da8dcfb | 2017-01-04 07:11:23 -0800 | [diff] [blame] | 169 | "base/transportcontroller_unittest.cc", |
| 170 | "base/transportdescriptionfactory_unittest.cc", |
| 171 | "base/turnport_unittest.cc", |
| 172 | "base/turnserver_unittest.cc", |
deadbeef | d1c0998 | 2017-01-18 15:16:37 -0800 | [diff] [blame] | 173 | "base/udptransport_unittest.cc", |
ehmaldonado | da8dcfb | 2017-01-04 07:11:23 -0800 | [diff] [blame] | 174 | "client/basicportallocator_unittest.cc", |
| 175 | ] |
| 176 | if (rtc_use_quic) { |
| 177 | sources += [ |
| 178 | "quic/quicconnectionhelper_unittest.cc", |
| 179 | "quic/quicsession_unittest.cc", |
| 180 | "quic/quictransport_unittest.cc", |
| 181 | "quic/quictransportchannel_unittest.cc", |
| 182 | "quic/reliablequicstream_unittest.cc", |
| 183 | ] |
| 184 | } |
| 185 | deps = [ |
| 186 | ":rtc_p2p", |
| 187 | "../api:fakemetricsobserver", |
| 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 | } |
| 197 | } |
| 198 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 199 | rtc_static_library("libstunprober") { |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 200 | sources = [ |
| 201 | "stunprober/stunprober.cc", |
| 202 | ] |
| 203 | |
| 204 | if (!build_with_chromium && is_clang) { |
| 205 | # Suppress warnings from Chrome's Clang plugins. |
| 206 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 207 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 208 | } |
| 209 | |
| 210 | deps = [ |
| 211 | "..:webrtc_common", |
| 212 | "../base:rtc_base", |
| 213 | ] |
| 214 | } |
ehmaldonado | da8dcfb | 2017-01-04 07:11:23 -0800 | [diff] [blame] | 215 | |
| 216 | if (rtc_include_tests) { |
| 217 | rtc_source_set("libstunprober_unittests") { |
| 218 | testonly = true |
| 219 | sources = [ |
| 220 | "stunprober/stunprober_unittest.cc", |
| 221 | ] |
| 222 | deps = [ |
| 223 | ":libstunprober", |
| 224 | "//testing/gmock", |
| 225 | "//testing/gtest", |
| 226 | ] |
| 227 | if (!build_with_chromium && is_clang) { |
| 228 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 229 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 230 | } |
| 231 | defines = [ "GTEST_RELATIVE_PATH" ] |
| 232 | } |
| 233 | } |