| Index: tools/gn/functions_target.cc
|
| diff --git a/tools/gn/functions_target.cc b/tools/gn/functions_target.cc
|
| index b04fea8b0f49d56c9121ac9b7432f27aad272751..33a8a3ee5304270b350a1ee89c5034b377a656ff 100644
|
| --- a/tools/gn/functions_target.cc
|
| +++ b/tools/gn/functions_target.cc
|
| @@ -18,8 +18,9 @@
|
| #define DEPS_VARS \
|
| " Deps: data_deps, deps, public_deps\n"
|
| #define GENERAL_TARGET_VARS \
|
| - " General: check_includes, configs, data, inputs, output_name,\n" \
|
| - " output_extension, public, sources, testonly, visibility\n"
|
| + " General: bundle_data, check_includes, configs, data, inputs,\n" \
|
| + " output_name, output_extension, public, sources, testonly,\n" \
|
| + " visibility\n"
|
|
|
| namespace functions {
|
|
|
| @@ -299,6 +300,36 @@ Value RunCopy(const FunctionCallNode* function,
|
| return Value();
|
| }
|
|
|
| +// copy bundle data ------------------------------------------------------------
|
| +
|
| +const char kCopyBundleData[] = "copy_bundle_data";
|
| +const char kCopyBundleData_HelpShort[] =
|
| + "copy_bundle_data: Declare a target that copy \"bundle_data\" files.";
|
| +const char kCopyBundleData_Help[] =
|
| + "copy_bundle_data: Declare a target that copy \"bundle_data\" files.\n"
|
| + "\n"
|
| + " Similar to the \"copy\" target, but the list of files to copy comes\n"
|
| + " from the \"bundle_data\" property of all dependencies recursively.\n"
|
| + " It can be used to copy files required at runtime by the application\n"
|
| + " into a location where it can be found.\n"
|
| + "\n"
|
| + " This uses the \"copy_bundle_data\" tool from the toolchain.\n"
|
| + "\n"
|
| + " See \"gn help copy\" for more information.\n";
|
| +
|
| +
|
| +Value RunCopyBundleData(const FunctionCallNode* function,
|
| + const std::vector<Value>& args,
|
| + Scope* scope,
|
| + Err* err) {
|
| + if (!EnsureNotProcessingImport(function, scope, err) ||
|
| + !EnsureNotProcessingBuildConfig(function, scope, err))
|
| + return Value();
|
| + TargetGenerator::GenerateTarget(scope, function, args,
|
| + functions::kCopyBundleData, err);
|
| + return Value();
|
| +}
|
| +
|
| // executable ------------------------------------------------------------------
|
|
|
| const char kExecutable[] = "executable";
|
|
|