• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2024 Huawei Technologies Co., Ltd
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14# ============================================================================
15import("//build/ohos.gni")
16
17action("flatbuffers_install_action") {
18  script = "//third_party/flatbuffers/install.py"
19  outputs = [
20    "${target_gen_dir}/flatbuffers/include/flatbuffers/allocator.h",
21    "${target_gen_dir}/flatbuffers/include/flatbuffers/array.h",
22    "${target_gen_dir}/flatbuffers/include/flatbuffers/base.h",
23    "${target_gen_dir}/flatbuffers/include/flatbuffers/buffer.h",
24    "${target_gen_dir}/flatbuffers/include/flatbuffers/buffer_ref.h",
25    "${target_gen_dir}/flatbuffers/include/flatbuffers/code_generator.h",
26    "${target_gen_dir}/flatbuffers/include/flatbuffers/code_generators.h",
27    "${target_gen_dir}/flatbuffers/include/flatbuffers/default_allocator.h",
28    "${target_gen_dir}/flatbuffers/include/flatbuffers/detached_buffer.h",
29    "${target_gen_dir}/flatbuffers/include/flatbuffers/file_manager.h",
30    "${target_gen_dir}/flatbuffers/include/flatbuffers/flatbuffer_builder.h",
31    "${target_gen_dir}/flatbuffers/include/flatbuffers/flatbuffers.h",
32    "${target_gen_dir}/flatbuffers/include/flatbuffers/flatc.h",
33    "${target_gen_dir}/flatbuffers/include/flatbuffers/flex_flat_util.h",
34    "${target_gen_dir}/flatbuffers/include/flatbuffers/flexbuffers.h",
35    "${target_gen_dir}/flatbuffers/include/flatbuffers/grpc.h",
36    "${target_gen_dir}/flatbuffers/include/flatbuffers/hash.h",
37    "${target_gen_dir}/flatbuffers/include/flatbuffers/idl.h",
38    "${target_gen_dir}/flatbuffers/include/flatbuffers/minireflect.h",
39    "${target_gen_dir}/flatbuffers/include/flatbuffers/reflection.h",
40    "${target_gen_dir}/flatbuffers/include/flatbuffers/reflection_generated.h",
41    "${target_gen_dir}/flatbuffers/include/flatbuffers/registry.h",
42    "${target_gen_dir}/flatbuffers/include/flatbuffers/stl_emulation.h",
43    "${target_gen_dir}/flatbuffers/include/flatbuffers/string.h",
44    "${target_gen_dir}/flatbuffers/include/flatbuffers/struct.h",
45    "${target_gen_dir}/flatbuffers/include/flatbuffers/table.h",
46    "${target_gen_dir}/flatbuffers/include/flatbuffers/util.h",
47    "${target_gen_dir}/flatbuffers/include/flatbuffers/vector.h",
48    "${target_gen_dir}/flatbuffers/include/flatbuffers/vector_downward.h",
49    "${target_gen_dir}/flatbuffers/include/flatbuffers/verifier.h",
50  ]
51  inputs = [ "//third_party/flatbuffers/include/flatbuffers/allocator.h" ]
52  args = []
53  args = [
54    "--gen-dir",
55    rebase_path("${target_gen_dir}", root_build_dir),
56    "--source-dir",
57    rebase_path("//third_party/flatbuffers"),
58  ]
59}
60
61ohos_static_library("libflatbuffers_static") {
62  deps = [ ":flatbuffers_install_action" ]
63  part_name = "flatbuffers"
64  subsystem_name = "thirdparty"
65}
66