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 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 18 | rtc_static_library("rtc_p2p") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 19 | visibility = [ "*" ] |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 20 | sources = [ |
| 21 | "base/asyncstuntcpsocket.cc", |
| 22 | "base/asyncstuntcpsocket.h", |
Zach Stein | e20867f | 2018-08-02 13:20:15 -0700 | [diff] [blame] | 23 | "base/basicasyncresolverfactory.cc", |
| 24 | "base/basicasyncresolverfactory.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 25 | "base/basicpacketsocketfactory.cc", |
| 26 | "base/basicpacketsocketfactory.h", |
Mirko Bonadei | 6697278 | 2017-10-12 09:42:07 +0200 | [diff] [blame] | 27 | "base/candidatepairinterface.h", |
zhihuang | ca6d3b6 | 2017-08-23 18:05:50 -0700 | [diff] [blame] | 28 | "base/dtlstransport.cc", |
| 29 | "base/dtlstransport.h", |
Steve Anton | 33f69db | 2017-10-30 10:01:15 -0700 | [diff] [blame] | 30 | "base/dtlstransportinternal.cc", |
zhihuang | e50658d | 2017-01-03 11:34:12 -0800 | [diff] [blame] | 31 | "base/dtlstransportinternal.h", |
Jonas Oreland | 1cd39fa | 2018-10-11 07:47:12 +0200 | [diff] [blame] | 32 | "base/icecredentialsiterator.cc", |
| 33 | "base/icecredentialsiterator.h", |
Steve Anton | 33f69db | 2017-10-30 10:01:15 -0700 | [diff] [blame] | 34 | "base/icetransportinternal.cc", |
zhihuang | 86abd6f | 2016-12-19 11:54:05 -0800 | [diff] [blame] | 35 | "base/icetransportinternal.h", |
Qingsi Wang | 558b93b | 2018-08-30 10:38:44 -0700 | [diff] [blame] | 36 | "base/mdns_message.cc", |
| 37 | "base/mdns_message.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 38 | "base/p2pconstants.cc", |
| 39 | "base/p2pconstants.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 40 | "base/p2ptransportchannel.cc", |
| 41 | "base/p2ptransportchannel.h", |
zstein | abbacbf | 2017-03-20 10:53:12 -0700 | [diff] [blame] | 42 | "base/packetlossestimator.cc", |
| 43 | "base/packetlossestimator.h", |
Steve Anton | 9d4a2e6 | 2017-10-26 11:23:08 -0700 | [diff] [blame] | 44 | "base/packetsocketfactory.cc", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 45 | "base/packetsocketfactory.h", |
johan | a9c7cfa | 2016-10-18 15:38:38 -0700 | [diff] [blame] | 46 | "base/packettransportinterface.h", |
Steve Anton | 33f69db | 2017-10-30 10:01:15 -0700 | [diff] [blame] | 47 | "base/packettransportinternal.cc", |
deadbeef | 5bd5ca3 | 2017-02-10 11:31:50 -0800 | [diff] [blame] | 48 | "base/packettransportinternal.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 49 | "base/port.cc", |
| 50 | "base/port.h", |
| 51 | "base/portallocator.cc", |
| 52 | "base/portallocator.h", |
Steve Anton | 1cf1b7d | 2017-10-30 10:00:15 -0700 | [diff] [blame] | 53 | "base/portinterface.cc", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 54 | "base/portinterface.h", |
| 55 | "base/pseudotcp.cc", |
| 56 | "base/pseudotcp.h", |
Qingsi Wang | 1b36894 | 2018-06-13 13:54:08 -0700 | [diff] [blame] | 57 | "base/regatheringcontroller.cc", |
| 58 | "base/regatheringcontroller.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 59 | "base/relayport.cc", |
| 60 | "base/relayport.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 61 | "base/stun.cc", |
| 62 | "base/stun.h", |
| 63 | "base/stunport.cc", |
| 64 | "base/stunport.h", |
| 65 | "base/stunrequest.cc", |
| 66 | "base/stunrequest.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 67 | "base/tcpport.cc", |
| 68 | "base/tcpport.h", |
deadbeef | 57fd726 | 2016-12-06 15:28:55 -0800 | [diff] [blame] | 69 | "base/transport.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 70 | "base/transportdescription.cc", |
| 71 | "base/transportdescription.h", |
| 72 | "base/transportdescriptionfactory.cc", |
| 73 | "base/transportdescriptionfactory.h", |
Zhi Huang | e818b6e | 2018-02-22 15:26:27 -0800 | [diff] [blame] | 74 | "base/transportfactoryinterface.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 75 | "base/transportinfo.h", |
| 76 | "base/turnport.cc", |
| 77 | "base/turnport.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 78 | "base/udpport.h", |
| 79 | "client/basicportallocator.cc", |
| 80 | "client/basicportallocator.h", |
Jonas Oreland | 202994c | 2017-12-18 12:10:43 +0100 | [diff] [blame] | 81 | "client/relayportfactoryinterface.h", |
Jonas Oreland | 202994c | 2017-12-18 12:10:43 +0100 | [diff] [blame] | 82 | "client/turnportfactory.cc", |
| 83 | "client/turnportfactory.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 84 | ] |
| 85 | |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 86 | deps = [ |
kjellander | 8a11663 | 2017-04-21 05:17:08 -0700 | [diff] [blame] | 87 | "../api:libjingle_peerconnection_api", |
| 88 | "../api:ortc_api", |
Jonas Olsson | 81125f0 | 2018-10-09 10:52:04 +0200 | [diff] [blame] | 89 | "../api/transport:enums", |
Qingsi Wang | 93a8439 | 2018-01-30 17:13:09 -0800 | [diff] [blame] | 90 | "../logging:ice_log", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 91 | "../rtc_base:checks", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 92 | "../rtc_base:rtc_base", |
Karl Wiberg | 12edf4c | 2018-03-07 14:18:56 +0100 | [diff] [blame] | 93 | "../rtc_base:safe_minmax", |
Patrik Höglund | 3e11343 | 2017-12-15 14:40:10 +0100 | [diff] [blame] | 94 | "../rtc_base:stringutils", |
Qingsi Wang | 0961933 | 2018-09-12 22:51:55 -0700 | [diff] [blame] | 95 | "../rtc_base:weak_ptr", |
Mirko Bonadei | 3b56ee7 | 2018-10-15 17:15:12 +0200 | [diff] [blame] | 96 | "../rtc_base/system:rtc_export", |
Artem Titov | a76af0c | 2018-07-23 17:38:12 +0200 | [diff] [blame] | 97 | "../rtc_base/third_party/base64", |
Artem Titov | e41c433 | 2018-07-25 15:04:28 +0200 | [diff] [blame] | 98 | "../rtc_base/third_party/sigslot", |
Mirko Bonadei | 17f4878 | 2018-09-28 08:51:10 +0200 | [diff] [blame] | 99 | "../system_wrappers:field_trial", |
| 100 | "../system_wrappers:metrics", |
Karl Wiberg | 918f50c | 2018-07-05 11:40:33 +0200 | [diff] [blame] | 101 | "//third_party/abseil-cpp/absl/memory", |
Niels Möller | 3c7d599 | 2018-10-19 15:29:54 +0200 | [diff] [blame] | 102 | "//third_party/abseil-cpp/absl/strings", |
Danil Chapovalov | 00c7183 | 2018-06-15 15:58:38 +0200 | [diff] [blame] | 103 | "//third_party/abseil-cpp/absl/types:optional", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 104 | ] |
| 105 | |
kjellander | 5023d41 | 2016-06-18 04:23:01 -0700 | [diff] [blame] | 106 | if (build_with_chromium) { |
| 107 | if (is_nacl) { |
| 108 | deps += [ "//native_client_sdk/src/libraries/nacl_io" ] |
| 109 | } |
Oleh Prypin | 4191a81 | 2018-10-25 07:58:30 +0000 | [diff] [blame] | 110 | } else { |
| 111 | sources += [ |
| 112 | "base/relayserver.cc", |
| 113 | "base/relayserver.h", |
| 114 | "base/stunserver.cc", |
| 115 | "base/stunserver.h", |
| 116 | "base/turnserver.cc", |
| 117 | "base/turnserver.h", |
| 118 | ] |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 119 | } |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 120 | } |
| 121 | |
ehmaldonado | da8dcfb | 2017-01-04 07:11:23 -0800 | [diff] [blame] | 122 | if (rtc_include_tests) { |
deadbeef | 59edb92 | 2017-04-18 15:49:09 -0700 | [diff] [blame] | 123 | rtc_source_set("p2p_test_utils") { |
ehmaldonado | da8dcfb | 2017-01-04 07:11:23 -0800 | [diff] [blame] | 124 | testonly = true |
| 125 | sources = [ |
kjellander | 8a11663 | 2017-04-21 05:17:08 -0700 | [diff] [blame] | 126 | "base/fakecandidatepair.h", |
kjellander | 98e1531 | 2017-03-04 15:08:44 -0800 | [diff] [blame] | 127 | "base/fakedtlstransport.h", |
| 128 | "base/fakeicetransport.h", |
| 129 | "base/fakepackettransport.h", |
| 130 | "base/fakeportallocator.h", |
Zach Stein | 6fcdc2f | 2018-08-23 16:25:55 -0700 | [diff] [blame] | 131 | "base/mockasyncresolver.h", |
kjellander | 98e1531 | 2017-03-04 15:08:44 -0800 | [diff] [blame] | 132 | "base/mockicetransport.h", |
deadbeef | 59edb92 | 2017-04-18 15:49:09 -0700 | [diff] [blame] | 133 | "base/testrelayserver.h", |
Steve Anton | eae3e65 | 2017-10-25 14:46:18 -0700 | [diff] [blame] | 134 | "base/teststunserver.cc", |
deadbeef | 59edb92 | 2017-04-18 15:49:09 -0700 | [diff] [blame] | 135 | "base/teststunserver.h", |
Jonas Oreland | bdcee28 | 2017-10-10 14:01:40 +0200 | [diff] [blame] | 136 | "base/testturncustomizer.h", |
deadbeef | 59edb92 | 2017-04-18 15:49:09 -0700 | [diff] [blame] | 137 | "base/testturnserver.h", |
| 138 | ] |
deadbeef | 59edb92 | 2017-04-18 15:49:09 -0700 | [diff] [blame] | 139 | deps = [ |
| 140 | ":rtc_p2p", |
Patrik Höglund | 7aee3d5 | 2017-11-15 13:15:17 +0100 | [diff] [blame] | 141 | "../api:libjingle_peerconnection_api", |
kjellander | 8a11663 | 2017-04-21 05:17:08 -0700 | [diff] [blame] | 142 | "../api:ortc_api", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 143 | "../rtc_base:rtc_base", |
| 144 | "../rtc_base:rtc_base_approved", |
| 145 | "../rtc_base:rtc_base_tests_utils", |
Artem Titov | e41c433 | 2018-07-25 15:04:28 +0200 | [diff] [blame] | 146 | "../rtc_base/third_party/sigslot", |
kjellander | 8a11663 | 2017-04-21 05:17:08 -0700 | [diff] [blame] | 147 | "../test:test_support", |
Karl Wiberg | 918f50c | 2018-07-05 11:40:33 +0200 | [diff] [blame] | 148 | "//third_party/abseil-cpp/absl/memory", |
deadbeef | 59edb92 | 2017-04-18 15:49:09 -0700 | [diff] [blame] | 149 | ] |
deadbeef | 59edb92 | 2017-04-18 15:49:09 -0700 | [diff] [blame] | 150 | } |
| 151 | |
| 152 | rtc_source_set("rtc_p2p_unittests") { |
| 153 | testonly = true |
kjellander | e0629c0 | 2017-04-25 04:04:50 -0700 | [diff] [blame] | 154 | |
deadbeef | 59edb92 | 2017-04-18 15:49:09 -0700 | [diff] [blame] | 155 | sources = [ |
| 156 | "base/asyncstuntcpsocket_unittest.cc", |
Zach Stein | e20867f | 2018-08-02 13:20:15 -0700 | [diff] [blame] | 157 | "base/basicasyncresolverfactory_unittest.cc", |
zhihuang | ca6d3b6 | 2017-08-23 18:05:50 -0700 | [diff] [blame] | 158 | "base/dtlstransport_unittest.cc", |
Jonas Oreland | 1cd39fa | 2018-10-11 07:47:12 +0200 | [diff] [blame] | 159 | "base/icecredentialsiterator_unittest.cc", |
Qingsi Wang | 558b93b | 2018-08-30 10:38:44 -0700 | [diff] [blame] | 160 | "base/mdns_message_unittest.cc", |
ehmaldonado | da8dcfb | 2017-01-04 07:11:23 -0800 | [diff] [blame] | 161 | "base/p2ptransportchannel_unittest.cc", |
zstein | abbacbf | 2017-03-20 10:53:12 -0700 | [diff] [blame] | 162 | "base/packetlossestimator_unittest.cc", |
ehmaldonado | da8dcfb | 2017-01-04 07:11:23 -0800 | [diff] [blame] | 163 | "base/port_unittest.cc", |
| 164 | "base/portallocator_unittest.cc", |
| 165 | "base/pseudotcp_unittest.cc", |
Qingsi Wang | 1b36894 | 2018-06-13 13:54:08 -0700 | [diff] [blame] | 166 | "base/regatheringcontroller_unittest.cc", |
ehmaldonado | da8dcfb | 2017-01-04 07:11:23 -0800 | [diff] [blame] | 167 | "base/relayport_unittest.cc", |
| 168 | "base/relayserver_unittest.cc", |
| 169 | "base/stun_unittest.cc", |
| 170 | "base/stunport_unittest.cc", |
| 171 | "base/stunrequest_unittest.cc", |
| 172 | "base/stunserver_unittest.cc", |
| 173 | "base/tcpport_unittest.cc", |
ehmaldonado | da8dcfb | 2017-01-04 07:11:23 -0800 | [diff] [blame] | 174 | "base/transportdescriptionfactory_unittest.cc", |
| 175 | "base/turnport_unittest.cc", |
| 176 | "base/turnserver_unittest.cc", |
ehmaldonado | da8dcfb | 2017-01-04 07:11:23 -0800 | [diff] [blame] | 177 | "client/basicportallocator_unittest.cc", |
| 178 | ] |
ehmaldonado | da8dcfb | 2017-01-04 07:11:23 -0800 | [diff] [blame] | 179 | deps = [ |
deadbeef | 59edb92 | 2017-04-18 15:49:09 -0700 | [diff] [blame] | 180 | ":p2p_test_utils", |
ehmaldonado | da8dcfb | 2017-01-04 07:11:23 -0800 | [diff] [blame] | 181 | ":rtc_p2p", |
kjellander | 8a11663 | 2017-04-21 05:17:08 -0700 | [diff] [blame] | 182 | "../api:ortc_api", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 183 | "../rtc_base:checks", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 184 | "../rtc_base:rtc_base", |
| 185 | "../rtc_base:rtc_base_approved", |
| 186 | "../rtc_base:rtc_base_tests_utils", |
Patrik Höglund | 3e11343 | 2017-12-15 14:40:10 +0100 | [diff] [blame] | 187 | "../rtc_base:stringutils", |
Mirko Bonadei | 17f4878 | 2018-09-28 08:51:10 +0200 | [diff] [blame] | 188 | "../system_wrappers:metrics", |
kjellander | 8a11663 | 2017-04-21 05:17:08 -0700 | [diff] [blame] | 189 | "../test:test_support", |
ehmaldonado | da8dcfb | 2017-01-04 07:11:23 -0800 | [diff] [blame] | 190 | "//testing/gtest", |
Karl Wiberg | 918f50c | 2018-07-05 11:40:33 +0200 | [diff] [blame] | 191 | "//third_party/abseil-cpp/absl/memory", |
ehmaldonado | da8dcfb | 2017-01-04 07:11:23 -0800 | [diff] [blame] | 192 | ] |
| 193 | if (!build_with_chromium && is_clang) { |
| 194 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 195 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 196 | } |
ehmaldonado | da8dcfb | 2017-01-04 07:11:23 -0800 | [diff] [blame] | 197 | } |
| 198 | } |
| 199 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 200 | rtc_static_library("libstunprober") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 201 | visibility = [ "*" ] |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 202 | sources = [ |
| 203 | "stunprober/stunprober.cc", |
Mirko Bonadei | 6697278 | 2017-10-12 09:42:07 +0200 | [diff] [blame] | 204 | "stunprober/stunprober.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 205 | ] |
| 206 | |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 207 | deps = [ |
kjellander | 8a11663 | 2017-04-21 05:17:08 -0700 | [diff] [blame] | 208 | ":rtc_p2p", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 209 | "..:webrtc_common", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 210 | "../rtc_base:checks", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 211 | "../rtc_base:rtc_base", |
Mirko Bonadei | d65d179 | 2018-10-17 16:50:07 +0200 | [diff] [blame] | 212 | "../rtc_base/system:rtc_export", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 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 |
kjellander | e0629c0 | 2017-04-25 04:04:50 -0700 | [diff] [blame] | 219 | |
ehmaldonado | da8dcfb | 2017-01-04 07:11:23 -0800 | [diff] [blame] | 220 | sources = [ |
| 221 | "stunprober/stunprober_unittest.cc", |
| 222 | ] |
| 223 | deps = [ |
| 224 | ":libstunprober", |
kjellander | 8a11663 | 2017-04-21 05:17:08 -0700 | [diff] [blame] | 225 | ":p2p_test_utils", |
| 226 | ":rtc_p2p", |
Patrik Höglund | a8005cf | 2017-12-13 16:05:42 +0100 | [diff] [blame] | 227 | "../rtc_base:checks", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 228 | "../rtc_base:rtc_base", |
| 229 | "../rtc_base:rtc_base_tests_utils", |
ehmaldonado | da8dcfb | 2017-01-04 07:11:23 -0800 | [diff] [blame] | 230 | "//testing/gtest", |
| 231 | ] |
ehmaldonado | da8dcfb | 2017-01-04 07:11:23 -0800 | [diff] [blame] | 232 | } |
| 233 | } |