• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2023 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/ohos.gni")
15import("//foundation/distributeddatamgr/pasteboard/pasteboard.gni")
16
17ohos_shared_library("pasteboard_napi") {
18  branch_protector_ret = "pac_ret"
19  sanitize = {
20    integer_overflow = true
21    ubsan = true
22    boundary_sanitize = true
23    cfi = true
24    cfi_cross_dso = true
25    debug = false
26  }
27  include_dirs = [
28    "${pasteboard_innerkits_path}/include",
29    "//foundation/distributeddatamgr/pasteboard/framework/tlv",
30    "//foundation/distributeddatamgr/pasteboard/framework/uri",
31    "napi/include",
32    "${pasteboard_utils_path}/native/include",
33  ]
34
35  cflags = [
36    "-fPIC",
37    "-g3",
38  ]
39
40  cflags_cc = [
41    "-fstack-protector",
42    "-D_FORTIFY_SOURCE=2",
43    "-O2",
44  ]
45
46  sources = [
47    "napi/src/async_call.cpp",
48    "napi/src/napi_data_utils.cpp",
49    "napi/src/napi_init.cpp",
50    "napi/src/napi_pasteboard.cpp",
51    "napi/src/napi_pasteboard_common.cpp",
52    "napi/src/napi_pasteboard_progress_signal.cpp",
53    "napi/src/napi_pastedata.cpp",
54    "napi/src/napi_pastedata_record.cpp",
55    "napi/src/napi_systempasteboard.cpp",
56  ]
57
58  deps = [
59    "${pasteboard_framework_path}:pasteboard_framework",
60    "${pasteboard_root_path}/framework/innerkits:pasteboard_client",
61  ]
62
63  external_deps = [
64    "ability_base:want",
65    "ability_base:zuri",
66    "ability_runtime:napi_common",
67    "c_utils:utils",
68    "ffrt:libffrt",
69    "hilog:libhilog",
70    "image_framework:image",
71    "ipc:ipc_single",
72    "libuv:uv",
73    "napi:ace_napi",
74    "udmf:udmf_client",
75    "udmf:udmf_data_napi",
76  ]
77
78  relative_install_dir = "module"
79
80  subsystem_name = "distributeddatamgr"
81  part_name = "pasteboard"
82}
83