10826e83eSopenharmony_ci# Copyright (c) 2022 Huawei Device Co., Ltd. 20826e83eSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 30826e83eSopenharmony_ci# you may not use this file except in compliance with the License. 40826e83eSopenharmony_ci# You may obtain a copy of the License at 50826e83eSopenharmony_ci# 60826e83eSopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 70826e83eSopenharmony_ci# 80826e83eSopenharmony_ci# Unless required by applicable law or agreed to in writing, software 90826e83eSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 100826e83eSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 110826e83eSopenharmony_ci# See the License for the specific language governing permissions and 120826e83eSopenharmony_ci# limitations under the License. 130826e83eSopenharmony_ci 140826e83eSopenharmony_ciimport("//build/ohos.gni") 150826e83eSopenharmony_ci 160826e83eSopenharmony_ciaction("proto_gen") { 170826e83eSopenharmony_ci script = "protoc_runner.py" 180826e83eSopenharmony_ci 190826e83eSopenharmony_ci sources = [ "web_download.proto" ] 200826e83eSopenharmony_ci 210826e83eSopenharmony_ci proto_in_dir = rebase_path(".", root_build_dir) 220826e83eSopenharmony_ci output_dir = rebase_path("$target_gen_dir", root_build_dir) 230826e83eSopenharmony_ci 240826e83eSopenharmony_ci args = sources 250826e83eSopenharmony_ci args += [ 260826e83eSopenharmony_ci "--protoc=clang_x64/thirdparty/protobuf/protoc", 270826e83eSopenharmony_ci "--cpp-out=$output_dir", 280826e83eSopenharmony_ci "--protos-dir=$proto_in_dir", 290826e83eSopenharmony_ci ] 300826e83eSopenharmony_ci 310826e83eSopenharmony_ci outputs = [ 320826e83eSopenharmony_ci "$target_gen_dir/web_download.pb.cc", 330826e83eSopenharmony_ci "$target_gen_dir/web_download.pb.h", 340826e83eSopenharmony_ci ] 350826e83eSopenharmony_ci 360826e83eSopenharmony_ci external_deps = [ "protobuf:protoc($host_toolchain)" ] 370826e83eSopenharmony_ci} 38