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("//build/ohos.gni") 15import("../../dbms.gni") 16 17group("dbms_target") { 18 if (distributed_bundle_framework_graphics) { 19 deps = [ ":libdbms" ] 20 } 21} 22 23config("distributed_bms_config") { 24 include_dirs = [ "include" ] 25} 26 27ohos_shared_library("libdbms") { 28 branch_protector_ret = "pac_ret" 29 30 sanitize = { 31 boundary_sanitize = true 32 cfi = true 33 cfi_cross_dso = true 34 debug = false 35 integer_overflow = true 36 ubsan = true 37 } 38 39 sources = [ 40 "src/account_manager_helper.cpp", 41 "src/dbms_device_manager.cpp", 42 "src/distributed_bms.cpp", 43 "src/distributed_bms_host.cpp", 44 "src/distributed_data_storage.cpp", 45 ] 46 47 defines = [ 48 "APP_LOG_TAG = \"DistributedBundleMgrService\"", 49 "LOG_DOMAIN = 0xD0011E0", 50 ] 51 52 configs = [ ":distributed_bms_config" ] 53 54 deps = [ "${dbms_inner_api_path}:dbms_fwk" ] 55 56 external_deps = [ 57 "ability_base:want", 58 "access_token:libaccesstoken_sdk", 59 "access_token:libtokenid_sdk", 60 "bundle_framework:appexecfwk_base", 61 "bundle_framework:appexecfwk_core", 62 "bundle_framework:libappexecfwk_common", 63 "c_utils:utils", 64 "common_event_service:cesfwk_innerkits", 65 "device_manager:devicemanagersdk", 66 "hicollie:libhicollie", 67 "hilog:libhilog", 68 "i18n:intl_util", 69 "init:libbegetutil", 70 "ipc:ipc_core", 71 "kv_store:distributeddata_inner", 72 "resource_management:global_resmgr", 73 "safwk:system_ability_fwk", 74 "samgr:samgr_proxy", 75 ] 76 77 if (hisysevent_enable_dbms) { 78 sources += [ "src/event_report.cpp" ] 79 external_deps += [ "hisysevent:libhisysevent" ] 80 defines += [ "HISYSEVENT_ENABLE" ] 81 } 82 83 if (account_enable_dbms) { 84 external_deps += [ "os_account:os_account_innerkits" ] 85 defines += [ "ACCOUNT_ENABLE" ] 86 } 87 88 if (distributed_bundle_image_framework_enable) { 89 sources += [ "src/image_compress.cpp" ] 90 external_deps += [ "image_framework:image_native" ] 91 defines += [ "DISTRIBUTED_BUNDLE_IMAGE_ENABLE" ] 92 } 93 94 shlib_type = "sa" 95 part_name = "distributed_bundle_framework" 96 subsystem_name = "bundlemanager" 97} 98