diff --git a/BUILD.gn b/BUILD.gn index 3f503cae758e786b05151adcdae94037949e8065..05e562c1839a593df8b7d3b1632bca1db77ac988 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -65,6 +65,7 @@ if (!sdk_build_public) { template("ohos_declaration_template") { forward_variables_from(invoker, "*") + _module_info_target = "/ohos_declaration/${target_name}_info" action_with_pydeps(target_name) { script = "//interface/sdk-js/remove_internal.py" input_api_dir = "//interface/sdk-js/api" @@ -80,8 +81,12 @@ template("ohos_declaration_template") { rebase_path(root_out_dir + "/ohos_declaration/$target_name/", root_build_dir), ] + if (defined(deps)) { + deps += [ ":$_module_info_target" ] + } else { + deps = [ ":$_module_info_target" ] + } } - _module_info_target = "/ohos_declaration/${target_name}_info" _target_name = target_name generate_module_info(_module_info_target) { module_type = "jsdoc"