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_models_config") {
19  visibility = [ ":*" ]
20  include_dirs = [ "include" ]
21
22  cflags_cc += [ "-fexceptions" ]
23}
24ohos_shared_library("print_models") {
25  include_dirs = [ "${print_utils_path}/include" ]
26  public_configs = [ ":print_models_config" ]
27
28  branch_protector_ret = "pac_ret"
29  sanitize = {
30    cfi = true
31    cfi_cross_dso = true
32    boundary_sanitize = true
33    debug = false
34    integer_overflow = true
35    ubsan = true
36  }
37
38  sources = [
39    "src/print_attributes.cpp",
40    "src/print_extension_info.cpp",
41    "src/print_job.cpp",
42    "src/print_margin.cpp",
43    "src/print_page_size.cpp",
44    "src/print_preview_attribute.cpp",
45    "src/print_range.cpp",
46    "src/print_resolution.cpp",
47    "src/print_utils.cpp",
48    "src/printer_capability.cpp",
49    "src/printer_info.cpp",
50  ]
51
52  external_deps = [
53    "ability_base:want",
54    "ability_base:zuri",
55    "ability_runtime:ability_manager",
56    "ability_runtime:abilitykit_native",
57    "ability_runtime:data_ability_helper",
58    "ability_runtime:napi_base_context",
59    "bundle_framework:appexecfwk_core",
60    "c_utils:utils",
61    "common_event_service:cesfwk_innerkits",
62    "eventhandler:libeventhandler",
63    "hilog:libhilog",
64    "ipc:ipc_core",
65    "napi:ace_napi",
66    "samgr:samgr_proxy",
67  ]
68
69  if (build_variant == "user") {
70    cflags_cc += [ "-DIS_RELEASE_VERSION" ]
71  }
72
73  install_enable = true
74  subsystem_name = "print"
75  innerapi_tags = [ "platformsdk" ]
76  part_name = "print_fwk"
77}
78