mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Generate pack header files using GN (issue #1403)
This commit is contained in:
82
BUILD.gn
82
BUILD.gn
@@ -535,13 +535,9 @@ static_library("libcef_static") {
|
||||
]
|
||||
|
||||
deps = [
|
||||
# Generate pack files and make include paths for grit headers discoverable.
|
||||
":pak",
|
||||
":pak_100_percent",
|
||||
":pak_200_percent",
|
||||
":pak_devtools",
|
||||
":pak_extensions",
|
||||
":repack_locales_pack",
|
||||
# Generate pack files and associated CEF header files.
|
||||
":make_pack_header_resources",
|
||||
":make_pack_header_strings",
|
||||
|
||||
# Generate API bindings for extensions.
|
||||
# TODO(cef): Enable if/when CEF exposes its own Mojo APIs. See
|
||||
@@ -849,7 +845,11 @@ static_library("libcef_static") {
|
||||
config("libcef_dll_wrapper_config") {
|
||||
include_dirs = [
|
||||
".",
|
||||
# Source files included in the binary distrib use include paths relative to
|
||||
# the tests directory.
|
||||
"tests",
|
||||
# For generated include headers.
|
||||
"$root_out_dir/includes",
|
||||
]
|
||||
defines = [ "USING_CEF_SHARED" ]
|
||||
}
|
||||
@@ -983,7 +983,10 @@ repack("pak_devtools") {
|
||||
"$root_gen_dir/blink/devtools_resources.pak",
|
||||
]
|
||||
|
||||
deps = [
|
||||
# Use public_deps so that generated grit headers are discoverable from
|
||||
# the libcef_static target. Grit deps that generate .cc files must be
|
||||
# listed both here and in the libcef_static target.
|
||||
public_deps = [
|
||||
"//content/browser/devtools:resources",
|
||||
]
|
||||
|
||||
@@ -1078,6 +1081,69 @@ repack("pak") {
|
||||
output = "$root_out_dir/cef.pak"
|
||||
}
|
||||
|
||||
# Helper for generating pack header files.
|
||||
template("make_pack_header") {
|
||||
assert(defined(invoker.header))
|
||||
assert(defined(invoker.inputs))
|
||||
|
||||
action("make_pack_header_${target_name}") {
|
||||
script = "tools/make_pack_header.py"
|
||||
|
||||
inputs = invoker.inputs
|
||||
outputs = [ invoker.header ]
|
||||
|
||||
args = rebase_path(outputs, root_build_dir) +
|
||||
rebase_path(inputs, root_build_dir)
|
||||
|
||||
deps = [
|
||||
# List all targets that generate pack files here. The grit targets that
|
||||
# generate |inputs| will be picked up via public_deps.
|
||||
":pak",
|
||||
":pak_100_percent",
|
||||
":pak_200_percent",
|
||||
":pak_devtools",
|
||||
":pak_extensions",
|
||||
":repack_locales_pack",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
# Generate cef_pack_resources.h.
|
||||
make_pack_header("resources") {
|
||||
header = "$root_out_dir/includes/include/cef_pack_resources.h"
|
||||
inputs = [
|
||||
"$root_gen_dir/blink/grit/devtools_resources.h",
|
||||
"$root_gen_dir/blink/public/resources/grit/blink_resources.h",
|
||||
"$root_gen_dir/chrome/grit/browser_resources.h",
|
||||
"$root_gen_dir/chrome/grit/common_resources.h",
|
||||
"$root_gen_dir/chrome/grit/component_extension_resources.h",
|
||||
"$root_gen_dir/content/grit/content_resources.h",
|
||||
"$root_gen_dir/extensions/grit/extensions_browser_resources.h",
|
||||
"$root_gen_dir/extensions/grit/extensions_renderer_resources.h",
|
||||
"$root_gen_dir/extensions/grit/extensions_resources.h",
|
||||
"$root_gen_dir/net/grit/net_resources.h",
|
||||
"$root_gen_dir/ui/resources/grit/ui_resources.h",
|
||||
"$root_gen_dir/ui/resources/grit/webui_resources.h",
|
||||
"$root_gen_dir/ui/views/resources/grit/views_resources.h",
|
||||
"$root_gen_dir/cef/grit/cef_resources.h",
|
||||
]
|
||||
}
|
||||
|
||||
# Generate cef_pack_strings.h.
|
||||
make_pack_header("strings") {
|
||||
header = "$root_out_dir/includes/include/cef_pack_strings.h"
|
||||
inputs = [
|
||||
"$root_gen_dir/chrome/grit/generated_resources.h",
|
||||
"$root_gen_dir/chrome/grit/locale_settings.h",
|
||||
"$root_gen_dir/chrome/grit/platform_locale_settings.h",
|
||||
"$root_gen_dir/components/strings/grit/components_strings.h",
|
||||
"$root_gen_dir/content/app/strings/grit/content_strings.h",
|
||||
"$root_gen_dir/extensions/strings/grit/extensions_strings.h",
|
||||
"$root_gen_dir/ui/strings/grit/ui_strings.h",
|
||||
"$root_gen_dir/cef/grit/cef_strings.h",
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# libcef dll/framework target.
|
||||
|
Reference in New Issue
Block a user