• 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/ohos.gni")
15import("//foundation/distributeddatamgr/pasteboard/pasteboard.gni")
16
17ohos_shared_library("pasteboard_adapter") {
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
28  include_dirs = [
29    "${pasteboard_framework_path}/include",
30    "${pasteboard_utils_path}/native/include",
31    "include",
32  ]
33
34  sources = []
35
36  external_deps = []
37
38  if (pasteboard_device_info_manager_part_enabled) {
39    sources += [
40      "src/device_profile_adapter.cpp",
41      "src/device_profile_client.cpp",
42    ]
43
44    external_deps += [
45      "cJSON:cjson",
46      "c_utils:utils",
47      "device_info_manager:distributed_device_profile_common",
48      "device_info_manager:distributed_device_profile_sdk",
49      "hilog:libhilog",
50      "ipc:ipc_single",
51      "samgr:samgr_proxy",
52    ]
53  }
54
55  cflags = [
56    "-fvisibility=hidden",
57    "-Wno-multichar",
58    "-O2",
59  ]
60  cflags_cc = [
61    "-fvisibility=hidden",
62    "-D_FORTIFY_SOURCE=2",
63    "-O2",
64  ]
65
66  subsystem_name = "distributeddatamgr"
67  part_name = "pasteboard"
68}
69