| Index: tools/gn/functions_target.cc
|
| diff --git a/tools/gn/functions_target.cc b/tools/gn/functions_target.cc
|
| index b04fea8b0f49d56c9121ac9b7432f27aad272751..a264db862fc0347baad1407a3a64877922095e5a 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,34 @@ 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 \"bundle_data\" files.";
|
| +const char kCopyBundleData_Help[] =
|
| + "copy_bundle_data: Declare a target that \"bundle_data\" files.\n"
|
| + "\n"
|
| + "Similar to the \"copy\" target, but the list of file to copy comes from\n"
|
| + "the \"bundle_data\" property of all dependent targets (recursively). It\n"
|
| + "can be used to copy files required at runtime by the application into a\n"
|
| + "location where it can be found.\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";
|
|
|