naiveproxy/chrome/browser/resources/BUILD.gn

225 lines
5.8 KiB
Plaintext
Raw Normal View History

2018-12-10 05:59:24 +03:00
# 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("//chrome/common/features.gni")
import("//tools/grit/grit_rule.gni")
assert(!is_ios, "Chromium/iOS shouldn't use anything in //chrome")
if (closure_compile) {
group("closure_compile") {
deps = [
"cryptotoken:closure_compile",
"engagement:closure_compile",
]
if (is_linux || is_win || is_mac) {
deps += [
"md_bookmarks:closure_compile",
"md_downloads:closure_compile",
"md_history:closure_compile",
"media_router:closure_compile",
"ntp4:closure_compile",
"pdf:closure_compile",
"print_preview:closure_compile",
"settings:closure_compile",
"signin/dice_sync_confirmation:closure_compile",
]
}
if (is_chromeos) {
deps += [
"chromeos:closure_compile",
"md_user_manager:closure_compile",
"welcome/dice_welcome:closure_compile",
]
}
if (enable_extensions) {
deps += [ "md_extensions:closure_compile" ]
}
if (is_android) {
deps += [
"eoc_internals:closure_compile",
"offline_pages:closure_compile",
"snippets_internals:closure_compile",
"webapks:closure_compile",
]
}
}
}
grit("invalidations_resources") {
source = "invalidations_resources.grd"
defines = chrome_grit_defines
outputs = [
"grit/invalidations_resources.h",
"invalidations_resources.pak",
]
output_dir = "$root_gen_dir/chrome"
}
grit("net_internals_resources") {
source = "net_internals_resources.grd"
defines = chrome_grit_defines
outputs = [
"grit/net_internals_resources.h",
"net_internals_resources.pak",
]
output_dir = "$root_gen_dir/chrome"
}
grit("quota_internals_resources") {
source = "quota_internals_resources.grd"
defines = chrome_grit_defines
outputs = [
"grit/quota_internals_resources.h",
"quota_internals_resources.pak",
]
output_dir = "$root_gen_dir/chrome"
}
grit("task_scheduler_internals_resources") {
source = "task_scheduler_internals/resources.grd"
defines = chrome_grit_defines
outputs = [
"grit/task_scheduler_internals_resources.h",
"task_scheduler_internals_resources.pak",
]
output_dir = "$root_gen_dir/chrome"
}
grit("translate_internals_resources") {
source = "translate_internals_resources.grd"
defines = chrome_grit_defines
outputs = [
"grit/translate_internals_resources.h",
"translate_internals_resources.pak",
]
output_dir = "$root_gen_dir/chrome"
}
grit("webapks_ui_resources") {
source = "webapks_ui_resources.grd"
defines = chrome_grit_defines
outputs = [
"grit/webapks_ui_resources.h",
"webapks_ui_resources.pak",
]
output_dir = "$root_gen_dir/chrome"
}
if (!is_android) {
grit("component_extension_resources") {
source = "component_extension_resources.grd"
defines = chrome_grit_defines
if (enable_hangout_services_extension) {
defines += [ "enable_hangout_services_extension" ]
}
outputs = [
"grit/component_extension_resources.h",
"grit/component_extension_resources_map.cc",
"grit/component_extension_resources_map.h",
"component_extension_resources.pak",
]
output_dir = "$root_gen_dir/chrome"
}
grit("settings_resources") {
if (optimize_webui) {
source = "settings/settings_resources_vulcanized.grd"
# The .grd contains references to generated files.
source_is_generated = true
deps = [
"//chrome/browser/resources/settings:build",
]
grit_flags = [
"-E",
"root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir),
]
} else {
source = "settings/settings_resources.grd"
}
defines = chrome_grit_defines
outputs = [
"grit/settings_resources.h",
"grit/settings_resources_map.cc",
"grit/settings_resources_map.h",
"settings_resources.pak",
]
output_dir = "$root_gen_dir/chrome"
}
}
if (enable_extensions) {
grit("extensions_resources") {
if (optimize_webui) {
source = "md_extensions/extensions_resources_vulcanized.grd"
# The .grd contains references to generated files.
source_is_generated = true
deps = [
"//chrome/browser/resources/md_extensions:build",
]
grit_flags = [
"-E",
"root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir),
]
} else {
source = "md_extensions/extensions_resources.grd"
}
defines = chrome_grit_defines
outputs = [
"grit/extensions_resources.h",
"grit/extensions_resources_map.cc",
"grit/extensions_resources_map.h",
"extensions_resources.pak",
]
output_dir = "$root_gen_dir/chrome"
}
grit("sync_file_system_internals_resources") {
source = "sync_file_system_internals_resources.grd"
defines = chrome_grit_defines
outputs = [
"grit/sync_file_system_internals_resources.h",
"sync_file_system_internals_resources.pak",
]
output_dir = "$root_gen_dir/chrome"
}
}
if (enable_print_preview) {
grit("print_preview_resources") {
if (optimize_webui) {
source = "print_preview/print_preview_resources_vulcanized.grd"
# The .grd contains references to generated files.
source_is_generated = true
deps = [
"//chrome/browser/resources/print_preview:build",
]
grit_flags = [
"-E",
"root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir),
]
} else {
source = "print_preview/print_preview_resources.grd"
}
defines = chrome_grit_defines
outputs = [
"grit/print_preview_resources.h",
"grit/print_preview_resources_map.cc",
"grit/print_preview_resources_map.h",
"print_preview_resources.pak",
]
output_dir = "$root_gen_dir/chrome"
}
}