Index: build/json_schema_api.gni |
diff --git a/build/json_schema_api.gni b/build/json_schema_api.gni |
index aa6365b948ee505484650961634ee9aee2c35055..e1c2d33409d52ad4d92f6e233e3ce31f84789574 100644 |
--- a/build/json_schema_api.gni |
+++ b/build/json_schema_api.gni |
@@ -154,7 +154,9 @@ template("json_schema_api") { |
assert(defined(invoker.impl_dir), |
"\"impl_dir\" must be defined for the $target_name template.") |
- impl_dir = invoker.impl_dir |
+ |
+ # Child directory inside the generated file tree. |
+ gen_child_dir = rebase_path(invoker.impl_dir, "//") |
bundle_generator_registration_name = |
target_name + "_bundle_generator_registration" |
@@ -162,15 +164,15 @@ template("json_schema_api") { |
script = compiler_script |
inputs = compiler_sources + invoker.sources + uncompiled_sources |
outputs = [ |
- "$root_gen_dir/$impl_dir/generated_api_registration.cc", |
- "$root_gen_dir/$impl_dir/generated_api_registration.h", |
+ "$root_gen_dir/$gen_child_dir/generated_api_registration.cc", |
+ "$root_gen_dir/$gen_child_dir/generated_api_registration.h", |
] |
args = [ |
"--root=" + rebase_path("//", root_build_dir), |
"--destdir=" + rebase_path(root_gen_dir, root_build_dir), |
"--namespace=$root_namespace", |
"--generator=cpp-bundle-registration", |
- "--impl-dir=" + rebase_path(impl_dir, "//"), |
+ "--impl-dir=$gen_child_dir", |
"--include-rules=$schema_include_rules", |
] + rebase_path(invoker.sources, root_build_dir) + |
rebase_path(uncompiled_sources, root_build_dir) |