naiveproxy/services/service_manager/embedder/BUILD.gn
2018-02-02 05:49:39 -05:00

112 lines
2.5 KiB
Plaintext

# Copyright 2017 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.
component("embedder") {
public = [
"embedded_service_info.h",
"embedded_service_runner.h",
"manifest_utils.h",
]
sources = [
"embedded_instance_manager.cc",
"embedded_instance_manager.h",
"embedded_service_info.cc",
"embedded_service_runner.cc",
"manifest_utils.cc",
"service_manager_embedder_export.h",
]
# iOS embeds the Service Manager but does not use service_manager::Main() (and
# cannot use or even build it as-is).
if (!is_ios) {
public += [
"main.h",
"main_delegate.h",
"process_type.h",
"set_process_title.h",
"set_process_title_linux.h",
"shared_file_util.h",
]
sources += [
"main.cc",
"main_delegate.cc",
"set_process_title.cc",
"set_process_title_linux.cc",
"shared_file_util.cc",
]
}
if (is_mac) {
sources += [
"mac_init.h",
"mac_init.mm",
]
libs = [ "Foundation.framework" ]
}
deps = [
"//base:base_static",
]
public_deps = [
"//base",
"//services/service_manager/public/cpp",
]
if (!is_ios) {
# deps of ServiceManager::Main and related functionality.
deps += [
"//base/allocator:features",
"//components/tracing:startup_tracing",
"//ui/base",
]
public_deps += [
":embedder_switches",
"//mojo/edk/system",
"//services/service_manager/background:lib",
"//services/service_manager/public/cpp/standalone_service",
"//services/service_manager/runner:init",
"//services/service_manager/runner/common",
]
}
defines = [ "SERVICE_MANAGER_EMBEDDER_IMPL" ]
}
component("embedder_switches") {
sources = [
"service_manager_embedder_switches_export.h",
"switches.cc",
"switches.h",
]
defines = [ "SERVICE_MANAGER_EMBEDDER_SWITCHES_IMPL" ]
}
source_set("unittests") {
testonly = true
sources = [
"embedded_instance_manager_unittest.cc",
"manifest_utils_unittest.cc",
]
# These headers are duplicated here so that they can remain private in the
# "embedder" target. See http://crbug.com/732993 for a way to make it
# unnecessary to do this.
sources += [
"embedded_instance_manager.h",
"service_manager_embedder_export.h",
]
deps = [
":embedder",
"//base",
"//base/test:test_support",
"//testing/gtest",
]
}