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("print_interfaces_kits_napi_config") {
19  visibility = [ ":*" ]
20  include_dirs = [ "include" ]
21
22  cflags_cc += [ "-fno-exceptions" ]
23}
24ohos_shared_library("print_helper") {
25  include_dirs = [
26    "//third_party/node/src",
27    "//third_party/curl/include",
28    "${print_path}/frameworks/innerkitsimpl/print_impl/include",
29    "${print_path}/frameworks/models/print_models/include",
30    "${print_utils_path}/include",
31  ]
32  public_configs = [ ":print_interfaces_kits_napi_config" ]
33
34  branch_protector_ret = "pac_ret"
35  sanitize = {
36    cfi = true
37    cfi_cross_dso = true
38    boundary_sanitize = true
39    debug = false
40    integer_overflow = true
41    ubsan = true
42  }
43
44  sources = [
45    "src/napi_print_utils.cpp",
46    "src/print_attributes_helper.cpp",
47    "src/print_extension_info_helper.cpp",
48    "src/print_job_helper.cpp",
49    "src/print_margin_helper.cpp",
50    "src/print_page_size_helper.cpp",
51    "src/print_preview_attribute_helper.cpp",
52    "src/print_range_helper.cpp",
53    "src/print_resolution_helper.cpp",
54    "src/printer_capability_helper.cpp",
55    "src/printer_info_helper.cpp",
56  ]
57  deps = [ "${print_path}/frameworks/models/print_models:print_models" ]
58
59  external_deps = [
60    "ability_base:want",
61    "ability_base:zuri",
62    "ability_runtime:ability_manager",
63    "ability_runtime:abilitykit_native",
64    "ability_runtime:data_ability_helper",
65    "ability_runtime:napi_base_context",
66    "c_utils:utils",
67    "common_event_service:cesfwk_innerkits",
68    "eventhandler:libeventhandler",
69    "hilog:libhilog",
70    "ipc:ipc_core",
71    "napi:ace_napi",
72    "samgr:samgr_proxy",
73  ]
74
75  if (build_variant == "user") {
76    cflags_cc += [ "-DIS_RELEASE_VERSION" ]
77  }
78
79  #relative_install_dir = "module"
80  install_enable = true
81  subsystem_name = "print"
82  innerapi_tags = [ "platformsdk" ]
83  part_name = "print_fwk"
84}
85