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 += [ 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("scan_helper") { 33 include_dirs = [ 34 "${print_path}/frameworks/innerkitsimpl/scan_impl/include", 35 "${print_utils_path}/include", 36 ] 37 public_configs = [ ":scan_interfaces_kits_napi_config" ] 38 39 branch_protector_ret = "pac_ret" 40 sanitize = { 41 cfi = true 42 cfi_cross_dso = true 43 boundary_sanitize = true 44 debug = false 45 integer_overflow = true 46 ubsan = true 47 } 48 49 if (debug_enable) { 50 cflags_cc += [ "-DDEBUG_ENABLE" ] 51 } 52 53 sources = [ 54 "src/napi_scan_utils.cpp", 55 "src/scan_option_descriptor.cpp", 56 "src/scan_option_descriptor_helper.cpp", 57 "src/scan_option_value.cpp", 58 "src/scan_option_value_helper.cpp", 59 "src/scan_parameters.cpp", 60 "src/scan_parameters_helper.cpp", 61 "src/scan_progress.cpp", 62 "src/scan_progress_helper.cpp", 63 "src/scan_range.cpp", 64 "src/scan_range_helper.cpp", 65 "src/scanner_info.cpp", 66 "src/scanner_info_helper.cpp", 67 ] 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 "c_utils:utils", 77 "common_event_service:cesfwk_innerkits", 78 "eventhandler:libeventhandler", 79 "hilog:libhilog", 80 "input:libmmi-client", 81 "ipc:ipc_core", 82 "napi:ace_napi", 83 "samgr:samgr_proxy", 84 ] 85 86 if (build_variant == "user") { 87 cflags_cc += [ "-DIS_RELEASE_VERSION" ] 88 } 89 90 #relative_install_dir = "module" 91 install_enable = true 92 subsystem_name = "print" 93 innerapi_tags = [ "platformsdk" ] 94 part_name = "print_fwk" 95} 96