blob: bf9843a2e4b6cb0cbea9219bb17a669b97faeb90 [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
ehmaldonadoe9cc6862016-09-05 06:10:18 -070098 public_configs = [ ":rtc_p2p_inherited_config" ]
kjellanderc76dc952016-06-03 03:09:32 -070099
kjellander5023d412016-06-18 04:23:01 -0700100 if (build_with_chromium) {
101 if (is_nacl) {
102 deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
103 }
104 } else {
105 sources += [
106 "base/relayserver.cc",
107 "base/relayserver.h",
108 "base/stunserver.cc",
109 "base/stunserver.h",
110 "base/turnserver.cc",
111 "base/turnserver.h",
112 ]
kjellanderc76dc952016-06-03 03:09:32 -0700113 defines += [
114 "FEATURE_ENABLE_VOICEMAIL",
115 "FEATURE_ENABLE_PSTN",
116 ]
117
118 if (is_clang) {
119 # Suppress warnings from Chrome's Clang plugins.
120 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
ehmaldonado38a21322016-09-02 04:10:34 -0700121 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderc76dc952016-06-03 03:09:32 -0700122 }
123 }
124
125 if (rtc_use_quic) {
126 deps = [
127 "//third_party/libquic",
128 ]
129 sources += [
130 "quic/quicconnectionhelper.cc",
131 "quic/quicconnectionhelper.h",
132 "quic/quicsession.cc",
133 "quic/quicsession.h",
134 "quic/quictransport.cc",
135 "quic/quictransport.h",
136 "quic/quictransportchannel.cc",
137 "quic/quictransportchannel.h",
138 "quic/reliablequicstream.cc",
139 "quic/reliablequicstream.h",
140 ]
141 public_deps += [ "//third_party/libquic" ]
142 }
143}
144
ehmaldonado38a21322016-09-02 04:10:34 -0700145rtc_source_set("libstunprober") {
kjellanderc76dc952016-06-03 03:09:32 -0700146 sources = [
147 "stunprober/stunprober.cc",
148 ]
149
150 if (!build_with_chromium && is_clang) {
151 # Suppress warnings from Chrome's Clang plugins.
152 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
ehmaldonado38a21322016-09-02 04:10:34 -0700153 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderc76dc952016-06-03 03:09:32 -0700154 }
155
156 deps = [
157 "..:webrtc_common",
158 "../base:rtc_base",
159 ]
160}
wjywbs5a601d92016-08-31 14:03:52 -0700161
Per3f9dd7c2016-09-01 17:05:55 +0200162if (!build_with_chromium) {
163 # Doesn't build within Chrome on Win.
ehmaldonado38a21322016-09-02 04:10:34 -0700164 rtc_executable("stun_prober") {
Per3f9dd7c2016-09-01 17:05:55 +0200165 sources = [
166 "stunprober/main.cc",
167 ]
168
Per3f9dd7c2016-09-01 17:05:55 +0200169 if (!build_with_chromium && is_clang) {
170 # Suppress warnings from Chrome's Clang plugins.
171 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
ehmaldonado38a21322016-09-02 04:10:34 -0700172 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Per3f9dd7c2016-09-01 17:05:55 +0200173 }
174
175 deps = [
176 ":libstunprober",
177 ":rtc_p2p",
178 "../system_wrappers:field_trial_default",
179 ]
wjywbs5a601d92016-08-31 14:03:52 -0700180 }
wjywbs5a601d92016-08-31 14:03:52 -0700181}