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_helper") { 33 include_dirs = [ 34 "${print_path}/frameworks/innerkitsimpl/print_impl/include", 35 "${print_path}/frameworks/models/print_models/include", 36 "${print_utils_path}/include", 37 ] 38 public_configs = [ ":print_interfaces_kits_napi_config" ] 39 40 branch_protector_ret = "pac_ret" 41 sanitize = { 42 cfi = true 43 cfi_cross_dso = true 44 boundary_sanitize = true 45 debug = false 46 integer_overflow = true 47 ubsan = true 48 } 49 50 sources = [ 51 "src/napi_print_utils.cpp", 52 "src/print_attributes_helper.cpp", 53 "src/print_extension_info_helper.cpp", 54 "src/print_job_helper.cpp", 55 "src/print_margin_helper.cpp", 56 "src/print_page_size_helper.cpp", 57 "src/print_preview_attribute_helper.cpp", 58 "src/print_range_helper.cpp", 59 "src/print_resolution_helper.cpp", 60 "src/printer_capability_helper.cpp", 61 "src/printer_info_helper.cpp", 62 "src/printer_preferences_helper.cpp", 63 ] 64 deps = [ "${print_path}/frameworks/models/print_models:print_models" ] 65 66 external_deps = [ 67 "ability_base:want", 68 "ability_base:zuri", 69 "ability_runtime:ability_manager", 70 "ability_runtime:abilitykit_native", 71 "ability_runtime:data_ability_helper", 72 "ability_runtime:napi_base_context", 73 "access_token:libaccesstoken_sdk", 74 "access_token:libtokenid_sdk", 75 "c_utils:utils", 76 "common_event_service:cesfwk_innerkits", 77 "eventhandler:libeventhandler", 78 "hilog:libhilog", 79 "input:libmmi-client", 80 "ipc:ipc_core", 81 "napi:ace_napi", 82 "samgr:samgr_proxy", 83 ] 84 85 if (build_variant == "user") { 86 cflags_cc += [ "-DIS_RELEASE_VERSION" ] 87 } 88 89 #relative_install_dir = "module" 90 install_enable = true 91 subsystem_name = "print" 92 innerapi_tags = [ "platformsdk" ] 93 part_name = "print_fwk" 94} 95