blob: 9614896691ca2385d0424744c4e13a9a949d0e5a [file] [log] [blame]
kjellanderc76dc952016-06-03 03:09:32 -07001# 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
9import("../build/webrtc.gni")
10
11group("p2p") {
12 deps = [
13 ":rtc_p2p",
14 ]
15}
16
17config("rtc_p2p_inherited_config") {
18 defines = [ "FEATURE_ENABLE_VOICEMAIL" ]
19}
20
ehmaldonado38a21322016-09-02 04:10:34 -070021rtc_source_set("rtc_p2p") {
kjellanderc76dc952016-06-03 03:09:32 -070022 sources = [
23 "base/asyncstuntcpsocket.cc",
24 "base/asyncstuntcpsocket.h",
25 "base/basicpacketsocketfactory.cc",
26 "base/basicpacketsocketfactory.h",
27 "base/candidate.h",
28 "base/common.h",
kjellander5023d412016-06-18 04:23:01 -070029 "base/dtlstransport.h",
kjellanderc76dc952016-06-03 03:09:32 -070030 "base/dtlstransportchannel.cc",
31 "base/dtlstransportchannel.h",
32 "base/p2pconstants.cc",
33 "base/p2pconstants.h",
34 "base/p2ptransport.cc",
35 "base/p2ptransport.h",
36 "base/p2ptransportchannel.cc",
37 "base/p2ptransportchannel.h",
38 "base/packetsocketfactory.h",
39 "base/port.cc",
40 "base/port.h",
41 "base/portallocator.cc",
42 "base/portallocator.h",
43 "base/portinterface.h",
44 "base/pseudotcp.cc",
45 "base/pseudotcp.h",
46 "base/relayport.cc",
47 "base/relayport.h",
kjellander5023d412016-06-18 04:23:01 -070048 "base/session.cc",
49 "base/session.h",
kjellanderc76dc952016-06-03 03:09:32 -070050 "base/sessiondescription.cc",
51 "base/sessiondescription.h",
52 "base/sessionid.h",
53 "base/stun.cc",
54 "base/stun.h",
55 "base/stunport.cc",
56 "base/stunport.h",
57 "base/stunrequest.cc",
58 "base/stunrequest.h",
kjellanderc76dc952016-06-03 03:09:32 -070059 "base/tcpport.cc",
60 "base/tcpport.h",
61 "base/transport.cc",
62 "base/transport.h",
63 "base/transportchannel.cc",
64 "base/transportchannel.h",
65 "base/transportchannelimpl.h",
66 "base/transportcontroller.cc",
67 "base/transportcontroller.h",
68 "base/transportdescription.cc",
69 "base/transportdescription.h",
70 "base/transportdescriptionfactory.cc",
71 "base/transportdescriptionfactory.h",
72 "base/transportinfo.h",
73 "base/turnport.cc",
74 "base/turnport.h",
kjellanderc76dc952016-06-03 03:09:32 -070075 "base/udpport.h",
76 "client/basicportallocator.cc",
77 "client/basicportallocator.h",
78 "client/httpportallocator.cc",
79 "client/httpportallocator.h",
80 "client/socketmonitor.cc",
81 "client/socketmonitor.h",
82 ]
83
84 defines = [ "FEATURE_ENABLE_SSL" ]
85
86 deps = [
87 "../base:rtc_base",
88 "../libjingle/xmllite",
89 ]
90
91 if (rtc_build_expat) {
92 deps += [ "//third_party/expat" ]
93 public_deps = [
94 "//third_party/expat",
95 ]
96 }
97
kjellanderc76dc952016-06-03 03:09:32 -070098 public_configs = [
99 "..:common_inherited_config",
100 ":rtc_p2p_inherited_config",
101 ]
102
kjellander5023d412016-06-18 04:23:01 -0700103 if (build_with_chromium) {
104 if (is_nacl) {
105 deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
106 }
107 } else {
108 sources += [
109 "base/relayserver.cc",
110 "base/relayserver.h",
111 "base/stunserver.cc",
112 "base/stunserver.h",
113 "base/turnserver.cc",
114 "base/turnserver.h",
115 ]
kjellanderc76dc952016-06-03 03:09:32 -0700116 defines += [
117 "FEATURE_ENABLE_VOICEMAIL",
118 "FEATURE_ENABLE_PSTN",
119 ]
120
121 if (is_clang) {
122 # Suppress warnings from Chrome's Clang plugins.
123 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
ehmaldonado38a21322016-09-02 04:10:34 -0700124 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderc76dc952016-06-03 03:09:32 -0700125 }
126 }
127
128 if (rtc_use_quic) {
129 deps = [
130 "//third_party/libquic",
131 ]
132 sources += [
133 "quic/quicconnectionhelper.cc",
134 "quic/quicconnectionhelper.h",
135 "quic/quicsession.cc",
136 "quic/quicsession.h",
137 "quic/quictransport.cc",
138 "quic/quictransport.h",
139 "quic/quictransportchannel.cc",
140 "quic/quictransportchannel.h",
141 "quic/reliablequicstream.cc",
142 "quic/reliablequicstream.h",
143 ]
144 public_deps += [ "//third_party/libquic" ]
145 }
146}
147
ehmaldonado38a21322016-09-02 04:10:34 -0700148rtc_source_set("libstunprober") {
kjellanderc76dc952016-06-03 03:09:32 -0700149 sources = [
150 "stunprober/stunprober.cc",
151 ]
152
153 if (!build_with_chromium && is_clang) {
154 # Suppress warnings from Chrome's Clang plugins.
155 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
ehmaldonado38a21322016-09-02 04:10:34 -0700156 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderc76dc952016-06-03 03:09:32 -0700157 }
158
159 deps = [
160 "..:webrtc_common",
161 "../base:rtc_base",
162 ]
163}
wjywbs5a601d92016-08-31 14:03:52 -0700164
Per3f9dd7c2016-09-01 17:05:55 +0200165if (!build_with_chromium) {
166 # Doesn't build within Chrome on Win.
ehmaldonado38a21322016-09-02 04:10:34 -0700167 rtc_executable("stun_prober") {
Per3f9dd7c2016-09-01 17:05:55 +0200168 sources = [
169 "stunprober/main.cc",
170 ]
171
Per3f9dd7c2016-09-01 17:05:55 +0200172 if (!build_with_chromium && is_clang) {
173 # Suppress warnings from Chrome's Clang plugins.
174 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
ehmaldonado38a21322016-09-02 04:10:34 -0700175 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Per3f9dd7c2016-09-01 17:05:55 +0200176 }
177
178 deps = [
179 ":libstunprober",
180 ":rtc_p2p",
181 "../system_wrappers:field_trial_default",
182 ]
wjywbs5a601d92016-08-31 14:03:52 -0700183 }
wjywbs5a601d92016-08-31 14:03:52 -0700184}