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_client") {
25  include_dirs = [
26    "//third_party/node/src",
27    "//third_party/curl/include",
28    "${print_utils_path}/include",
29    "${print_path}/frameworks/helper/print_helper/include",
30    "${print_path}/frameworks/models/print_models/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/iprint_adapter.cpp",
46    "src/iprint_adapter_inner.cpp",
47    "src/print_callback.cpp",
48    "src/print_callback_stub.cpp",
49    "src/print_extension_callback_stub.cpp",
50    "src/print_innerkit_modal_ui_callback.cpp",
51    "src/print_manager_client.cpp",
52    "src/print_sa_death_recipient.cpp",
53    "src/print_service_proxy.cpp",
54    "src/print_sync_load_callback.cpp",
55  ]
56
57  deps = [
58    "${print_path}/frameworks/helper/print_helper:print_helper",
59    "${print_path}/frameworks/models/print_models:print_models",
60  ]
61  external_deps = [
62    "ability_base:want",
63    "ability_base:zuri",
64    "ability_runtime:ability_manager",
65    "ability_runtime:abilitykit_native",
66    "ability_runtime:data_ability_helper",
67    "ability_runtime:napi_base_context",
68    "ability_runtime:ui_extension",
69    "ace_engine:ace_uicontent",
70    "c_utils:utils",
71    "common_event_service:cesfwk_innerkits",
72    "eventhandler:libeventhandler",
73    "hilog:libhilog",
74    "ipc:ipc_core",
75    "napi:ace_napi",
76    "samgr:samgr_proxy",
77  ]
78
79  if (build_variant == "user") {
80    cflags_cc += [ "-DIS_RELEASE_VERSION" ]
81  }
82
83  #relative_install_dir = "module"
84  install_enable = true
85  subsystem_name = "print"
86  innerapi_tags = [ "platformsdk" ]
87  part_name = "print_fwk"
88}
89