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("scan_interfaces_kits_napi_config") { 19 visibility = [ ":*" ] 20 include_dirs = [ "include" ] 21 22 cflags_cc += [ "-fexceptions" ] 23} 24 25ohos_shared_library("scan_napi") { 26 include_dirs = [ 27 "${print_utils_path}/include", 28 "${print_path}/frameworks/innerkitsimpl/scan_impl/include", 29 "${print_path}/frameworks/helper/scan_helper/include", 30 ] 31 public_configs = [ ":scan_interfaces_kits_napi_config" ] 32 33 branch_protector_ret = "pac_ret" 34 sanitize = { 35 cfi = true 36 cfi_cross_dso = true 37 boundary_sanitize = true 38 debug = false 39 integer_overflow = true 40 ubsan = true 41 } 42 43 sources = [ 44 "src/napi_inner_scan.cpp", 45 "src/scan_async_call.cpp", 46 "src/scan_module.cpp", 47 ] 48 49 deps = [ 50 "${print_path}/frameworks/helper/scan_helper:scan_helper", 51 "${print_path}/frameworks/innerkitsimpl/scan_impl:scan_client", 52 ] 53 54 external_deps = [ 55 "ability_base:want", 56 "ability_base:zuri", 57 "ability_runtime:ability_manager", 58 "ability_runtime:abilitykit_native", 59 "ability_runtime:data_ability_helper", 60 "ability_runtime:napi_base_context", 61 "c_utils:utils", 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 relative_install_dir = "module" 74 subsystem_name = "print" 75 part_name = "print_fwk" 76} 77