Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: third_party/libjingle/BUILD.gn

Issue 2022833002: Migrate libjingle to WebRTC build targets. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « remoting/signaling/BUILD.gn ('k') | third_party/libjingle/libjingle.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/features.gni") 5 import("//build/config/features.gni")
6 6
7 # From third_party/libjingle/libjingle.gyp's target_defaults. 7 # From third_party/libjingle/libjingle.gyp's target_defaults.
8 config("jingle_unexported_configs") { 8 config("jingle_unexported_configs") {
9 defines = [
10 "EXPAT_RELATIVE_PATH",
11 "FEATURE_ENABLE_SSL",
12 "GTEST_RELATIVE_PATH",
13 "HAVE_OPENSSL_SSL_H",
14 "HAVE_SCTP",
15 "HAVE_SRTP",
16 "HAVE_WEBRTC_VIDEO",
17 "HAVE_WEBRTC_VOICE",
18 "LOGGING_INSIDE_WEBRTC",
19 "NO_MAIN_THREAD_WRAPPING",
20 "NO_SOUND_SYSTEM",
21 "SRTP_RELATIVE_PATH",
22 "SSL_USE_OPENSSL",
23 "USE_WEBRTC_DEV_BRANCH",
24 "ENABLE_EXTERNAL_AUTH",
25 "WEBRTC_CHROMIUM_BUILD",
26 ]
27
28 include_dirs = [ 9 include_dirs = [
29 "../../third_party/webrtc_overrides", 10 "../../third_party/webrtc_overrides",
30 "../../testing/gtest/include", 11 "../../testing/gtest/include",
31 "../../third_party", 12 "../../third_party",
32 "../../third_party/libyuv/include", 13 "../../third_party/libyuv/include",
33 "../../third_party/usrsctp/usrsctplib", 14 "../../third_party/usrsctp/usrsctplib",
34 ] 15 ]
35 } 16 }
36 17
37 # From third_party/libjingle/libjingle.gyp's target_defaults. 18 # From third_party/libjingle/libjingle.gyp's target_defaults.
38 config("jingle_public_configs") { 19 config("jingle_public_configs") {
39 include_dirs = [ 20 include_dirs = [
40 "../../third_party/webrtc_overrides", 21 "../../third_party/webrtc_overrides",
41 "../../testing/gtest/include", 22 "../../testing/gtest/include",
42 "../../third_party", 23 "../../third_party",
43 ] 24 ]
44 defines = [
45 "FEATURE_ENABLE_SSL",
46 "FEATURE_ENABLE_VOICEMAIL",
47 "EXPAT_RELATIVE_PATH",
48 "GTEST_RELATIVE_PATH",
49 "NO_MAIN_THREAD_WRAPPING",
50 "NO_SOUND_SYSTEM",
51 ]
52
53 if (is_linux) {
54 defines += [
55 "LINUX",
56 "WEBRTC_LINUX",
57 ]
58 }
59 if (is_mac) {
60 defines += [
61 "OSX",
62 "WEBRTC_MAC",
63 ]
64 }
65 if (is_ios) {
66 defines += [
67 "IOS",
68 "WEBRTC_MAC",
69 "WEBRTC_IOS",
70 ]
71 }
72 if (is_win) {
73 defines += [ "WEBRTC_WIN" ]
74 }
75 if (is_android) {
76 defines += [ "ANDROID" ]
77 }
78 if (is_posix) {
79 defines += [ "WEBRTC_POSIX" ]
80 }
81 if (is_chromeos) {
82 defines += [ "CHROMEOS" ]
83 }
84 } 25 }
85 26
86 # From third_party/libjingle/libjingle.gyp's target_defaults. 27 # From third_party/libjingle/libjingle.gyp's target_defaults.
87 group("jingle_deps") { 28 group("jingle_deps") {
88 public_deps = [ 29 public_deps = [
89 "//third_party/expat", 30 "//third_party/expat",
90 ] 31 ]
91 deps = [ 32 deps = [
92 "//base", 33 "//base",
93 "//crypto:platform", 34 "//crypto:platform",
94 "//net", 35 "//net",
95 ] 36 ]
96 } 37 }
97 38
98 # GYP version: third_party/libjingle.gyp:libjingle 39 # GYP version: third_party/libjingle.gyp:libjingle
99 static_library("libjingle") { 40 static_library("libjingle") {
100 p2p_dir = "../webrtc/p2p"
101 xmllite_dir = "../webrtc/libjingle/xmllite"
102 xmpp_dir = "../webrtc/libjingle/xmpp"
103 sources = [
104 # List from third_party/libjingle/libjingle_common.gypi
105 "$p2p_dir/base/asyncstuntcpsocket.cc",
106 "$p2p_dir/base/asyncstuntcpsocket.h",
107 "$p2p_dir/base/basicpacketsocketfactory.cc",
108 "$p2p_dir/base/basicpacketsocketfactory.h",
109 "$p2p_dir/base/candidate.h",
110 "$p2p_dir/base/common.h",
111 "$p2p_dir/base/dtlstransport.h",
112 "$p2p_dir/base/dtlstransportchannel.cc",
113 "$p2p_dir/base/dtlstransportchannel.h",
114 "$p2p_dir/base/p2pconstants.cc",
115 "$p2p_dir/base/p2pconstants.h",
116 "$p2p_dir/base/p2ptransport.cc",
117 "$p2p_dir/base/p2ptransport.h",
118 "$p2p_dir/base/p2ptransportchannel.cc",
119 "$p2p_dir/base/p2ptransportchannel.h",
120 "$p2p_dir/base/port.cc",
121 "$p2p_dir/base/port.h",
122 "$p2p_dir/base/portallocator.cc",
123 "$p2p_dir/base/portallocator.h",
124 "$p2p_dir/base/pseudotcp.cc",
125 "$p2p_dir/base/pseudotcp.h",
126 "$p2p_dir/base/relayport.cc",
127 "$p2p_dir/base/relayport.h",
128 "$p2p_dir/base/session.cc",
129 "$p2p_dir/base/session.h",
130 "$p2p_dir/base/sessiondescription.cc",
131 "$p2p_dir/base/sessiondescription.h",
132 "$p2p_dir/base/sessionid.h",
133 "$p2p_dir/base/stun.cc",
134 "$p2p_dir/base/stun.h",
135 "$p2p_dir/base/stunport.cc",
136 "$p2p_dir/base/stunport.h",
137 "$p2p_dir/base/stunrequest.cc",
138 "$p2p_dir/base/stunrequest.h",
139 "$p2p_dir/base/tcpport.cc",
140 "$p2p_dir/base/tcpport.h",
141 "$p2p_dir/base/transport.cc",
142 "$p2p_dir/base/transport.h",
143 "$p2p_dir/base/transportchannel.cc",
144 "$p2p_dir/base/transportchannel.h",
145 "$p2p_dir/base/transportchannelimpl.h",
146 "$p2p_dir/base/transportcontroller.cc",
147 "$p2p_dir/base/transportcontroller.h",
148 "$p2p_dir/base/transportdescription.cc",
149 "$p2p_dir/base/transportdescription.h",
150 "$p2p_dir/base/transportdescriptionfactory.cc",
151 "$p2p_dir/base/transportdescriptionfactory.h",
152 "$p2p_dir/base/turnport.cc",
153 "$p2p_dir/base/turnport.h",
154 "$p2p_dir/client/basicportallocator.cc",
155 "$p2p_dir/client/basicportallocator.h",
156 "$p2p_dir/client/httpportallocator.cc",
157 "$p2p_dir/client/httpportallocator.h",
158 "$p2p_dir/client/socketmonitor.cc",
159 "$p2p_dir/client/socketmonitor.h",
160 "$xmllite_dir/qname.cc",
161 "$xmllite_dir/qname.h",
162 "$xmllite_dir/xmlbuilder.cc",
163 "$xmllite_dir/xmlbuilder.h",
164 "$xmllite_dir/xmlconstants.cc",
165 "$xmllite_dir/xmlconstants.h",
166 "$xmllite_dir/xmlelement.cc",
167 "$xmllite_dir/xmlelement.h",
168 "$xmllite_dir/xmlnsstack.cc",
169 "$xmllite_dir/xmlnsstack.h",
170 "$xmllite_dir/xmlparser.cc",
171 "$xmllite_dir/xmlparser.h",
172 "$xmllite_dir/xmlprinter.cc",
173 "$xmllite_dir/xmlprinter.h",
174 "$xmpp_dir/asyncsocket.h",
175 "$xmpp_dir/constants.cc",
176 "$xmpp_dir/constants.h",
177 "$xmpp_dir/jid.cc",
178 "$xmpp_dir/jid.h",
179 "$xmpp_dir/plainsaslhandler.h",
180 "$xmpp_dir/prexmppauth.h",
181 "$xmpp_dir/saslcookiemechanism.h",
182 "$xmpp_dir/saslhandler.h",
183 "$xmpp_dir/saslmechanism.cc",
184 "$xmpp_dir/saslmechanism.h",
185 "$xmpp_dir/saslplainmechanism.h",
186 "$xmpp_dir/xmppclient.cc",
187 "$xmpp_dir/xmppclient.h",
188 "$xmpp_dir/xmppclientsettings.h",
189 "$xmpp_dir/xmppengine.h",
190 "$xmpp_dir/xmppengineimpl.cc",
191 "$xmpp_dir/xmppengineimpl.h",
192 "$xmpp_dir/xmppengineimpl_iq.cc",
193 "$xmpp_dir/xmpplogintask.cc",
194 "$xmpp_dir/xmpplogintask.h",
195 "$xmpp_dir/xmppstanzaparser.cc",
196 "$xmpp_dir/xmppstanzaparser.h",
197 "$xmpp_dir/xmpptask.cc",
198 "$xmpp_dir/xmpptask.h",
199 ]
200
201 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 41 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
202 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] 42 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
203 43
204 public_deps = [ 44 public_deps = [
205 ":jingle_deps", 45 ":jingle_deps",
46
47 # TODO(kjellander): Start cleaning up this target as soon as
48 # https://codereview.chromium.org/2022833002/ is landed. The target should
49 # be removed entirely if possible.
50 "//third_party/webrtc/base:rtc_base",
206 ] 51 ]
207 deps = [ 52 deps = [
208 "//third_party/webrtc/base:rtc_base", 53 "//third_party/webrtc/p2p:rtc_p2p",
209 ] 54 ]
210 55
211 # From libjingle_common.gypi's conditions list. 56 # From libjingle_common.gypi's conditions list.
212 if (is_win) { 57 if (is_win) {
213 cflags = [ "/wd4005" ] 58 cflags = [ "/wd4005" ]
214 } 59 }
215 60
216 if (is_nacl) { 61 if (is_nacl) {
217 # For NACL, we have to add a default implementation for field_trail. 62 # For NACL, we have to add a default implementation for field_trail.
218 deps += [ 63 deps += [
219 "//native_client_sdk/src/libraries/nacl_io", 64 "//native_client_sdk/src/libraries/nacl_io",
220 "//third_party/webrtc/system_wrappers:field_trial_default", 65 "//third_party/webrtc/system_wrappers:field_trial_default",
221 ] 66 ]
222 } else { 67 } else {
223 # Otherwise, we just add the field_trial which redirects to base. 68 # Otherwise, we just add the field_trial which redirects to base.
224 sources += [ "../webrtc_overrides/field_trial.cc" ] 69 sources = [
70 "../webrtc_overrides/field_trial.cc",
71 ]
225 } 72 }
226 73
227 configs += [ ":jingle_unexported_configs" ] 74 configs += [
228 public_configs = [ ":jingle_public_configs" ] 75 ":jingle_unexported_configs",
76 "//third_party/webrtc:common_config",
77 ]
78 public_configs = [
79 ":jingle_public_configs",
80 "//third_party/webrtc:common_inherited_config",
81 ]
229 } 82 }
230 83
231 if (enable_webrtc) { 84 if (enable_webrtc) {
232 # TODO(kjellander): Move this target into //third_party/webrtc_overrides as 85 # TODO(kjellander): Move this target into //third_party/webrtc_overrides as
233 # soon as the work in bugs.webrtc.org/4256 has gotten rid of the duplicated 86 # soon as the work in bugs.webrtc.org/4256 has gotten rid of the duplicated
234 # source listings above. 87 # source listings above.
235 static_library("libjingle_webrtc") { 88 static_library("libjingle_webrtc") {
236 sources = [ 89 sources = [
237 "../webrtc_overrides/init_webrtc.cc", 90 "../webrtc_overrides/init_webrtc.cc",
238 "../webrtc_overrides/init_webrtc.h", 91 "../webrtc_overrides/init_webrtc.h",
239 ] 92 ]
240 configs += [ ":jingle_unexported_configs" ] 93 configs += [
241 public_configs = [ ":jingle_public_configs" ] 94 ":jingle_unexported_configs",
95 "//third_party/webrtc:common_config",
96 ]
97 public_configs = [
98 ":jingle_public_configs",
99 "//third_party/webrtc:common_inherited_config",
100 ]
242 public_deps = [ 101 public_deps = [
243 ":libjingle_webrtc_common", 102 ":libjingle_webrtc_common",
244 ] 103 ]
245 } 104 }
246 105
247 static_library("libjingle_webrtc_common") { 106 source_set("libjingle_webrtc_common") {
248 sources = [ 107 configs += [
249 "../webrtc/api/audiotrack.cc", 108 ":jingle_unexported_configs",
250 "../webrtc/api/audiotrack.h", 109 "//third_party/webrtc:common_config",
251 "../webrtc/api/datachannel.cc",
252 "../webrtc/api/datachannel.h",
253 "../webrtc/api/dtmfsender.cc",
254 "../webrtc/api/dtmfsender.h",
255 "../webrtc/api/jsep.h",
256 "../webrtc/api/jsepicecandidate.cc",
257 "../webrtc/api/jsepicecandidate.h",
258 "../webrtc/api/jsepsessiondescription.cc",
259 "../webrtc/api/jsepsessiondescription.h",
260 "../webrtc/api/localaudiosource.cc",
261 "../webrtc/api/localaudiosource.h",
262 "../webrtc/api/mediaconstraintsinterface.cc",
263 "../webrtc/api/mediaconstraintsinterface.h",
264 "../webrtc/api/mediacontroller.cc",
265 "../webrtc/api/mediacontroller.h",
266 "../webrtc/api/mediastream.cc",
267 "../webrtc/api/mediastream.h",
268 "../webrtc/api/mediastreaminterface.h",
269 "../webrtc/api/mediastreamobserver.cc",
270 "../webrtc/api/mediastreamobserver.h",
271 "../webrtc/api/mediastreamprovider.h",
272 "../webrtc/api/mediastreamproxy.h",
273 "../webrtc/api/mediastreamtrack.h",
274 "../webrtc/api/mediastreamtrackproxy.h",
275 "../webrtc/api/notifier.h",
276 "../webrtc/api/peerconnection.cc",
277 "../webrtc/api/peerconnection.h",
278 "../webrtc/api/peerconnectionfactory.cc",
279 "../webrtc/api/peerconnectionfactory.h",
280 "../webrtc/api/peerconnectioninterface.h",
281 "../webrtc/api/remoteaudiosource.cc",
282 "../webrtc/api/remoteaudiosource.h",
283 "../webrtc/api/rtpreceiver.cc",
284 "../webrtc/api/rtpreceiver.h",
285 "../webrtc/api/rtpreceiverinterface.h",
286 "../webrtc/api/rtpsender.cc",
287 "../webrtc/api/rtpsender.h",
288 "../webrtc/api/rtpsenderinterface.h",
289 "../webrtc/api/sctputils.cc",
290 "../webrtc/api/sctputils.h",
291 "../webrtc/api/statscollector.cc",
292 "../webrtc/api/statscollector.h",
293 "../webrtc/api/statstypes.cc",
294 "../webrtc/api/statstypes.h",
295 "../webrtc/api/streamcollection.h",
296 "../webrtc/api/umametrics.h",
297 "../webrtc/api/videocapturertracksource.cc",
298 "../webrtc/api/videocapturertracksource.h",
299 "../webrtc/api/videosourceproxy.h",
300 "../webrtc/api/videotrack.cc",
301 "../webrtc/api/videotrack.h",
302 "../webrtc/api/videotracksource.cc",
303 "../webrtc/api/videotracksource.h",
304 "../webrtc/api/webrtcsdp.cc",
305 "../webrtc/api/webrtcsdp.h",
306 "../webrtc/api/webrtcsession.cc",
307 "../webrtc/api/webrtcsession.h",
308 "../webrtc/api/webrtcsessiondescriptionfactory.cc",
309 "../webrtc/api/webrtcsessiondescriptionfactory.h",
310 "../webrtc/media/base/codec.cc",
311 "../webrtc/media/base/codec.h",
312 "../webrtc/media/base/cryptoparams.h",
313 "../webrtc/media/base/hybriddataengine.h",
314 "../webrtc/media/base/mediachannel.h",
315 "../webrtc/media/base/mediaconstants.cc",
316 "../webrtc/media/base/mediaconstants.h",
317 "../webrtc/media/base/mediaengine.cc",
318 "../webrtc/media/base/mediaengine.h",
319 "../webrtc/media/base/rtpdataengine.cc",
320 "../webrtc/media/base/rtpdataengine.h",
321 "../webrtc/media/base/rtpdump.cc",
322 "../webrtc/media/base/rtpdump.h",
323 "../webrtc/media/base/rtputils.cc",
324 "../webrtc/media/base/rtputils.h",
325 "../webrtc/media/base/streamparams.cc",
326 "../webrtc/media/base/streamparams.h",
327 "../webrtc/media/base/turnutils.cc",
328 "../webrtc/media/base/turnutils.h",
329 "../webrtc/media/base/videoadapter.cc",
330 "../webrtc/media/base/videoadapter.h",
331 "../webrtc/media/base/videobroadcaster.cc",
332 "../webrtc/media/base/videobroadcaster.h",
333 "../webrtc/media/base/videocapturer.cc",
334 "../webrtc/media/base/videocapturer.h",
335 "../webrtc/media/base/videocommon.cc",
336 "../webrtc/media/base/videocommon.h",
337 "../webrtc/media/base/videoframe.cc",
338 "../webrtc/media/base/videoframe.h",
339 "../webrtc/media/base/videoframefactory.cc",
340 "../webrtc/media/base/videoframefactory.h",
341 "../webrtc/media/base/videosourcebase.cc",
342 "../webrtc/media/base/videosourcebase.h",
343 "../webrtc/media/engine/simulcast.cc",
344 "../webrtc/media/engine/simulcast.h",
345 "../webrtc/media/engine/webrtccommon.h",
346 "../webrtc/media/engine/webrtcmediaengine.cc",
347 "../webrtc/media/engine/webrtcmediaengine.h",
348 "../webrtc/media/engine/webrtcvideoengine2.cc",
349 "../webrtc/media/engine/webrtcvideoengine2.h",
350 "../webrtc/media/engine/webrtcvideoframe.cc",
351 "../webrtc/media/engine/webrtcvideoframe.h",
352 "../webrtc/media/engine/webrtcvideoframefactory.cc",
353 "../webrtc/media/engine/webrtcvideoframefactory.h",
354 "../webrtc/media/engine/webrtcvoe.h",
355 "../webrtc/media/engine/webrtcvoiceengine.cc",
356 "../webrtc/media/engine/webrtcvoiceengine.h",
357 "../webrtc/media/sctp/sctpdataengine.cc",
358 "../webrtc/media/sctp/sctpdataengine.h",
359 "../webrtc/pc/audiomonitor.cc",
360 "../webrtc/pc/audiomonitor.h",
361 "../webrtc/pc/bundlefilter.cc",
362 "../webrtc/pc/bundlefilter.h",
363 "../webrtc/pc/channel.cc",
364 "../webrtc/pc/channel.h",
365 "../webrtc/pc/channelmanager.cc",
366 "../webrtc/pc/channelmanager.h",
367 "../webrtc/pc/currentspeakermonitor.cc",
368 "../webrtc/pc/currentspeakermonitor.h",
369 "../webrtc/pc/externalhmac.cc",
370 "../webrtc/pc/externalhmac.h",
371 "../webrtc/pc/mediamonitor.cc",
372 "../webrtc/pc/mediamonitor.h",
373 "../webrtc/pc/mediasession.cc",
374 "../webrtc/pc/mediasession.h",
375 "../webrtc/pc/mediasink.h",
376 "../webrtc/pc/rtcpmuxfilter.cc",
377 "../webrtc/pc/rtcpmuxfilter.h",
378 "../webrtc/pc/srtpfilter.cc",
379 "../webrtc/pc/srtpfilter.h",
380 "../webrtc/pc/voicechannel.h",
381 ] 110 ]
382 111 public_configs = [
383 configs -= [ "//build/config/compiler:chromium_code" ] 112 ":jingle_public_configs",
384 configs += [ "//build/config/compiler:no_chromium_code" ] 113 "//third_party/webrtc:common_inherited_config",
385 114 ]
386 configs += [ ":jingle_unexported_configs" ]
387 public_configs = [ ":jingle_public_configs" ]
388 115
389 deps = [ 116 deps = [
390 ":libjingle", 117 ":libjingle",
391 "//third_party/libsrtp", 118 "//third_party/libsrtp",
392 "//third_party/usrsctp", 119 "//third_party/usrsctp",
393 "//third_party/webrtc", 120 "//third_party/webrtc",
121 "//third_party/webrtc/api:libjingle_peerconnection",
122 "//third_party/webrtc/media:rtc_media",
394 "//third_party/webrtc/modules/media_file", 123 "//third_party/webrtc/modules/media_file",
395 "//third_party/webrtc/modules/video_capture", 124 "//third_party/webrtc/modules/video_capture",
125 "//third_party/webrtc/pc:rtc_pc",
396 "//third_party/webrtc/system_wrappers", 126 "//third_party/webrtc/system_wrappers",
397 "//third_party/webrtc/voice_engine", 127 "//third_party/webrtc/voice_engine",
398 ] 128 ]
399 } 129 }
400 130
401 static_library("libstunprober") { 131 static_library("libstunprober") {
402 p2p_dir = "../webrtc/p2p" 132 p2p_dir = "../webrtc/p2p"
403 sources = [ 133 sources = [
404 "$p2p_dir/stunprober/stunprober.cc", 134 "$p2p_dir/stunprober/stunprober.cc",
405 ] 135 ]
406 136
407 deps = [ 137 deps = [
408 ":libjingle_webrtc_common", 138 ":libjingle_webrtc_common",
409 "//third_party/webrtc/base:rtc_base", 139 "//third_party/webrtc/base:rtc_base",
410 ] 140 ]
411 } 141 }
412 } # enable_webrtc 142 } # enable_webrtc
OLDNEW
« no previous file with comments | « remoting/signaling/BUILD.gn ('k') | third_party/libjingle/libjingle.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698