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("scan_ndk_config") { 19 visibility = [ ":*" ] 20 include_dirs = [] 21 22 cflags_cc += [ "-fno-exceptions" ] 23} 24 25ohos_shared_library("ohscan") { 26 include_dirs = [ 27 "include", 28 "${print_path}/frameworks/innerkitsimpl/scan_impl/include", 29 "${print_path}/frameworks/helper/scan_helper/include", 30 "${print_utils_path}/include", 31 ] 32 public_configs = [ ":scan_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 = [ "src/ohscan.cpp" ] 45 46 deps = [ 47 "${print_path}/frameworks/helper/scan_helper:scan_helper", 48 "${print_path}/frameworks/innerkitsimpl/scan_impl:scan_client", 49 ] 50 51 external_deps = [ 52 "ability_base:base", 53 "ability_base:want", 54 "ability_base:zuri", 55 "ability_runtime:ability_manager", 56 "ability_runtime:abilitykit_native", 57 "access_token:libaccesstoken_sdk", 58 "bundle_framework:appexecfwk_base", 59 "bundle_framework:appexecfwk_core", 60 "c_utils:utils", 61 "common_event_service:cesfwk_innerkits", 62 "eventhandler:libeventhandler", 63 "hilog:libhilog", 64 "hisysevent:libhisysevent", 65 "init:libbegetutil", 66 "ipc:ipc_core", 67 "napi:ace_napi", 68 "os_account:os_account_innerkits", 69 "safwk:system_ability_fwk", 70 "samgr:samgr_proxy", 71 ] 72 73 if (build_variant == "user") { 74 cflags_cc += [ "-DIS_RELEASE_VERSION" ] 75 } 76 77 relative_install_dir = "ndk" 78 output_name = "ohscan" 79 output_extension = "so" 80 81 install_enable = true 82 subsystem_name = "print" 83 part_name = "print_fwk" 84} 85