• 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("print_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}
32ohos_shared_library("print_client") {
33  include_dirs = [
34    "//third_party/node/src",
35    "//third_party/curl/include",
36    "${print_utils_path}/include",
37    "${print_path}/frameworks/helper/print_helper/include",
38    "${print_path}/frameworks/models/print_models/include",
39  ]
40  public_configs = [ ":print_interfaces_kits_napi_config" ]
41
42  branch_protector_ret = "pac_ret"
43  sanitize = {
44    cfi = true
45    cfi_cross_dso = true
46    boundary_sanitize = true
47    debug = false
48    integer_overflow = true
49    ubsan = true
50  }
51
52  sources = [
53    "src/iprint_adapter.cpp",
54    "src/iprint_adapter_inner.cpp",
55    "src/print_callback.cpp",
56    "src/print_callback_stub.cpp",
57    "src/print_extension_callback_stub.cpp",
58    "src/print_innerkit_modal_ui_callback.cpp",
59    "src/print_manager_client.cpp",
60    "src/print_sa_death_recipient.cpp",
61    "src/print_service_proxy.cpp",
62    "src/print_sync_load_callback.cpp",
63  ]
64
65  deps = [
66    "${print_path}/frameworks/helper/print_helper:print_helper",
67    "${print_path}/frameworks/models/print_models:print_models",
68  ]
69  external_deps = [
70    "ability_base:want",
71    "ability_base:zuri",
72    "ability_runtime:ability_manager",
73    "ability_runtime:abilitykit_native",
74    "ability_runtime:data_ability_helper",
75    "ability_runtime:napi_base_context",
76    "ability_runtime:ui_extension",
77    "ace_engine:ace_uicontent",
78    "c_utils:utils",
79    "common_event_service:cesfwk_innerkits",
80    "eventhandler:libeventhandler",
81    "hilog:libhilog",
82    "ipc:ipc_core",
83    "napi:ace_napi",
84    "samgr:samgr_proxy",
85  ]
86
87  if (build_variant == "user") {
88    cflags_cc += [ "-DIS_RELEASE_VERSION" ]
89  }
90
91  #relative_install_dir = "module"
92  install_enable = true
93  subsystem_name = "print"
94  innerapi_tags = [ "platformsdk" ]
95  part_name = "print_fwk"
96}
97