1# Copyright (c) 2021-2023 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/notification/distributed_notification_service/notification.gni") 15import("//build/ohos.gni") 16 17config("ans_distributed_config") { 18 include_dirs = [ 19 "${services_path}/distributed/include", 20 "${ffrt_path}/interfaces/kits", 21 ] 22} 23 24ohos_shared_library("libans_distributed") { 25 sanitize = { 26 integer_overflow = true 27 ubsan = true 28 boundary_sanitize = true 29 cfi = true 30 cfi_cross_dso = true 31 debug = false 32 } 33 branch_protector_ret = "pac_ret" 34 35 sources = [ 36 "src/distributed_database.cpp", 37 "src/distributed_database_callback.cpp", 38 "src/distributed_device_callback.cpp", 39 "src/distributed_flow_control.cpp", 40 "src/distributed_notification_manager.cpp", 41 "src/distributed_preferences.cpp", 42 "src/distributed_preferences_database.cpp", 43 "src/distributed_preferences_info.cpp", 44 "src/distributed_screen_status_manager.cpp", 45 ] 46 47 include_dirs = [ "include" ] 48 49 defines = [] 50 51 configs = [ 52 ":ans_distributed_config", 53 "${frameworks_module_ans_path}:ans_innerkits_public_config", 54 ] 55 56 deps = [ "${frameworks_module_ans_path}:ans_innerkits" ] 57 58 external_deps = [ 59 "ability_base:want", 60 "ability_base:zuri", 61 "c_utils:utils", 62 "device_manager:devicemanagersdk", 63 "eventhandler:libeventhandler", 64 "ffrt:libffrt", 65 "hilog:libhilog", 66 "kv_store:distributeddata_inner", 67 ] 68 69 if (ans_hitrace_usage) { 70 external_deps += [ "hitrace:hitrace_meter" ] 71 defines += [ "HITRACE_METER_ENABLE" ] 72 } 73 74 subsystem_name = "${subsystem_name}" 75 part_name = "${component_name}" 76} 77