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. 13 14import("//base/print/print_fwk/print.gni") 15import("//build/ohos.gni") 16 17cflags_cc = [] 18 19config("scan_service_config") { 20 visibility = [ ":*" ] 21 include_dirs = [ 22 "include", 23 "${print_path}/frameworks/helper/scan_helper/include", 24 ] 25 26 cflags_cc += [ "-fexceptions" ] 27} 28 29ohos_shared_library("scan_service") { 30 sources = [ 31 "src/scan_callback_proxy.cpp", 32 "src/scan_event_subscriber.cpp", 33 "src/scan_mdns_service.cpp", 34 "src/scan_service_ability.cpp", 35 "src/scan_service_stub.cpp", 36 "src/scan_system_data.cpp", 37 "src/scan_usb_manager.cpp", 38 ] 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 public_configs = [ ":scan_service_config" ] 51 52 include_dirs = [ 53 "${print_path}/frameworks/innerkitsimpl/scan_impl/include", 54 "${print_utils_path}/include", 55 ] 56 57 deps = [ 58 "${print_path}/frameworks/helper/scan_helper:scan_helper", 59 "${print_path}/frameworks/innerkitsimpl/scan_impl:scan_client", 60 ] 61 62 if (debug_enable) { 63 cflags_cc += [ "-DDEBUG_ENABLE" ] 64 } 65 66 external_deps = [ 67 "ability_base:base", 68 "ability_base:want", 69 "ability_base:zuri", 70 "ability_runtime:ability_manager", 71 "ability_runtime:abilitykit_native", 72 "access_token:libaccesstoken_sdk", 73 "bundle_framework:appexecfwk_base", 74 "bundle_framework:appexecfwk_core", 75 "cJSON:cjson", 76 "c_utils:utils", 77 "common_event_service:cesfwk_innerkits", 78 "drivers_interface_usb:libusb_proxy_1.0", 79 "eventhandler:libeventhandler", 80 "hilog:libhilog", 81 "hisysevent:libhisysevent", 82 "init:libbegetutil", 83 "ipc:ipc_core", 84 "libjpeg-turbo:turbojpeg", 85 "napi:ace_napi", 86 "netmanager_ext:mdns_manager_if", 87 "netmanager_ext:mdns_manager_if", 88 "os_account:os_account_innerkits", 89 "safwk:system_ability_fwk", 90 "samgr:samgr_proxy", 91 "usb_manager:usbsrv_client", 92 ] 93 94 if (build_variant == "user") { 95 cflags_cc += [ "-DIS_RELEASE_VERSION" ] 96 } 97 98 subsystem_name = "print" 99 part_name = "print_fwk" 100} 101