• 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_models_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}
32ohos_shared_library("scan_models") {
33  include_dirs = [ "${print_utils_path}/include" ]
34  public_configs = [ ":scan_models_config" ]
35
36  branch_protector_ret = "pac_ret"
37  sanitize = {
38    cfi = true
39    cfi_cross_dso = true
40    boundary_sanitize = true
41    debug = false
42    integer_overflow = true
43    ubsan = true
44  }
45
46  sources = [
47    "src/scan_option_descriptor.cpp",
48    "src/scan_option_value.cpp",
49    "src/scan_parameters.cpp",
50    "src/scan_progress.cpp",
51    "src/scan_range.cpp",
52    "src/scanner_info.cpp",
53  ]
54
55  external_deps = [
56    "ability_base:want",
57    "ability_base:zuri",
58    "ability_runtime:ability_manager",
59    "ability_runtime:abilitykit_native",
60    "ability_runtime:data_ability_helper",
61    "ability_runtime:napi_base_context",
62    "bundle_framework:appexecfwk_core",
63    "c_utils:utils",
64    "common_event_service:cesfwk_innerkits",
65    "eventhandler:libeventhandler",
66    "hilog:libhilog",
67    "input:libmmi-client",
68    "ipc:ipc_core",
69    "jsoncpp:jsoncpp",
70    "napi:ace_napi",
71    "samgr:samgr_proxy",
72  ]
73
74  if (build_variant == "user") {
75    cflags_cc += [ "-DIS_RELEASE_VERSION" ]
76  }
77
78  install_enable = true
79  subsystem_name = "print"
80  innerapi_tags = [ "platformsdk" ]
81  part_name = "print_fwk"
82}
83