| Index: build/json_schema_api.gni
|
| diff --git a/build/json_schema_api.gni b/build/json_schema_api.gni
|
| index e1c2d33409d52ad4d92f6e233e3ce31f84789574..479897a6999fb33cfbb7a9ca56a9bfc6674e6486 100644
|
| --- a/build/json_schema_api.gni
|
| +++ b/build/json_schema_api.gni
|
| @@ -16,6 +16,11 @@
|
| # namespace for each API. Use %(namespace)s to replace with the API
|
| # namespace, like "toplevel::%(namespace)s_api".
|
| #
|
| +# bundle_name [optional]:
|
| +# A string to prepend to generated bundle class names, so that multiple
|
| +# bundle rules can be used without conflicting. Only used with one of
|
| +# the cpp-bundle generators.
|
| +#
|
| # schema_include_rules [optional]
|
| # A list of paths to include when searching for referenced objects,
|
| # with the namespace separated by a :.
|
| @@ -63,6 +68,11 @@ template("json_schema_api") {
|
| bundle_registration =
|
| defined(invoker.bundle_registration) && invoker.bundle_registration
|
|
|
| + bundle_name = ""
|
| + if (defined(invoker.bundle_name)) {
|
| + bundle_name = invoker.bundle_name
|
| + }
|
| +
|
| schema_include_rules = ""
|
| if (defined(invoker.schema_include_rules)) {
|
| schema_include_rules = invoker.schema_include_rules
|
| @@ -86,6 +96,7 @@ template("json_schema_api") {
|
| "$compiler_root/cc_generator.py",
|
| "$compiler_root/code.py",
|
| "$compiler_root/compiler.py",
|
| + "$compiler_root/cpp_bundle_generator.py",
|
| "$compiler_root/cpp_generator.py",
|
| "$compiler_root/cpp_type_generator.py",
|
| "$compiler_root/cpp_util.py",
|
| @@ -139,6 +150,7 @@ template("json_schema_api") {
|
| "--root=" + rebase_path("//", root_build_dir),
|
| "--destdir=" + rebase_path(root_gen_dir, root_build_dir),
|
| "--namespace=$root_namespace",
|
| + "--bundle-name=$bundle_name",
|
| "--generator=cpp-bundle-schema",
|
| "--include-rules=$schema_include_rules",
|
| ] + rebase_path(invoker.sources, root_build_dir) +
|
| @@ -171,6 +183,7 @@ template("json_schema_api") {
|
| "--root=" + rebase_path("//", root_build_dir),
|
| "--destdir=" + rebase_path(root_gen_dir, root_build_dir),
|
| "--namespace=$root_namespace",
|
| + "--bundle-name=$bundle_name",
|
| "--generator=cpp-bundle-registration",
|
| "--impl-dir=$gen_child_dir",
|
| "--include-rules=$schema_include_rules",
|
|
|