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("//build/ohos.gni") 14import("//build/ohos_var.gni") 15import("//foundation/distributeddatamgr/datamgr_service/datamgr_service.gni") 16 17group("build_module") { 18 deps = [ ":distributeddatasvcfwk" ] 19} 20config("module_config") { 21 visibility = [ ":*" ] 22 include_dirs = [ 23 "include", 24 "${data_service_path}/adapter/include", 25 "${kv_store_path}/interfaces/innerkits/distributeddata/include", 26 "${kv_store_common_path}", 27 "${kv_store_distributeddb_path}/interfaces/include/", 28 "${kv_store_distributeddb_path}/include/", 29 ] 30} 31 32config("module_public_config") { 33 visibility = [ ":*" ] 34 include_dirs = [ 35 "include", 36 "${data_service_path}/framework/include/account", 37 "${kv_store_common_path}", 38 ] 39} 40 41ohos_shared_library("distributeddatasvcfwk") { 42 branch_protector_ret = "pac_ret" 43 sanitize = { 44 ubsan = true 45 boundary_sanitize = true 46 cfi = true 47 cfi_cross_dso = true 48 debug = false 49 } 50 sources = [ 51 "account/account_delegate.cpp", 52 "app_id_mapping/app_id_mapping_config_manager.cpp", 53 "backuprule/backup_rule_manager.cpp", 54 "changeevent/remote_change_event.cpp", 55 "checker/checker_manager.cpp", 56 "cloud/asset_loader.cpp", 57 "cloud/cloud_config_manager.cpp", 58 "cloud/cloud_db.cpp", 59 "cloud/cloud_event.cpp", 60 "cloud/cloud_extra_data.cpp", 61 "cloud/cloud_info.cpp", 62 "cloud/cloud_lock_event.cpp", 63 "cloud/cloud_report.cpp", 64 "cloud/cloud_server.cpp", 65 "cloud/cloud_share_event.cpp", 66 "cloud/cloud_sync_finished_event.cpp", 67 "cloud/make_query_event.cpp", 68 "cloud/schema_meta.cpp", 69 "cloud/sharing_center.cpp", 70 "cloud/subscription.cpp", 71 "cloud/sync_event.cpp", 72 "cloud/sync_strategy.cpp", 73 "communication/connect_manager.cpp", 74 "directory/directory_manager.cpp", 75 "dump/dump_manager.cpp", 76 "eventcenter/event.cpp", 77 "eventcenter/event_center.cpp", 78 "feature/feature_system.cpp", 79 "feature/static_acts.cpp", 80 "metadata/appid_meta_data.cpp", 81 "metadata/auto_launch_meta_data.cpp", 82 "metadata/capability_meta_data.cpp", 83 "metadata/capability_range.cpp", 84 "metadata/corrupted_meta_data.cpp", 85 "metadata/matrix_meta_data.cpp", 86 "metadata/meta_data.cpp", 87 "metadata/meta_data_manager.cpp", 88 "metadata/secret_key_meta_data.cpp", 89 "metadata/store_debug_info.cpp", 90 "metadata/store_meta_data.cpp", 91 "metadata/store_meta_data_local.cpp", 92 "metadata/strategy_meta_data.cpp", 93 "metadata/switches_meta_data.cpp", 94 "metadata/user_meta_data.cpp", 95 "metadata/version_meta_data.cpp", 96 "screen/screen_manager.cpp", 97 "serializable/serializable.cpp", 98 "snapshot/bind_event.cpp", 99 "snapshot/snapshot.cpp", 100 "store/auto_cache.cpp", 101 "utils/anonymous.cpp", 102 "utils/block_integer.cpp", 103 "utils/constant.cpp", 104 "utils/converter.cpp", 105 "utils/crypto.cpp", 106 "utils/ref_count.cpp", 107 ] 108 cflags = [ 109 "-Wno-multichar", 110 "-D_LIBCPP_HAS_COND_CLOCKWAIT", 111 ] 112 113 cflags_cc = [ "-fvisibility=hidden" ] 114 115 configs = [ ":module_config" ] 116 117 public_configs = [ ":module_public_config" ] 118 119 external_deps = [ 120 "access_token:libaccesstoken_sdk", 121 "c_utils:utils", 122 "hilog:libhilog", 123 "json:nlohmann_json_static", 124 "openssl:libcrypto_shared", 125 ] 126 subsystem_name = "distributeddatamgr" 127 128 part_name = "datamgr_service" 129 defines = [ "OPENSSL_SUPPRESS_DEPRECATED" ] 130} 131