Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 import("//build/config/crypto.gni") | |
| 6 | |
| 7 # From third_party/libjingle/libjingle.gyp's target_defaults. | |
| 8 config("jingle_unexported_configs") { | |
| 9 defines = [ | |
| 10 "EXPAT_RELATIVE_PATH", | |
| 11 "FEATURE_ENABLE_SSL", | |
| 12 "GTEST_RELATIVE_PATH", | |
| 13 "HAVE_SRTP", | |
| 14 "HAVE_WEBRTC_VIDEO", | |
| 15 "HAVE_WEBRTC_VOICE", | |
| 16 "LOGGING_INSIDE_WEBRTC", | |
| 17 "NO_MAIN_THREAD_WRAPPING", | |
| 18 "NO_SOUND_SYSTEM", | |
| 19 "SRTP_RELATIVE_PATH", | |
| 20 "USE_WEBRTC_DEV_BRANCH", | |
| 21 "ENABLE_EXTERNAL_AUTH", | |
| 22 ] | |
| 23 | |
| 24 include_dirs = [ | |
| 25 "overrides", | |
| 26 "../../third_party/webrtc/overrides", | |
| 27 "source", | |
| 28 "../../testing/gtest/include", | |
| 29 "../../third_party", | |
| 30 "../../third_party/libyuv/include", | |
| 31 "../../third_party/usrsctp", | |
| 32 ] | |
| 33 | |
| 34 # Assumes libpeer is linked statically. | |
| 35 defines += [ "LIBPEERCONNECTION_LIB=1" ] | |
| 36 | |
| 37 if (is_win && cpu_arch == "x86") { | |
| 38 defines += [ "_USE_32BIT_TIME_T" ] | |
| 39 } | |
| 40 | |
| 41 if (use_openssl) { | |
| 42 defines += [ | |
| 43 "SSL_USE_OPENSSL", | |
| 44 "HAVE_OPENSSL_SSL_H", | |
| 45 ] | |
| 46 } else { | |
| 47 defines += [ | |
| 48 "SSL_USE_NSS", | |
| 49 "HAVE_NSS_SSL_H", | |
| 50 "SSL_USE_NSS_RNG", | |
| 51 ] | |
| 52 } | |
| 53 | |
| 54 } | |
| 55 | |
| 56 # From third_party/libjingle/libjingle.gyp's target_defaults. | |
| 57 config("jingle_direct_dependent_configs") { | |
| 58 include_dirs = [ | |
| 59 "../../third_party/webrtc/overrides", | |
| 60 "overrides", | |
| 61 "source", | |
| 62 "../../testing/gtest/include", | |
| 63 "../../third_party", | |
| 64 ] | |
| 65 defines = [ | |
| 66 "FEATURE_ENABLE_SSL", | |
| 67 "FEATURE_ENABLE_VOICEMAIL", | |
| 68 "EXPAT_RELATIVE_PATH", | |
| 69 "GTEST_RELATIVE_PATH", | |
| 70 "NO_MAIN_THREAD_WRAPPING", | |
| 71 "NO_SOUND_SYSTEM", | |
| 72 ] | |
| 73 # TODO(GYP): Port is_win blocks. | |
| 74 if (is_linux) { | |
| 75 defines += [ "LINUX", "WEBRTC_LINUX" ] | |
| 76 } | |
| 77 if (is_mac) { | |
| 78 defines += [ "OSX", "WEBRTC_MAC" ] | |
| 79 } | |
| 80 if (is_ios) { | |
| 81 defines += [ "IOS", "WEBRTC_MAC", "WEBRTC_IOS" ] | |
| 82 } | |
| 83 if (is_win) { | |
| 84 defines += [ "WEBRTC_WIN" ] | |
| 85 } | |
| 86 if (is_android) { | |
| 87 defines += [ "ANDROID" ] | |
| 88 } | |
| 89 if (is_posix) { | |
| 90 defines += [ "POSIX", "WEBRTC_POSIX" ] | |
| 91 } | |
| 92 # TODO(GYP): Support these in GN. | |
| 93 # if (is_bsd) { | |
| 94 # defines += [ "BSD" ] | |
| 95 # } | |
| 96 # if (is_openbsd) { | |
| 97 # defines += [ "OPENBSD" ] | |
| 98 # } | |
| 99 # if (is_freebsd) { | |
| 100 # defines += [ "FREEBSD" ] | |
| 101 # } | |
| 102 if (is_chromeos) { | |
| 103 defines += [ "CHROMEOS" ] | |
| 104 } | |
| 105 } | |
| 106 | |
| 107 # From third_party/libjingle/libjingle.gyp's target_defaults. | |
| 108 config("jingle_all_dependent_configs") { | |
| 109 if (is_debug) { | |
| 110 # TODO(sergeyu): Fix libjingle to use NDEBUG instead of | |
| 111 # _DEBUG and remove this define. See GYP file as well. | |
| 112 defines = [ "_DEBUG" ] | |
| 113 } | |
| 114 } | |
| 115 | |
| 116 # From third_party/libjingle/libjingle.gyp's target_defaults. | |
| 117 group("jingle_deps") { | |
| 118 deps = [ | |
| 119 "//base", | |
| 120 "//net", | |
| 121 "//third_party/expat", | |
| 122 "//crypto:platform", | |
| 123 ] | |
| 124 forward_dependent_configs_from = [ | |
| 125 "//third_party/expat", | |
| 126 ] | |
| 127 } | |
| 128 | |
| 129 # GYP version: third_party/libjingle.gyp:libjingle | |
| 130 static_library("libjingle") { | |
| 131 sources = [ | |
| 132 # List from third_party/libjingle/libjingle_common.gypi | |
| 133 "source/talk/p2p/base/asyncstuntcpsocket.cc", | |
| 134 "source/talk/p2p/base/asyncstuntcpsocket.h", | |
| 135 "source/talk/p2p/base/basicpacketsocketfactory.cc", | |
| 136 "source/talk/p2p/base/basicpacketsocketfactory.h", | |
| 137 "source/talk/p2p/base/candidate.h", | |
| 138 "source/talk/p2p/base/common.h", | |
| 139 "source/talk/p2p/base/constants.cc", | |
| 140 "source/talk/p2p/base/constants.h", | |
| 141 "source/talk/p2p/base/dtlstransport.h", | |
| 142 "source/talk/p2p/base/dtlstransportchannel.cc", | |
| 143 "source/talk/p2p/base/dtlstransportchannel.h", | |
| 144 "source/talk/p2p/base/p2ptransport.cc", | |
| 145 "source/talk/p2p/base/p2ptransport.h", | |
| 146 "source/talk/p2p/base/p2ptransportchannel.cc", | |
| 147 "source/talk/p2p/base/p2ptransportchannel.h", | |
| 148 "source/talk/p2p/base/parsing.cc", | |
| 149 "source/talk/p2p/base/parsing.h", | |
| 150 "source/talk/p2p/base/port.cc", | |
| 151 "source/talk/p2p/base/port.h", | |
| 152 "source/talk/p2p/base/portallocator.cc", | |
| 153 "source/talk/p2p/base/portallocator.h", | |
| 154 "source/talk/p2p/base/portallocatorsessionproxy.cc", | |
| 155 "source/talk/p2p/base/portallocatorsessionproxy.h", | |
| 156 "source/talk/p2p/base/portproxy.cc", | |
| 157 "source/talk/p2p/base/portproxy.h", | |
| 158 "source/talk/p2p/base/pseudotcp.cc", | |
| 159 "source/talk/p2p/base/pseudotcp.h", | |
| 160 "source/talk/p2p/base/rawtransport.cc", | |
| 161 "source/talk/p2p/base/rawtransport.h", | |
| 162 "source/talk/p2p/base/rawtransportchannel.cc", | |
| 163 "source/talk/p2p/base/rawtransportchannel.h", | |
| 164 "source/talk/p2p/base/relayport.cc", | |
| 165 "source/talk/p2p/base/relayport.h", | |
| 166 "source/talk/p2p/base/session.cc", | |
| 167 "source/talk/p2p/base/session.h", | |
| 168 "source/talk/p2p/base/sessionclient.h", | |
| 169 "source/talk/p2p/base/sessiondescription.cc", | |
| 170 "source/talk/p2p/base/sessiondescription.h", | |
| 171 "source/talk/p2p/base/sessionid.h", | |
| 172 "source/talk/p2p/base/sessionmanager.cc", | |
| 173 "source/talk/p2p/base/sessionmanager.h", | |
| 174 "source/talk/p2p/base/sessionmessages.cc", | |
| 175 "source/talk/p2p/base/sessionmessages.h", | |
| 176 "source/talk/p2p/base/stun.cc", | |
| 177 "source/talk/p2p/base/stun.h", | |
| 178 "source/talk/p2p/base/stunport.cc", | |
| 179 "source/talk/p2p/base/stunport.h", | |
| 180 "source/talk/p2p/base/stunrequest.cc", | |
| 181 "source/talk/p2p/base/stunrequest.h", | |
| 182 "source/talk/p2p/base/tcpport.cc", | |
| 183 "source/talk/p2p/base/tcpport.h", | |
| 184 "source/talk/p2p/base/transport.cc", | |
| 185 "source/talk/p2p/base/transport.h", | |
| 186 "source/talk/p2p/base/transportchannel.cc", | |
| 187 "source/talk/p2p/base/transportchannel.h", | |
| 188 "source/talk/p2p/base/transportchannelimpl.h", | |
| 189 "source/talk/p2p/base/transportchannelproxy.cc", | |
| 190 "source/talk/p2p/base/transportchannelproxy.h", | |
| 191 "source/talk/p2p/base/transportdescription.cc", | |
| 192 "source/talk/p2p/base/transportdescription.h", | |
| 193 "source/talk/p2p/base/transportdescriptionfactory.cc", | |
| 194 "source/talk/p2p/base/transportdescriptionfactory.h", | |
| 195 "source/talk/p2p/base/turnport.cc", | |
| 196 "source/talk/p2p/base/turnport.h", | |
| 197 "source/talk/p2p/client/basicportallocator.cc", | |
| 198 "source/talk/p2p/client/basicportallocator.h", | |
| 199 "source/talk/p2p/client/httpportallocator.cc", | |
| 200 "source/talk/p2p/client/httpportallocator.h", | |
| 201 "source/talk/p2p/client/sessionmanagertask.h", | |
| 202 "source/talk/p2p/client/sessionsendtask.h", | |
| 203 "source/talk/p2p/client/socketmonitor.cc", | |
| 204 "source/talk/p2p/client/socketmonitor.h", | |
| 205 "source/talk/xmllite/qname.cc", | |
| 206 "source/talk/xmllite/qname.h", | |
| 207 "source/talk/xmllite/xmlbuilder.cc", | |
| 208 "source/talk/xmllite/xmlbuilder.h", | |
| 209 "source/talk/xmllite/xmlconstants.cc", | |
| 210 "source/talk/xmllite/xmlconstants.h", | |
| 211 "source/talk/xmllite/xmlelement.cc", | |
| 212 "source/talk/xmllite/xmlelement.h", | |
| 213 "source/talk/xmllite/xmlnsstack.cc", | |
| 214 "source/talk/xmllite/xmlnsstack.h", | |
| 215 "source/talk/xmllite/xmlparser.cc", | |
| 216 "source/talk/xmllite/xmlparser.h", | |
| 217 "source/talk/xmllite/xmlprinter.cc", | |
| 218 "source/talk/xmllite/xmlprinter.h", | |
| 219 "source/talk/xmpp/asyncsocket.h", | |
| 220 "source/talk/xmpp/constants.cc", | |
| 221 "source/talk/xmpp/constants.h", | |
| 222 "source/talk/xmpp/jid.cc", | |
| 223 "source/talk/xmpp/jid.h", | |
| 224 "source/talk/xmpp/plainsaslhandler.h", | |
| 225 "source/talk/xmpp/prexmppauth.h", | |
| 226 "source/talk/xmpp/saslcookiemechanism.h", | |
| 227 "source/talk/xmpp/saslhandler.h", | |
| 228 "source/talk/xmpp/saslmechanism.cc", | |
| 229 "source/talk/xmpp/saslmechanism.h", | |
| 230 "source/talk/xmpp/saslplainmechanism.h", | |
| 231 "source/talk/xmpp/xmppclient.cc", | |
| 232 "source/talk/xmpp/xmppclient.h", | |
| 233 "source/talk/xmpp/xmppclientsettings.h", | |
| 234 "source/talk/xmpp/xmppengine.h", | |
| 235 "source/talk/xmpp/xmppengineimpl.cc", | |
| 236 "source/talk/xmpp/xmppengineimpl.h", | |
| 237 "source/talk/xmpp/xmppengineimpl_iq.cc", | |
| 238 "source/talk/xmpp/xmpplogintask.cc", | |
| 239 "source/talk/xmpp/xmpplogintask.h", | |
| 240 "source/talk/xmpp/xmppstanzaparser.cc", | |
| 241 "source/talk/xmpp/xmppstanzaparser.h", | |
| 242 "source/talk/xmpp/xmpptask.cc", | |
| 243 "source/talk/xmpp/xmpptask.h", | |
| 244 ] | |
| 245 sources -= [ | |
| 246 # Compiled as part of libjingle_p2p_constants. | |
| 247 "source/talk/p2p/base/constants.cc", | |
| 248 "source/talk/p2p/base/constants.h", | |
| 249 ] | |
| 250 deps = [ | |
| 251 # TODO(GYP): Uncomment when WebRTC GN build has settled. | |
| 252 # "//third_party/webrtc/base:webrtc_base", | |
| 253 ":libjingle_p2p_constants", | |
| 254 ":jingle_deps" | |
| 255 ] | |
| 256 | |
| 257 # From libjingle_common.gypi's conditions list. | |
| 258 if (is_win && !nacl_untrusted_build) { | |
| 259 cflags += [ "/wd4005", "\wd4267" ] | |
| 260 } | |
| 261 | |
| 262 forward_dependent_configs_from = [ | |
| 263 ":jingle_deps" | |
| 264 ] | |
| 265 configs += [ | |
| 266 ":jingle_unexported_configs" | |
| 267 ] | |
| 268 direct_dependent_configs = [ | |
| 269 ":jingle_direct_dependent_configs", | |
| 270 ] | |
| 271 all_dependent_configs = [ | |
| 272 ":jingle_all_dependent_configs", | |
| 273 ] | |
| 274 } | |
| 275 | |
| 276 # This has to be is a separate project due to a bug in MSVS 2008 and the | |
| 277 # current toolset on android. The problem is that we have two files named | |
| 278 # "constants.cc" and MSVS/android doesn't handle this properly. | |
| 279 # GYP currently has guards to catch this, so if you want to remove it, | |
| 280 # run GYP and if GYP has removed the validation check, then we can assume | |
| 281 # that the toolchains have been fixed (we currently use VS2010 and later, | |
| 282 # so VS2008 isn't a concern anymore). | |
| 283 # | |
| 284 # GYP version: third_party/libjingle.gyp:libjingle_p2p_constants | |
| 285 static_library("libjingle_p2p_constants") { | |
| 286 sources = [ | |
| 287 "source/talk/p2p/base/constants.cc", | |
| 288 "source/talk/p2p/base/constants.h", | |
| 289 ] | |
| 290 deps = [ | |
| 291 ":jingle_deps", | |
| 292 ] | |
| 293 forward_dependent_configs_from = [ | |
| 294 ":jingle_deps", | |
| 295 ] | |
| 296 configs += [ | |
| 297 ":jingle_unexported_configs" | |
| 298 ] | |
| 299 direct_dependent_configs = [ | |
| 300 ":jingle_direct_dependent_configs", | |
| 301 ] | |
| 302 all_dependent_configs = [ | |
| 303 ":jingle_all_dependent_configs", | |
| 304 ] | |
| 305 } | |
| 306 | |
| 307 # GYP version: third_party/libjingle.gyp:peerconnnection_server | |
| 308 #TODO(GYP): Switch to executable when WebRTC dependency is resolved. | |
| 309 source_set("peerconnnection_server") { | |
|
kjellander_chromium
2014/08/30 06:41:25
This should be peerconnection_server (notice only
| |
| 310 sources = [ | |
| 311 "source/talk/examples/peerconnection/server/data_socket.cc", | |
| 312 "source/talk/examples/peerconnection/server/data_socket.h", | |
| 313 "source/talk/examples/peerconnection/server/main.cc", | |
| 314 "source/talk/examples/peerconnection/server/peer_channel.cc", | |
| 315 "source/talk/examples/peerconnection/server/peer_channel.h", | |
| 316 "source/talk/examples/peerconnection/server/utils.cc", | |
| 317 "source/talk/examples/peerconnection/server/utils.h", | |
| 318 ] | |
| 319 include_dirs = [ | |
| 320 "source", | |
| 321 ] | |
| 322 deps = [ | |
| 323 ":libjingle", | |
| 324 ":jingle_deps", | |
| 325 ] | |
| 326 forward_dependent_configs_from = [ | |
| 327 ":jingle_deps", | |
| 328 ] | |
| 329 configs += [ | |
| 330 ":jingle_unexported_configs" | |
| 331 ] | |
| 332 direct_dependent_configs = [ | |
| 333 ":jingle_direct_dependent_configs", | |
| 334 ] | |
| 335 all_dependent_configs = [ | |
| 336 ":jingle_all_dependent_configs", | |
| 337 ] | |
| 338 if (is_win) { | |
| 339 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. | |
| 340 cflags += [ "/wd4309" ] | |
| 341 } | |
| 342 } | |
| 343 | |
| 344 # TODO(GYP): Port libjingle.gyp's enable_webrtc condition block. | |
| OLD | NEW |