GN support for //jingle directory

Supports GN build of //jingle, though its targets won't be linkable
until its dependency //third_party/libjingle is properly supported.

TBR=ajwong
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287425 0039d316-1c4b-4281-b951-d872f2087c98
parent 9019e16c
...@@ -55,10 +55,10 @@ static_library("service") { ...@@ -55,10 +55,10 @@ static_library("service") {
"//base", "//base",
"//components/cloud_devices/common", "//components/cloud_devices/common",
"//google_apis", "//google_apis",
"//jingle:notifier",
"//net", "//net",
"//printing", "//printing",
"//skia", "//skia",
#'../jingle/jingle.gyp:notifier', TODO(GYP)
#'../third_party/libjingle/libjingle.gyp:libjingle', TODO(GYP) #'../third_party/libjingle/libjingle.gyp:libjingle', TODO(GYP)
] ]
......
...@@ -87,9 +87,9 @@ static_library("invalidation") { ...@@ -87,9 +87,9 @@ static_library("invalidation") {
"//components/signin/core/browser:browser", "//components/signin/core/browser:browser",
"//components/pref_registry", "//components/pref_registry",
#"//components/signin/core/browser", TODO(GYP) #"//components/signin/core/browser", TODO(GYP)
"//jingle:notifier",
"//sync", "//sync",
"//third_party/cacheinvalidation", "//third_party/cacheinvalidation",
#'../jingle/jingle.gyp:notifier', TODO(GYP)
# TODO(sync): Remove this (http://crbug.com/133352); # TODO(sync): Remove this (http://crbug.com/133352);
# "//third_party/cacheinvalidation/src/google/cacheinvalidation:cacheinvalidation_proto_cpp", # "//third_party/cacheinvalidation/src/google/cacheinvalidation:cacheinvalidation_proto_cpp",
...@@ -126,12 +126,12 @@ static_library("test_support") { ...@@ -126,12 +126,12 @@ static_library("test_support") {
"//base", "//base",
"//components/keyed_service/core", "//components/keyed_service/core",
"//google_apis", "//google_apis",
"//jingle:notifier",
"//jingle:notifier_test_util",
"//net", "//net",
"//sync", "//sync",
"//testing/gmock", "//testing/gmock",
"//third_party/cacheinvalidation", "//third_party/cacheinvalidation",
#'../jingle/jingle.gyp:notifier', TODO(GYP)
#'../jingle/jingle.gyp:notifier_test_util', TODO(GYP)
#'../sync/sync.gyp:test_support_sync_notifier', TODO(GYP) #'../sync/sync.gyp:test_support_sync_notifier', TODO(GYP)
#'gcm_driver_test_support', TODO(GYP) #'gcm_driver_test_support', TODO(GYP)
] ]
......
...@@ -27,6 +27,7 @@ source_set("renderer") { ...@@ -27,6 +27,7 @@ source_set("renderer") {
"//content:resources", "//content:resources",
"//content/common:mojo_bindings", "//content/common:mojo_bindings",
"//gin", "//gin",
"//jingle:jingle_glue",
"//media", "//media",
"//mojo/bindings/js", "//mojo/bindings/js",
"//mojo/environment:chromium", "//mojo/environment:chromium",
...@@ -47,7 +48,6 @@ source_set("renderer") { ...@@ -47,7 +48,6 @@ source_set("renderer") {
"//webkit/common", "//webkit/common",
"//webkit/common:storage", "//webkit/common:storage",
"//webkit/common/gpu", "//webkit/common/gpu",
#'../jingle/jingle.gyp:jingle_glue', TODO(GYP)
#'../third_party/libjingle/libjingle.gyp:libjingle', TODO(GYP) #'../third_party/libjingle/libjingle.gyp:libjingle', TODO(GYP)
] ]
......
# 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/features.gni")
jingle_includes = exec_script("//build/gypi_to_gn.py",
[ rebase_path("jingle.gypi") ],
"scope",
[ "jingle.gypi" ])
if (enable_webrtc || !is_android) {
# GYP version: jingle/jingle.gyp:jingle_glue
static_library("jingle_glue") {
sources = jingle_includes.jingle_glue_sources
deps = [
"//base",
"//base/third_party/dynamic_annotations",
"//net",
# '../third_party/libjingle/libjingle.gyp:libjingle', # TODO(GYP)
]
# '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", ]
}
# A library for sending and receiving peer-issued notifications.
# GYP version: jingle/jingle.gyp:notifier
static_library("notifier") {
sources = [
"notifier/base/const_communicator.h",
"notifier/base/gaia_constants.cc",
"notifier/base/gaia_constants.h",
"notifier/base/gaia_token_pre_xmpp_auth.cc",
"notifier/base/gaia_token_pre_xmpp_auth.h",
"notifier/base/notification_method.h",
"notifier/base/notification_method.cc",
"notifier/base/notifier_options.cc",
"notifier/base/notifier_options.h",
"notifier/base/notifier_options_util.cc",
"notifier/base/notifier_options_util.h",
"notifier/base/server_information.cc",
"notifier/base/server_information.h",
"notifier/base/weak_xmpp_client.cc",
"notifier/base/weak_xmpp_client.h",
"notifier/base/xmpp_connection.cc",
"notifier/base/xmpp_connection.h",
"notifier/communicator/connection_settings.cc",
"notifier/communicator/connection_settings.h",
"notifier/communicator/login.cc",
"notifier/communicator/login.h",
"notifier/communicator/login_settings.cc",
"notifier/communicator/login_settings.h",
"notifier/communicator/single_login_attempt.cc",
"notifier/communicator/single_login_attempt.h",
"notifier/listener/non_blocking_push_client.cc",
"notifier/listener/non_blocking_push_client.h",
"notifier/listener/notification_constants.cc",
"notifier/listener/notification_constants.h",
"notifier/listener/notification_defines.cc",
"notifier/listener/notification_defines.h",
"notifier/listener/push_client_observer.cc",
"notifier/listener/push_client_observer.h",
"notifier/listener/push_client.cc",
"notifier/listener/push_client.h",
"notifier/listener/push_notifications_listen_task.cc",
"notifier/listener/push_notifications_listen_task.h",
"notifier/listener/push_notifications_send_update_task.cc",
"notifier/listener/push_notifications_send_update_task.h",
"notifier/listener/push_notifications_subscribe_task.cc",
"notifier/listener/push_notifications_subscribe_task.h",
"notifier/listener/send_ping_task.cc",
"notifier/listener/send_ping_task.h",
"notifier/listener/xml_element_util.cc",
"notifier/listener/xml_element_util.h",
"notifier/listener/xmpp_push_client.cc",
"notifier/listener/xmpp_push_client.h",
]
defines = [
"_CRT_SECURE_NO_WARNINGS",
]
deps = [
"//base",
"//net",
"//third_party/expat",
"//url",
":jingle_glue",
# '../third_party/libjingle/libjingle.gyp:libjingle', # TODO(GYP)
]
# '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", ]
}
# GYP version: jingle/jingle.gyp:notifier_test_util
static_library("notifier_test_util") {
sources = [
"notifier/base/fake_base_task.cc",
"notifier/base/fake_base_task.h",
"notifier/listener/fake_push_client.cc",
"notifier/listener/fake_push_client.h",
"notifier/listener/fake_push_client_observer.cc",
"notifier/listener/fake_push_client_observer.h",
]
deps = [
":notifier",
"//base",
"//testing/gmock",
]
}
# GYP version: jingle/jingle.gyp:jingle_unittests
# TODO(GYP): Convert to executable when its dependencies are linkable.
source_set("jingle_unittests") {
sources = [
"glue/channel_socket_adapter_unittest.cc",
"glue/chrome_async_socket_unittest.cc",
"glue/fake_ssl_client_socket_unittest.cc",
"glue/jingle_glue_mock_objects.cc",
"glue/jingle_glue_mock_objects.h",
"glue/logging_unittest.cc",
"glue/mock_task.cc",
"glue/mock_task.h",
"glue/proxy_resolving_client_socket_unittest.cc",
"glue/pseudotcp_adapter_unittest.cc",
"glue/task_pump_unittest.cc",
"glue/thread_wrapper_unittest.cc",
"notifier/base/weak_xmpp_client_unittest.cc",
"notifier/base/xmpp_connection_unittest.cc",
"notifier/communicator/connection_settings_unittest.cc",
"notifier/communicator/login_settings_unittest.cc",
"notifier/communicator/single_login_attempt_unittest.cc",
"notifier/listener/non_blocking_push_client_unittest.cc",
"notifier/listener/notification_defines_unittest.cc",
"notifier/listener/push_client_unittest.cc",
"notifier/listener/push_notifications_send_update_task_unittest.cc",
"notifier/listener/push_notifications_subscribe_task_unittest.cc",
"notifier/listener/send_ping_task_unittest.cc",
"notifier/listener/xml_element_util_unittest.cc",
"notifier/listener/xmpp_push_client_unittest.cc",
]
if (is_android) {
sources -= [
# TODO(jrg):
# EXPECT_DEBUG_DEATH() uses features not enabled.
# Should we -std=c++0x or -std=gnu++0x?
"glue/chrome_async_socket_unittest.cc",
"notifier/base/xmpp_connection_unittest.cc",
]
}
deps = [
":jingle_glue",
":notifier",
":notifier_test_util",
"//base",
"//base/test:run_all_unittests",
"//base/test:test_support",
"//net",
"//net:test_support",
"//testing/gmock",
"//testing/gtest",
# '../third_party/libjingle/libjingle.gyp:libjingle', # TODO(GYP)
]
# '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", ]
}
} else {
# !enable_webrtc and is_android
# Stub targets as Android doesn't use libjingle when webrtc is disabled.
source_set("jingle_glue") { }
source_set("jingle_glue_test_util") { }
# GYP version: jingle/jingle.gyp:notifier
static_library("notifier") {
sources = [
"notifier/base/gaia_constants.cc",
"notifier/base/gaia_constants.h",
"notifier/base/notification_method.h",
"notifier/base/notification_method.cc",
"notifier/base/notifier_options.cc",
"notifier/base/notifier_options.h",
]
deps = [
"//base",
"//net"
]
}
source_set("notifier_test_util") { }
}
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
['enable_webrtc==1 or OS!="android"', { ['enable_webrtc==1 or OS!="android"', {
'targets': [ 'targets': [
# A library of various utils for integration with libjingle. # A library of various utils for integration with libjingle.
# GN version: //jingle:jingle_glue
{ {
'target_name': 'jingle_glue', 'target_name': 'jingle_glue',
'type': 'static_library', 'type': 'static_library',
...@@ -33,6 +34,8 @@ ...@@ -33,6 +34,8 @@
# #
# TODO(akalin): Separate out the XMPP stuff from this library into # TODO(akalin): Separate out the XMPP stuff from this library into
# its own library. # its own library.
#
# GN version: //jingle:notifier
{ {
'target_name': 'notifier', 'target_name': 'notifier',
'type': 'static_library', 'type': 'static_library',
...@@ -100,6 +103,7 @@ ...@@ -100,6 +103,7 @@
'../third_party/libjingle/libjingle.gyp:libjingle', '../third_party/libjingle/libjingle.gyp:libjingle',
], ],
}, },
# GN version: //jingle:notifier_test_util
{ {
'target_name': 'notifier_test_util', 'target_name': 'notifier_test_util',
'type': 'static_library', 'type': 'static_library',
...@@ -117,6 +121,7 @@ ...@@ -117,6 +121,7 @@
'../testing/gmock.gyp:gmock', '../testing/gmock.gyp:gmock',
], ],
}, },
# GN version: //jingle:jingle_unittests
{ {
'target_name': 'jingle_unittests', 'target_name': 'jingle_unittests',
'type': 'executable', 'type': 'executable',
...@@ -186,6 +191,7 @@ ...@@ -186,6 +191,7 @@
'target_name': 'jingle_glue_test_util', 'target_name': 'jingle_glue_test_util',
'type': 'none', 'type': 'none',
}, },
# GN version: //jingle:notifier
{ {
'target_name': 'notifier', 'target_name': 'notifier',
'type': 'static_library', 'type': 'static_library',
......
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