Commit f7b1cb69 authored by ajwong's avatar ajwong Committed by Commit bot

Port parts of //third_pary/libjingle build to GN

Reimplements parts of //third_party/libjingle's build in GN.

The new build is much less flexible than the original. No
configuration variables have been ported. Some windows-specific configs
have been left out and annotated with TODOs.  Most signifcantly, the
entirety of the 'if (enable_webrtc)' block has been omitted, because the
GN build for webrtc isn't working yet.

Despite these limitations, it is an adequate replacement for the
'stub' libjingle target in most situations.

Note, this CL is a near direct copy of rlarocque's work at
   https://codereview.chromium.org/455583002/

BUG=none
TBR=sky,pavely,rlarocque

Review URL: https://codereview.chromium.org/498603002

Cr-Commit-Position: refs/heads/master@{#291587}
parent 1f4903ba
......@@ -58,6 +58,7 @@ group("root") {
"//google_apis/gcm",
"//ipc",
"//ipc/mojo",
"//jingle:notifier",
"//media",
"//media/cast",
"//mojo",
......@@ -85,6 +86,7 @@ group("root") {
"//third_party/leveldatabase",
"//third_party/libaddressinput",
"//third_party/libphonenumber",
"//third_party/libjingle",
"//third_party/libpng",
"//third_party/libsrtp",
"//third_party/libusb",
......
......@@ -76,12 +76,14 @@ static_library("browser") {
"//courgette:courgette_lib",
"//crypto",
"//google_apis",
"//jingle:notifier",
"//skia",
"//sql",
"//sync",
"//third_party/cacheinvalidation",
"//third_party/icu",
"//third_party/libxml",
"//third_party/libjingle",
"//third_party/widevine/cdm:version_h",
"//third_party/zlib",
"//third_party/zlib:minizip",
......@@ -107,8 +109,6 @@ static_library("browser") {
#"../components/components.gyp:search_engines",
#"../components/components.gyp:search_provider_logos",
#"../components/components.gyp:sync_driver",
#"../jingle/jingle.gyp:notifier",
#"../third_party/libjingle/libjingle.gyp:libjingle",
]
forward_dependent_configs_from = [
......
......@@ -88,7 +88,6 @@ static_library("ui") {
"//chrome/common/extensions/api:api",
"//chrome/installer/util",
"//components/autofill/content/browser:risk_proto",
"//content/app/resources",
"//device/bluetooth",
"//device/nfc",
"//media",
......@@ -100,6 +99,7 @@ static_library("ui") {
"//third_party/hunspell",
"//third_party/leveldatabase",
"//third_party/npapi",
"//third_party/libjingle",
"//third_party/re2",
"//ui/compositor",
"//ui/surface",
......@@ -108,7 +108,6 @@ static_library("ui") {
"//webkit/browser:storage",
"//webkit/common",
"//webkit/common:storage",
#'../third_party/libjingle/libjingle.gyp:libjingle', TODO(GYP)
]
# TODO(GYP)
#'defines': [
......
......@@ -59,7 +59,7 @@ static_library("service") {
"//net",
"//printing",
"//skia",
#'../third_party/libjingle/libjingle.gyp:libjingle', TODO(GYP)
"//third_party/libjingle"
]
if (use_cups) {
......
......@@ -58,11 +58,11 @@ static_library("browser") {
"//sql",
"//third_party/icu",
"//third_party/libphonenumber",
"//third_party/libjingle",
"//ui/base",
"//ui/gfx",
"//ui/gfx/geometry",
"//url",
#"../third_party/libjingle/libjingle.gyp:libjingle", TODO(GYP)
]
forward_dependent_configs_from = [
......
......@@ -149,15 +149,13 @@ static_library("browser") {
"//third_party/icu",
"//third_party/libaddressinput:util",
"//third_party/libphonenumber",
"//third_party/libjingle",
"//ui/base",
"//ui/gfx",
"//ui/gfx/geometry",
"//url",
# TODO(GYP) also remove libjingle_stub_config below when this is added:
#'../third_party/libjingle/libjingle.gyp:libjingle', TODO(GYP)
]
configs += [ "//content:libjingle_stub_config" ]
direct_dependent_configs = [ ":autofill_browser_config" ]
if (autofill_enable_sync) {
......@@ -235,8 +233,6 @@ source_set("unit_tests") {
"webdata/web_data_service_unittest.cc",
]
configs += [ "//content:libjingle_stub_config" ]
deps = [
":browser",
":test_support",
......@@ -244,6 +240,6 @@ source_set("unit_tests") {
"//components/strings",
"//testing/gmock",
"//third_party/libphonenumber",
#'../third_party/libjingle/libjingle.gyp:libjingle', TODO(GYP)
"//third_party/libjingle"
]
}
......@@ -76,9 +76,6 @@ static_library("invalidation") {
]
}
# TODO(GYP) remove this when libjingle is added.
configs += [ "//content:libjingle_stub_config" ]
deps = [
"//base",
"//components/gcm_driver",
......
......@@ -21,7 +21,6 @@ source_set("common") {
configs += [
"//content:content_implementation",
"//content:libjingle_stub_config",
]
deps = [
......@@ -40,8 +39,7 @@ source_set("common") {
"//ui/shell_dialogs",
"//url",
"//third_party/WebKit/public:blink_headers",
# TODO(GYP) convert these dependencies.
#'../third_party/libjingle/libjingle.gyp:libjingle',
"//third_party/libjingle",
]
if (!is_ios) {
......
......@@ -37,6 +37,7 @@ source_set("renderer") {
"//net",
"//skia",
"//third_party/icu",
"//third_party/libjingle",
"//third_party/npapi",
"//third_party/WebKit/public:blink",
"//third_party/widevine/cdm:version_h",
......@@ -49,7 +50,6 @@ source_set("renderer") {
"//webkit/common",
"//webkit/common:storage",
"//webkit/common/gpu",
#'../third_party/libjingle/libjingle.gyp:libjingle', TODO(GYP)
]
if (!enable_notifications) {
......
......@@ -17,14 +17,9 @@ if (enable_webrtc || !is_android) {
"//base",
"//base/third_party/dynamic_annotations",
"//net",
# '../third_party/libjingle/libjingle.gyp:libjingle', # TODO(GYP)
"//third_party/libjingle",
]
# 'export_dependent_settings': [
# '../third_party/libjingle/libjingle.gyp:libjingle',
# ],
# TODO(GYP): Replace this with a proper dependency on libjingle.
direct_dependent_configs = [ "//content:libjingle_stub_config", ]
forward_dependent_configs_from = [ "//third_party/libjingle" ]
}
# A library for sending and receiving peer-issued notifications.
......@@ -88,13 +83,9 @@ if (enable_webrtc || !is_android) {
"//third_party/expat",
"//url",
":jingle_glue",
# '../third_party/libjingle/libjingle.gyp:libjingle', # TODO(GYP)
"//third_party/libjingle",
]
# 'export_dependent_settings': [
# '../third_party/libjingle/libjingle.gyp:libjingle',
# ],
# TODO(GYP): Replace this with a proper dependency on libjingle.
direct_dependent_configs = [ "//content:libjingle_stub_config", ]
forward_dependent_configs_from = [ "//third_party/libjingle" ]
}
# GYP version: jingle/jingle.gyp:notifier_test_util
......@@ -166,13 +157,9 @@ if (enable_webrtc || !is_android) {
"//net:test_support",
"//testing/gmock",
"//testing/gtest",
# '../third_party/libjingle/libjingle.gyp:libjingle', # TODO(GYP)
"//third_party/libjingle",
]
# 'export_dependent_settings': [
# '../third_party/libjingle/libjingle.gyp:libjingle',
# ],
# TODO(GYP): Replace this with a proper dependency on libjingle.
direct_dependent_configs = [ "//content:libjingle_stub_config", ]
forward_dependent_configs_from = [ "//third_party/libjingle" ]
}
} else {
# !enable_webrtc and is_android
......
This diff is collapsed.
......@@ -14,6 +14,9 @@
'libpeer_target_type%': 'static_library',
'libpeer_allocator_shim%': 0,
},
# Most of these settings have been split according to their scope into
# :jingle_unexported_configs, :jingle_direct_dependent_configs,
# :jingle_all_dependent_configs in the GN build.
'target_defaults': {
'defines': [
'EXPAT_RELATIVE_PATH',
......@@ -48,6 +51,7 @@
'../../third_party/libyuv/include',
'../../third_party/usrsctp',
],
# These dependencies have been translated into :jingle_deps in the GN build.
'dependencies': [
'<(DEPTH)/base/base.gyp:base',
'<(DEPTH)/net/net.gyp:net',
......@@ -154,8 +158,8 @@
'configurations': {
'Debug': {
'defines': [
# TODO(sergeyu): Fix libjingle to use NDEBUG instead of
# _DEBUG and remove this define. See above as well.
# TODO(sergeyu): Fix libjingle to use NDEBUG instead of _DEBUG and
# remove this define. See above and GN file as well.
'_DEBUG',
],
}
......@@ -260,6 +264,7 @@
],
},
'targets': [
# GN version: //third_party/libjingle
{
'target_name': 'libjingle',
'type': 'static_library',
......@@ -282,6 +287,8 @@
# 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).
#
# GN version: //third_party/libjingle:libjingle_p2p_constants
{
'target_name': 'libjingle_p2p_constants',
'type': 'static_library',
......@@ -290,6 +297,7 @@
'<(libjingle_source)/talk/p2p/base/constants.h',
],
}, # target libjingle_p2p_constants
# GN version: //third_party/libjingle:peerconnection_server
{
'target_name': 'peerconnection_server',
'type': 'executable',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment