1# Copyright (c) 2024 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_ndk_config") {
19  visibility = [ ":*" ]
20  include_dirs = []
21
22  cflags_cc += [ "-fno-exceptions" ]
23}
24ohos_shared_library("ohprint") {
25  include_dirs = [
26    "${print_path}/frameworks/ohprint/include",
27    "${print_utils_path}/include",
28    "${print_path}/frameworks/helper/print_helper/include",
29    "${print_path}/frameworks/models/print_models/include",
30    "${print_path}/services/print_service/include",
31  ]
32  public_configs = [ ":print_ndk_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/print_capi.cpp",
46    "src/print_converter.cpp",
47    "src/print_helper.cpp",
48  ]
49
50  deps = [
51    "${print_path}/frameworks/helper/print_helper:print_helper",
52    "${print_path}/frameworks/innerkitsimpl/print_impl:print_client",
53    "${print_path}/frameworks/models/print_models:print_models",
54    "${print_path}/services/print_service:print_service",
55  ]
56
57  external_deps = [
58    "ability_base:base",
59    "ability_base:want",
60    "ability_base:zuri",
61    "ability_runtime:ability_context_native",
62    "ability_runtime:ability_manager",
63    "ability_runtime:abilitykit_native",
64    "ability_runtime:data_ability_helper",
65    "ability_runtime:napi_base_context",
66    "ability_runtime:ui_extension",
67    "access_token:libaccesstoken_sdk",
68    "bundle_framework:appexecfwk_base",
69    "bundle_framework:appexecfwk_core",
70    "c_utils:utils",
71    "common_event_service:cesfwk_innerkits",
72    "eventhandler:libeventhandler",
73    "hilog:libhilog",
74    "hisysevent:libhisysevent",
75    "init:libbegetutil",
76    "ipc:ipc_core",
77    "napi:ace_napi",
78    "os_account:os_account_innerkits",
79    "safwk:system_ability_fwk",
80    "samgr:samgr_proxy",
81  ]
82
83  if (build_variant == "user") {
84    cflags_cc += [ "-DIS_RELEASE_VERSION" ]
85  }
86
87  relative_install_dir = "ndk"
88  output_name = "ohprint"
89  output_extension = "so"
90
91  install_enable = true
92  subsystem_name = "print"
93  part_name = "print_fwk"
94}
95