blob: 1b352f47bf8b0e598c75d9f0fdb068da19bad68f [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") {
kjellander705ecc52016-09-15 00:53:26 -070012 public_deps = [
kjellanderc76dc952016-06-03 03:09:32 -070013 ":rtc_p2p",
14 ]
15}
16
17config("rtc_p2p_inherited_config") {
18 defines = [ "FEATURE_ENABLE_VOICEMAIL" ]
19}
20
kjellanderb62dbbe2016-09-23 00:38:52 -070021rtc_static_library("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",
kjellanderc76dc952016-06-03 03:09:32 -070052 "base/stun.cc",
53 "base/stun.h",
54 "base/stunport.cc",
55 "base/stunport.h",
56 "base/stunrequest.cc",
57 "base/stunrequest.h",
kjellanderc76dc952016-06-03 03:09:32 -070058 "base/tcpport.cc",
59 "base/tcpport.h",
60 "base/transport.cc",
61 "base/transport.h",
62 "base/transportchannel.cc",
63 "base/transportchannel.h",
64 "base/transportchannelimpl.h",
65 "base/transportcontroller.cc",
66 "base/transportcontroller.h",
67 "base/transportdescription.cc",
68 "base/transportdescription.h",
69 "base/transportdescriptionfactory.cc",
70 "base/transportdescriptionfactory.h",
71 "base/transportinfo.h",
72 "base/turnport.cc",
73 "base/turnport.h",
kjellanderc76dc952016-06-03 03:09:32 -070074 "base/udpport.h",
75 "client/basicportallocator.cc",
76 "client/basicportallocator.h",
kjellanderc76dc952016-06-03 03:09:32 -070077 "client/socketmonitor.cc",
78 "client/socketmonitor.h",
79 ]
80
81 defines = [ "FEATURE_ENABLE_SSL" ]
82
83 deps = [
84 "../base:rtc_base",
85 "../libjingle/xmllite",
86 ]
87
88 if (rtc_build_expat) {
89 deps += [ "//third_party/expat" ]
90 public_deps = [
91 "//third_party/expat",
92 ]
93 }
94
ehmaldonadoe9cc6862016-09-05 06:10:18 -070095 public_configs = [ ":rtc_p2p_inherited_config" ]
kjellanderc76dc952016-06-03 03:09:32 -070096
kjellander5023d412016-06-18 04:23:01 -070097 if (build_with_chromium) {
98 if (is_nacl) {
99 deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
100 }
101 } else {
102 sources += [
103 "base/relayserver.cc",
104 "base/relayserver.h",
105 "base/stunserver.cc",
106 "base/stunserver.h",
107 "base/turnserver.cc",
108 "base/turnserver.h",
109 ]
kjellanderc76dc952016-06-03 03:09:32 -0700110 defines += [
111 "FEATURE_ENABLE_VOICEMAIL",
112 "FEATURE_ENABLE_PSTN",
113 ]
114
kjellandere40a7ee2016-10-16 23:56:12 -0700115 if (!build_with_chromium && is_clang) {
116 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700117 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderc76dc952016-06-03 03:09:32 -0700118 }
119 }
120
121 if (rtc_use_quic) {
122 deps = [
123 "//third_party/libquic",
124 ]
125 sources += [
126 "quic/quicconnectionhelper.cc",
127 "quic/quicconnectionhelper.h",
128 "quic/quicsession.cc",
129 "quic/quicsession.h",
130 "quic/quictransport.cc",
131 "quic/quictransport.h",
132 "quic/quictransportchannel.cc",
133 "quic/quictransportchannel.h",
134 "quic/reliablequicstream.cc",
135 "quic/reliablequicstream.h",
136 ]
137 public_deps += [ "//third_party/libquic" ]
138 }
139}
140
kjellanderb62dbbe2016-09-23 00:38:52 -0700141rtc_static_library("libstunprober") {
kjellanderc76dc952016-06-03 03:09:32 -0700142 sources = [
143 "stunprober/stunprober.cc",
144 ]
145
146 if (!build_with_chromium && is_clang) {
147 # Suppress warnings from Chrome's Clang plugins.
148 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
ehmaldonado38a21322016-09-02 04:10:34 -0700149 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderc76dc952016-06-03 03:09:32 -0700150 }
151
152 deps = [
153 "..:webrtc_common",
154 "../base:rtc_base",
155 ]
156}
wjywbs5a601d92016-08-31 14:03:52 -0700157
Per3f9dd7c2016-09-01 17:05:55 +0200158if (!build_with_chromium) {
159 # Doesn't build within Chrome on Win.
ehmaldonado38a21322016-09-02 04:10:34 -0700160 rtc_executable("stun_prober") {
Per3f9dd7c2016-09-01 17:05:55 +0200161 sources = [
162 "stunprober/main.cc",
163 ]
164
Per3f9dd7c2016-09-01 17:05:55 +0200165 if (!build_with_chromium && is_clang) {
166 # Suppress warnings from Chrome's Clang plugins.
167 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
ehmaldonado38a21322016-09-02 04:10:34 -0700168 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Per3f9dd7c2016-09-01 17:05:55 +0200169 }
170
171 deps = [
172 ":libstunprober",
173 ":rtc_p2p",
174 "../system_wrappers:field_trial_default",
175 ]
wjywbs5a601d92016-08-31 14:03:52 -0700176 }
wjywbs5a601d92016-08-31 14:03:52 -0700177}