• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 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.
13import("//base/print/print_fwk/print.gni")
14import("//build/ohos.gni")
15
16cflags_cc = []
17
18config("scan_interfaces_kits_napi_config") {
19  visibility = [ ":*" ]
20  include_dirs = [ "include" ]
21
22  cflags_cc += [
23    "-fno-exceptions",
24    "-fdata-sections",
25    "-ffunction-sections",
26    "-fno-asynchronous-unwind-tables",
27    "-fno-unwind-tables",
28    "-flto",
29    "-Os",
30  ]
31}
32
33ohos_shared_library("scan_client") {
34  include_dirs = [
35    "${print_utils_path}/include",
36    "${print_path}/frameworks/helper/scan_helper/include",
37  ]
38
39  public_configs = [ ":scan_interfaces_kits_napi_config" ]
40
41  branch_protector_ret = "pac_ret"
42  sanitize = {
43    cfi = true
44    cfi_cross_dso = true
45    boundary_sanitize = true
46    debug = false
47    integer_overflow = true
48    ubsan = true
49  }
50
51  sources = [
52    "src/scan_callback.cpp",
53    "src/scan_callback_stub.cpp",
54    "src/scan_manager_client.cpp",
55    "src/scan_sa_death_recipient.cpp",
56    "src/scan_service_proxy.cpp",
57    "src/scan_sync_load_callback.cpp",
58  ]
59
60  deps = [
61    "${print_path}/frameworks/helper/scan_helper:scan_helper",
62    "${print_path}/frameworks/models/scan_models:scan_models"
63   ]
64
65  external_deps = [
66    "ability_base:want",
67    "ability_base:zuri",
68    "ability_runtime:ability_manager",
69    "ability_runtime:abilitykit_native",
70    "ability_runtime:data_ability_helper",
71    "ability_runtime:napi_base_context",
72    "c_utils:utils",
73    "common_event_service:cesfwk_innerkits",
74    "eventhandler:libeventhandler",
75    "hilog:libhilog",
76    "ipc:ipc_core",
77    "napi:ace_napi",
78    "samgr:samgr_proxy",
79  ]
80
81  if (build_variant == "user") {
82    cflags_cc += [ "-DIS_RELEASE_VERSION" ]
83  }
84
85  #relative_install_dir = "module"
86  install_enable = true
87  subsystem_name = "print"
88  innerapi_tags = [ "platformsdk" ]
89  part_name = "print_fwk"
90}
91