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

Unified Diff: third_party/libjingle/BUILD.gn

Issue 455583002: Port parts of //third_pary/libjingle build to GN (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Small includes fix Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « jingle/BUILD.gn ('k') | third_party/libjingle/libjingle.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libjingle/BUILD.gn
diff --git a/third_party/libjingle/BUILD.gn b/third_party/libjingle/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..21d1b765ac14d6cbcd167a8cd42be6322ce95639
--- /dev/null
+++ b/third_party/libjingle/BUILD.gn
@@ -0,0 +1,350 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/crypto.gni")
+
+declare_args() {
+ libjingle_source = "source"
+ libpeer_target_type = "static_library"
+}
+
+# From third_party/libjingle/libjingle.gyp's target_defaults.
+config("jingle_unexported_configs") {
+ defines = [
+ "EXPAT_RELATIVE_PATH",
+ "FEATURE_ENABLE_SSL",
+ "GTEST_RELATIVE_PATH",
+ "HAVE_SRTP",
+ "HAVE_WEBRTC_VIDEO",
+ "HAVE_WEBRTC_VOICE",
+ "LOGGING_INSIDE_WEBRTC",
+ "NO_MAIN_THREAD_WRAPPING",
+ "NO_SOUND_SYSTEM",
+ "SRTP_RELATIVE_PATH",
+ "USE_WEBRTC_DEV_BRANCH",
+ "ENABLE_EXTERNAL_AUTH",
+ ]
+
+ include_dirs = [
+ "overrides",
+ "../../third_party/webrtc/overrides",
+ "${libjingle_source}",
+ "../../testing/gtest/include",
+ "../../third_party",
+ "../../third_party/libyuv/include",
+ "../../third_party/usrsctp",
+ ]
+
+ if ("${libpeer_target_type}" == "static_library") {
+ defines += [ "LIBPEERCONNECTION_LIB=1" ]
+ }
+
+ if (is_win && cpu_arch == "x86") {
+ defines += [ "_USE_32BIT_TIME_T" ]
+ }
+
+ if (use_openssl) {
+ defines += [
+ "SSL_USE_OPENSSL",
+ "HAVE_OPENSSL_SSL_H",
+ ]
+ } else {
+ defines += [
+ "SSL_USE_NSS",
+ "HAVE_NSS_SSL_H",
+ "SSL_USE_NSS_RNG",
+ ]
+ }
+
+}
+
+# From third_party/libjingle/libjingle.gyp's target_defaults.
+config("jingle_direct_dependent_configs") {
+ include_dirs = [
+ "../../third_party/webrtc/overrides",
+ "overrides",
+ "${libjingle_source}",
+ "../../testing/gtest/include",
+ "../../third_party",
+ ]
+ defines = [
+ "FEATURE_ENABLE_SSL",
+ "FEATURE_ENABLE_VOICEMAIL",
+ "EXPAT_RELATIVE_PATH",
+ "GTEST_RELATIVE_PATH",
+ "NO_MAIN_THREAD_WRAPPING",
+ "NO_SOUND_SYSTEM",
+ ]
+ # TODO(GYP): Port is_win blocks.
+ if (is_linux) {
+ defines += [ "LINUX", "WEBRTC_LINUX" ]
+ }
+ if (is_mac) {
+ defines += [ "OSX", "WEBRTC_MAC" ]
+ }
+ if (is_ios) {
+ defines += [ "IOS", "WEBRTC_MAC", "WEBRTC_IOS" ]
+ }
+ if (is_win) {
+ defines += [ "WEBRTC_WIN" ]
+ }
+ if (is_android) {
+ defines += [ "ANDROID" ]
+ }
+ if (is_posix) {
+ defines += [ "POSIX", "WEBRTC_POSIX" ]
+ }
+ # TODO(GYP): Support these in GN.
+ # if (is_bsd) {
+ # defines += [ "BSD" ]
+ # }
+ # if (is_openbsd) {
+ # defines += [ "OPENBSD" ]
+ # }
+ # if (is_freebsd) {
+ # defines += [ "FREEBSD" ]
+ # }
+ if (is_chromeos) {
+ defines += [ "CHROMEOS" ]
+ }
+}
+
+# From third_party/libjingle/libjingle.gyp's target_defaults.
+config("jingle_all_dependent_configs") {
+ if (is_debug) {
+ # TODO(sergeyu): Fix libjingle to use NDEBUG instead of
+ # _DEBUG and remove this define. See GYP file as well.
+ defines = [ "_DEBUG" ]
+ }
+}
+
+# From third_party/libjingle/libjingle.gyp's target_defaults.
+group("jingle_deps") {
+ deps = [
+ "//base",
+ "//net",
+ "//third_party/expat",
+ "//crypto:platform",
+ ]
+ forward_dependent_configs_from = [
+ "//third_party/expat",
+ ]
+}
+
+# GYP version: third_party/libjingle.gyp:libjingle
+static_library("libjingle") {
+ sources = [
+ # List from third_party/libjingle/libjingle_common.gypi
+ "${libjingle_source}/talk/p2p/base/asyncstuntcpsocket.cc",
+ "${libjingle_source}/talk/p2p/base/asyncstuntcpsocket.h",
+ "${libjingle_source}/talk/p2p/base/basicpacketsocketfactory.cc",
+ "${libjingle_source}/talk/p2p/base/basicpacketsocketfactory.h",
+ "${libjingle_source}/talk/p2p/base/candidate.h",
+ "${libjingle_source}/talk/p2p/base/common.h",
+ "${libjingle_source}/talk/p2p/base/constants.cc",
+ "${libjingle_source}/talk/p2p/base/constants.h",
+ "${libjingle_source}/talk/p2p/base/dtlstransport.h",
+ "${libjingle_source}/talk/p2p/base/dtlstransportchannel.cc",
+ "${libjingle_source}/talk/p2p/base/dtlstransportchannel.h",
+ "${libjingle_source}/talk/p2p/base/p2ptransport.cc",
+ "${libjingle_source}/talk/p2p/base/p2ptransport.h",
+ "${libjingle_source}/talk/p2p/base/p2ptransportchannel.cc",
+ "${libjingle_source}/talk/p2p/base/p2ptransportchannel.h",
+ "${libjingle_source}/talk/p2p/base/parsing.cc",
+ "${libjingle_source}/talk/p2p/base/parsing.h",
+ "${libjingle_source}/talk/p2p/base/port.cc",
+ "${libjingle_source}/talk/p2p/base/port.h",
+ "${libjingle_source}/talk/p2p/base/portallocator.cc",
+ "${libjingle_source}/talk/p2p/base/portallocator.h",
+ "${libjingle_source}/talk/p2p/base/portallocatorsessionproxy.cc",
+ "${libjingle_source}/talk/p2p/base/portallocatorsessionproxy.h",
+ "${libjingle_source}/talk/p2p/base/portproxy.cc",
+ "${libjingle_source}/talk/p2p/base/portproxy.h",
+ "${libjingle_source}/talk/p2p/base/pseudotcp.cc",
+ "${libjingle_source}/talk/p2p/base/pseudotcp.h",
+ "${libjingle_source}/talk/p2p/base/rawtransport.cc",
+ "${libjingle_source}/talk/p2p/base/rawtransport.h",
+ "${libjingle_source}/talk/p2p/base/rawtransportchannel.cc",
+ "${libjingle_source}/talk/p2p/base/rawtransportchannel.h",
+ "${libjingle_source}/talk/p2p/base/relayport.cc",
+ "${libjingle_source}/talk/p2p/base/relayport.h",
+ "${libjingle_source}/talk/p2p/base/session.cc",
+ "${libjingle_source}/talk/p2p/base/session.h",
+ "${libjingle_source}/talk/p2p/base/sessionclient.h",
+ "${libjingle_source}/talk/p2p/base/sessiondescription.cc",
+ "${libjingle_source}/talk/p2p/base/sessiondescription.h",
+ "${libjingle_source}/talk/p2p/base/sessionid.h",
+ "${libjingle_source}/talk/p2p/base/sessionmanager.cc",
+ "${libjingle_source}/talk/p2p/base/sessionmanager.h",
+ "${libjingle_source}/talk/p2p/base/sessionmessages.cc",
+ "${libjingle_source}/talk/p2p/base/sessionmessages.h",
+ "${libjingle_source}/talk/p2p/base/stun.cc",
+ "${libjingle_source}/talk/p2p/base/stun.h",
+ "${libjingle_source}/talk/p2p/base/stunport.cc",
+ "${libjingle_source}/talk/p2p/base/stunport.h",
+ "${libjingle_source}/talk/p2p/base/stunrequest.cc",
+ "${libjingle_source}/talk/p2p/base/stunrequest.h",
+ "${libjingle_source}/talk/p2p/base/tcpport.cc",
+ "${libjingle_source}/talk/p2p/base/tcpport.h",
+ "${libjingle_source}/talk/p2p/base/transport.cc",
+ "${libjingle_source}/talk/p2p/base/transport.h",
+ "${libjingle_source}/talk/p2p/base/transportchannel.cc",
+ "${libjingle_source}/talk/p2p/base/transportchannel.h",
+ "${libjingle_source}/talk/p2p/base/transportchannelimpl.h",
+ "${libjingle_source}/talk/p2p/base/transportchannelproxy.cc",
+ "${libjingle_source}/talk/p2p/base/transportchannelproxy.h",
+ "${libjingle_source}/talk/p2p/base/transportdescription.cc",
+ "${libjingle_source}/talk/p2p/base/transportdescription.h",
+ "${libjingle_source}/talk/p2p/base/transportdescriptionfactory.cc",
+ "${libjingle_source}/talk/p2p/base/transportdescriptionfactory.h",
+ "${libjingle_source}/talk/p2p/base/turnport.cc",
+ "${libjingle_source}/talk/p2p/base/turnport.h",
+ "${libjingle_source}/talk/p2p/client/basicportallocator.cc",
+ "${libjingle_source}/talk/p2p/client/basicportallocator.h",
+ "${libjingle_source}/talk/p2p/client/httpportallocator.cc",
+ "${libjingle_source}/talk/p2p/client/httpportallocator.h",
+ "${libjingle_source}/talk/p2p/client/sessionmanagertask.h",
+ "${libjingle_source}/talk/p2p/client/sessionsendtask.h",
+ "${libjingle_source}/talk/p2p/client/socketmonitor.cc",
+ "${libjingle_source}/talk/p2p/client/socketmonitor.h",
+ "${libjingle_source}/talk/xmllite/qname.cc",
+ "${libjingle_source}/talk/xmllite/qname.h",
+ "${libjingle_source}/talk/xmllite/xmlbuilder.cc",
+ "${libjingle_source}/talk/xmllite/xmlbuilder.h",
+ "${libjingle_source}/talk/xmllite/xmlconstants.cc",
+ "${libjingle_source}/talk/xmllite/xmlconstants.h",
+ "${libjingle_source}/talk/xmllite/xmlelement.cc",
+ "${libjingle_source}/talk/xmllite/xmlelement.h",
+ "${libjingle_source}/talk/xmllite/xmlnsstack.cc",
+ "${libjingle_source}/talk/xmllite/xmlnsstack.h",
+ "${libjingle_source}/talk/xmllite/xmlparser.cc",
+ "${libjingle_source}/talk/xmllite/xmlparser.h",
+ "${libjingle_source}/talk/xmllite/xmlprinter.cc",
+ "${libjingle_source}/talk/xmllite/xmlprinter.h",
+ "${libjingle_source}/talk/xmpp/asyncsocket.h",
+ "${libjingle_source}/talk/xmpp/constants.cc",
+ "${libjingle_source}/talk/xmpp/constants.h",
+ "${libjingle_source}/talk/xmpp/jid.cc",
+ "${libjingle_source}/talk/xmpp/jid.h",
+ "${libjingle_source}/talk/xmpp/plainsaslhandler.h",
+ "${libjingle_source}/talk/xmpp/prexmppauth.h",
+ "${libjingle_source}/talk/xmpp/saslcookiemechanism.h",
+ "${libjingle_source}/talk/xmpp/saslhandler.h",
+ "${libjingle_source}/talk/xmpp/saslmechanism.cc",
+ "${libjingle_source}/talk/xmpp/saslmechanism.h",
+ "${libjingle_source}/talk/xmpp/saslplainmechanism.h",
+ "${libjingle_source}/talk/xmpp/xmppclient.cc",
+ "${libjingle_source}/talk/xmpp/xmppclient.h",
+ "${libjingle_source}/talk/xmpp/xmppclientsettings.h",
+ "${libjingle_source}/talk/xmpp/xmppengine.h",
+ "${libjingle_source}/talk/xmpp/xmppengineimpl.cc",
+ "${libjingle_source}/talk/xmpp/xmppengineimpl.h",
+ "${libjingle_source}/talk/xmpp/xmppengineimpl_iq.cc",
+ "${libjingle_source}/talk/xmpp/xmpplogintask.cc",
+ "${libjingle_source}/talk/xmpp/xmpplogintask.h",
+ "${libjingle_source}/talk/xmpp/xmppstanzaparser.cc",
+ "${libjingle_source}/talk/xmpp/xmppstanzaparser.h",
+ "${libjingle_source}/talk/xmpp/xmpptask.cc",
+ "${libjingle_source}/talk/xmpp/xmpptask.h",
+ ]
+ sources -= [
+ # Compiled as part of libjingle_p2p_constants.
+ "${libjingle_source}/talk/p2p/base/constants.cc",
+ "${libjingle_source}/talk/p2p/base/constants.h",
+ ]
+ deps = [
+ # TODO(GYP): Uncomment when WebRTC GN build has settled.
+ # "//third_party/webrtc/base:webrtc_base",
+ ":libjingle_p2p_constants",
+ ":jingle_deps"
+ ]
+
+ # From libjingle_common.gypi's conditions list.
+ if (is_win && !nacl_untrusted_build) {
+ cflags += [ "/wd4005", "\wd4267" ]
+ }
+
+ forward_dependent_configs_from = [
+ ":jingle_deps"
+ ]
+ configs += [
+ ":jingle_unexported_configs"
+ ]
+ direct_dependent_configs = [
+ ":jingle_direct_dependent_configs",
+ ]
+ all_dependent_configs = [
+ ":jingle_all_dependent_configs",
+ ]
+}
+
+# This has to be is a separate project due to a bug in MSVS 2008 and the
+# current toolset on android. The problem is that we have two files named
+# "constants.cc" and MSVS/android doesn't handle this properly.
+# GYP currently has guards to catch this, so if you want to remove it,
+# run GYP and if GYP has removed the validation check, then we can assume
+# that the toolchains have been fixed (we currently use VS2010 and later,
+# so VS2008 isn't a concern anymore).
+#
+# GYP version: third_party/libjingle.gyp:libjingle_p2p_constants
+static_library("libjingle_p2p_constants") {
+ sources = [
+ "${libjingle_source}/talk/p2p/base/constants.cc",
+ "${libjingle_source}/talk/p2p/base/constants.h",
+ ]
+ deps = [
+ ":jingle_deps",
+ ]
+ forward_dependent_configs_from = [
+ ":jingle_deps",
+ ]
+ configs += [
+ ":jingle_unexported_configs"
+ ]
+ direct_dependent_configs = [
+ ":jingle_direct_dependent_configs",
+ ]
+ all_dependent_configs = [
+ ":jingle_all_dependent_configs",
+ ]
+}
+
+# GYP version: third_party/libjingle.gyp:peerconnnection_server
+#TODO(GYP): Switch to executable when WebRTC dependency is resolved.
+source_set("peerconnnection_server") {
+ sources = [
+ "${libjingle_source}/talk/examples/peerconnection/server/data_socket.cc",
+ "${libjingle_source}/talk/examples/peerconnection/server/data_socket.h",
+ "${libjingle_source}/talk/examples/peerconnection/server/main.cc",
+ "${libjingle_source}/talk/examples/peerconnection/server/peer_channel.cc",
+ "${libjingle_source}/talk/examples/peerconnection/server/peer_channel.h",
+ "${libjingle_source}/talk/examples/peerconnection/server/utils.cc",
+ "${libjingle_source}/talk/examples/peerconnection/server/utils.h",
+ ]
+ include_dirs = [
+ "${libjingle_source}",
+ ]
+ deps = [
+ ":libjingle",
+ ":jingle_deps",
+ ]
+ forward_dependent_configs_from = [
+ ":jingle_deps",
+ ]
+ configs += [
+ ":jingle_unexported_configs"
+ ]
+ direct_dependent_configs = [
+ ":jingle_direct_dependent_configs",
+ ]
+ all_dependent_configs = [
+ ":jingle_all_dependent_configs",
+ ]
+ if (is_win) {
+ # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
+ cflags += [ "/wd4309" ]
+ }
+}
+
+# TODO(GYP): Port libjingle.gyp's enable_webrtc condition block.
« no previous file with comments | « jingle/BUILD.gn ('k') | third_party/libjingle/libjingle.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698