• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2025 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/config/components/ets_frontend/ets2abc_config.gni")
15import("//build/ohos.gni")
16import("//foundation/distributeddatamgr/pasteboard/pasteboard.gni")
17
18config("ani_config") {
19  include_dirs = [
20    "${pasteboard_innerkits_path}/include",
21    "${pasteboard_utils_path}/native/include",
22    "${pasteboard_interfaces_path}/ani/include",
23  ]
24}
25
26group("pasteboard_ani_package") {
27  deps = [
28    ":pasteboard_abc_etc",
29    ":pasteboard_ani",
30  ]
31}
32
33ohos_shared_library("pasteboard_ani") {
34  branch_protector_ret = "pac_ret"
35  sanitize = {
36    ubsan = true
37    integer_overflow = true
38    boundary_sanitize = true
39    cfi = true
40    cfi_cross_dso = true
41    debug = false
42  }
43  public_configs = [ ":ani_config" ]
44
45  cflags = [
46    "-fPIC",
47    "-g3",
48  ]
49
50  cflags_cc = [
51    "-D_FORTIFY_SOURCE=2",
52    "-O2",
53  ]
54
55  sources = [ "src/pasteboard_ani.cpp" ]
56  part_name = "pasteboard"
57  subsystem_name = "distributeddatamgr"
58  output_extension = "so"
59  external_deps = [
60    "ability_base:want",
61    "ability_base:zuri",
62    "ability_runtime:ani_common",
63    "ability_runtime:runtime",
64    "ability_runtime:ets_environment",
65    "c_utils:utils",
66    "hilog:libhilog",
67    "image_framework:image",
68    "image_framework:image_ani",
69    "ipc:ipc_single",
70    "runtime_core:ani",
71    "udmf:udmf_client",
72  ]
73  deps = [
74    "${pasteboard_innerkits_path}:pasteboard_client",
75    "${pasteboard_innerkits_path}:pasteboard_data",
76  ]
77}
78
79generate_static_abc("pasteboard_abc") {
80  base_url = "./ets"
81  files = [ "./ets/@ohos.pasteboard.ets" ]
82  dst_file = "$target_out_dir/pasteboard_ani.abc"
83  out_puts = [ "$target_out_dir/pasteboard_ani.abc" ]
84  is_boot_abc = "True"
85  device_dst_file = "/system/framework/pasteboard_ani.abc"
86}
87
88ohos_prebuilt_etc("pasteboard_abc_etc") {
89  source = "$target_out_dir/pasteboard_ani.abc"
90  module_install_dir = "framework"
91  subsystem_name = "distributeddatamgr"
92  part_name = "pasteboard"
93  deps = [ ":pasteboard_abc" ]
94}
95