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 | |
| 9 | import("../build/webrtc.gni") |
| 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 | ] |
kjellander | 6ceab08 | 2016-10-28 05:44:03 -0700 | [diff] [blame^] | 16 | if (!build_with_chromium) { |
| 17 | # TODO(kjellander): Move this to examples or tools. |
| 18 | public_deps += [ ":stun_prober" ] |
| 19 | } |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 20 | } |
| 21 | |
| 22 | config("rtc_p2p_inherited_config") { |
| 23 | defines = [ "FEATURE_ENABLE_VOICEMAIL" ] |
| 24 | } |
| 25 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 26 | rtc_static_library("rtc_p2p") { |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 27 | sources = [ |
| 28 | "base/asyncstuntcpsocket.cc", |
| 29 | "base/asyncstuntcpsocket.h", |
| 30 | "base/basicpacketsocketfactory.cc", |
| 31 | "base/basicpacketsocketfactory.h", |
| 32 | "base/candidate.h", |
| 33 | "base/common.h", |
kjellander | 5023d41 | 2016-06-18 04:23:01 -0700 | [diff] [blame] | 34 | "base/dtlstransport.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 35 | "base/dtlstransportchannel.cc", |
| 36 | "base/dtlstransportchannel.h", |
| 37 | "base/p2pconstants.cc", |
| 38 | "base/p2pconstants.h", |
| 39 | "base/p2ptransport.cc", |
| 40 | "base/p2ptransport.h", |
| 41 | "base/p2ptransportchannel.cc", |
| 42 | "base/p2ptransportchannel.h", |
| 43 | "base/packetsocketfactory.h", |
johan | a9c7cfa | 2016-10-18 15:38:38 -0700 | [diff] [blame] | 44 | "base/packettransportinterface.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [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 04:23:01 -0700 | [diff] [blame] | 54 | "base/session.cc", |
| 55 | "base/session.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 56 | "base/sessiondescription.cc", |
| 57 | "base/sessiondescription.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [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 03:09:32 -0700 | [diff] [blame] | 64 | "base/tcpport.cc", |
| 65 | "base/tcpport.h", |
| 66 | "base/transport.cc", |
| 67 | "base/transport.h", |
| 68 | "base/transportchannel.cc", |
| 69 | "base/transportchannel.h", |
| 70 | "base/transportchannelimpl.h", |
| 71 | "base/transportcontroller.cc", |
| 72 | "base/transportcontroller.h", |
| 73 | "base/transportdescription.cc", |
| 74 | "base/transportdescription.h", |
| 75 | "base/transportdescriptionfactory.cc", |
| 76 | "base/transportdescriptionfactory.h", |
| 77 | "base/transportinfo.h", |
| 78 | "base/turnport.cc", |
| 79 | "base/turnport.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 80 | "base/udpport.h", |
| 81 | "client/basicportallocator.cc", |
| 82 | "client/basicportallocator.h", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 83 | "client/socketmonitor.cc", |
| 84 | "client/socketmonitor.h", |
| 85 | ] |
| 86 | |
| 87 | defines = [ "FEATURE_ENABLE_SSL" ] |
| 88 | |
| 89 | deps = [ |
| 90 | "../base:rtc_base", |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 91 | ] |
| 92 | |
| 93 | if (rtc_build_expat) { |
| 94 | deps += [ "//third_party/expat" ] |
| 95 | public_deps = [ |
| 96 | "//third_party/expat", |
| 97 | ] |
| 98 | } |
| 99 | |
ehmaldonado | e9cc686 | 2016-09-05 06:10:18 -0700 | [diff] [blame] | 100 | public_configs = [ ":rtc_p2p_inherited_config" ] |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 101 | |
kjellander | 5023d41 | 2016-06-18 04:23:01 -0700 | [diff] [blame] | 102 | if (build_with_chromium) { |
| 103 | if (is_nacl) { |
| 104 | deps += [ "//native_client_sdk/src/libraries/nacl_io" ] |
| 105 | } |
| 106 | } else { |
| 107 | sources += [ |
| 108 | "base/relayserver.cc", |
| 109 | "base/relayserver.h", |
| 110 | "base/stunserver.cc", |
| 111 | "base/stunserver.h", |
| 112 | "base/turnserver.cc", |
| 113 | "base/turnserver.h", |
| 114 | ] |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 115 | defines += [ |
| 116 | "FEATURE_ENABLE_VOICEMAIL", |
| 117 | "FEATURE_ENABLE_PSTN", |
| 118 | ] |
| 119 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 120 | if (!build_with_chromium && is_clang) { |
| 121 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 122 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 123 | } |
| 124 | } |
| 125 | |
| 126 | if (rtc_use_quic) { |
| 127 | deps = [ |
| 128 | "//third_party/libquic", |
| 129 | ] |
| 130 | sources += [ |
| 131 | "quic/quicconnectionhelper.cc", |
| 132 | "quic/quicconnectionhelper.h", |
| 133 | "quic/quicsession.cc", |
| 134 | "quic/quicsession.h", |
| 135 | "quic/quictransport.cc", |
| 136 | "quic/quictransport.h", |
| 137 | "quic/quictransportchannel.cc", |
| 138 | "quic/quictransportchannel.h", |
| 139 | "quic/reliablequicstream.cc", |
| 140 | "quic/reliablequicstream.h", |
| 141 | ] |
| 142 | public_deps += [ "//third_party/libquic" ] |
| 143 | } |
| 144 | } |
| 145 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 146 | rtc_static_library("libstunprober") { |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 147 | sources = [ |
| 148 | "stunprober/stunprober.cc", |
| 149 | ] |
| 150 | |
| 151 | if (!build_with_chromium && is_clang) { |
| 152 | # Suppress warnings from Chrome's Clang plugins. |
| 153 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 154 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | c76dc95 | 2016-06-03 03:09:32 -0700 | [diff] [blame] | 155 | } |
| 156 | |
| 157 | deps = [ |
| 158 | "..:webrtc_common", |
| 159 | "../base:rtc_base", |
| 160 | ] |
| 161 | } |
wjywbs | 5a601d9 | 2016-08-31 14:03:52 -0700 | [diff] [blame] | 162 | |
Per | 3f9dd7c | 2016-09-01 17:05:55 +0200 | [diff] [blame] | 163 | if (!build_with_chromium) { |
| 164 | # Doesn't build within Chrome on Win. |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 165 | rtc_executable("stun_prober") { |
Per | 3f9dd7c | 2016-09-01 17:05:55 +0200 | [diff] [blame] | 166 | sources = [ |
| 167 | "stunprober/main.cc", |
| 168 | ] |
| 169 | |
Per | 3f9dd7c | 2016-09-01 17:05:55 +0200 | [diff] [blame] | 170 | if (!build_with_chromium && is_clang) { |
| 171 | # Suppress warnings from Chrome's Clang plugins. |
| 172 | # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 173 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
Per | 3f9dd7c | 2016-09-01 17:05:55 +0200 | [diff] [blame] | 174 | } |
| 175 | |
| 176 | deps = [ |
| 177 | ":libstunprober", |
| 178 | ":rtc_p2p", |
| 179 | "../system_wrappers:field_trial_default", |
| 180 | ] |
wjywbs | 5a601d9 | 2016-08-31 14:03:52 -0700 | [diff] [blame] | 181 | } |
wjywbs | 5a601d9 | 2016-08-31 14:03:52 -0700 | [diff] [blame] | 182 | } |