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