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("//foundation/distributeddatamgr/udmf/udmf.gni") 15 16config("udmf_client_config") { 17 include_dirs = [ 18 "${udmf_interfaces_path}/innerkits/client", 19 "${udmf_interfaces_path}/innerkits/common", 20 "${udmf_interfaces_path}/innerkits/data", 21 "${udmf_interfaces_path}/innerkits/convert", 22 "${udmf_interfaces_path}/ndk/data", 23 "${udmf_framework_path}/common", 24 "${udmf_framework_path}/innerkitsimpl/data", 25 "${udmf_framework_path}/innerkitsimpl/service", 26 "${udmf_framework_path}/innerkitsimpl/convert", 27 "${udmf_framework_path}/ndkimpl/data", 28 "${kv_store_path}/frameworks/common", 29 "//third_party/libuv/include", 30 "//third_party/node/src", 31 "${kv_store_path}/frameworks/innerkitsimpl/distributeddatafwk/include", 32 "${kv_store_path}/frameworks/innerkitsimpl/distributeddatafwk/src", 33 "${kv_store_path}/frameworks/innerkitsimpl/distributeddatasvc/include", 34 "${kv_store_path}/interfaces/innerkits/distributeddata/include", 35 "${file_service_path}/interfaces/common/include", 36 "${file_service_path}/interfaces/innerkits/native/file_uri/include", 37 ] 38} 39 40ohos_shared_library("udmf_client") { 41 branch_protector_ret = "pac_ret" 42 sanitize = { 43 ubsan = true 44 boundary_sanitize = true 45 cfi = true 46 cfi_cross_dso = true 47 debug = false 48 } 49 sources = [ 50 "${udmf_framework_path}/common/endian_converter.cpp", 51 "${udmf_framework_path}/common/tlv_object.cpp", 52 "${udmf_framework_path}/common/tlv_util.cpp", 53 "${udmf_framework_path}/common/udmf_radar_reporter.cpp", 54 "${udmf_framework_path}/common/udmf_types_util.cpp", 55 "${udmf_framework_path}/common/udmf_utils.cpp", 56 "${udmf_framework_path}/innerkitsimpl/client/getter_system.cpp", 57 "${udmf_framework_path}/innerkitsimpl/client/udmf_client.cpp", 58 "${udmf_framework_path}/innerkitsimpl/common/unified_key.cpp", 59 "${udmf_framework_path}/innerkitsimpl/common/unified_meta.cpp", 60 "${udmf_framework_path}/innerkitsimpl/convert/ndk_data_conversion.cpp", 61 "${udmf_framework_path}/innerkitsimpl/convert/udmf_conversion.cpp", 62 "${udmf_framework_path}/innerkitsimpl/data/application_defined_record.cpp", 63 "${udmf_framework_path}/innerkitsimpl/data/audio.cpp", 64 "${udmf_framework_path}/innerkitsimpl/data/file.cpp", 65 "${udmf_framework_path}/innerkitsimpl/data/folder.cpp", 66 "${udmf_framework_path}/innerkitsimpl/data/html.cpp", 67 "${udmf_framework_path}/innerkitsimpl/data/image.cpp", 68 "${udmf_framework_path}/innerkitsimpl/data/link.cpp", 69 "${udmf_framework_path}/innerkitsimpl/data/plain_text.cpp", 70 "${udmf_framework_path}/innerkitsimpl/data/system_defined_appitem.cpp", 71 "${udmf_framework_path}/innerkitsimpl/data/system_defined_form.cpp", 72 "${udmf_framework_path}/innerkitsimpl/data/system_defined_pixelmap.cpp", 73 "${udmf_framework_path}/innerkitsimpl/data/system_defined_record.cpp", 74 "${udmf_framework_path}/innerkitsimpl/data/text.cpp", 75 "${udmf_framework_path}/innerkitsimpl/data/unified_data.cpp", 76 "${udmf_framework_path}/innerkitsimpl/data/unified_data_helper.cpp", 77 "${udmf_framework_path}/innerkitsimpl/data/unified_record.cpp", 78 "${udmf_framework_path}/innerkitsimpl/data/video.cpp", 79 "${udmf_framework_path}/innerkitsimpl/service/udmf_service_client.cpp", 80 "${udmf_framework_path}/innerkitsimpl/service/udmf_service_proxy.cpp", 81 ] 82 83 public_configs = [ ":udmf_client_config" ] 84 85 external_deps = [ 86 "ability_base:zuri", 87 "access_token:libaccesstoken_sdk", 88 "app_file_service:fileuri_native", 89 "bundle_framework:appexecfwk_core", 90 "cJSON:cjson", 91 "c_utils:utils", 92 "hilog:libhilog", 93 "hisysevent:libhisysevent", 94 "hitrace:hitrace_meter", 95 "hitrace:libhitracechain", 96 "image_framework:image_native", 97 "ipc:ipc_core", 98 "kv_store:distributeddata_inner", 99 "kv_store:distributeddata_mgr", 100 "samgr:samgr_proxy", 101 ] 102 103 public_external_deps = [ 104 "ability_base:want", 105 "cJSON:cjson", 106 "image_framework:image", 107 ] 108 109 innerapi_tags = [ "platformsdk" ] 110 subsystem_name = "distributeddatamgr" 111 112 part_name = "udmf" 113 use_exceptions = true 114 cflags_cc = [ "-fvisibility=hidden" ] 115} 116 117config("utd_client_config") { 118 include_dirs = [ 119 "${udmf_interfaces_path}/innerkits/client", 120 "${udmf_interfaces_path}/innerkits/common", 121 "${udmf_interfaces_path}/innerkits/data", 122 "${udmf_framework_path}/common", 123 "${udmf_framework_path}/innerkitsimpl/data", 124 "${udmf_framework_path}/innerkitsimpl/service", 125 ] 126} 127 128ohos_shared_library("utd_client") { 129 branch_protector_ret = "pac_ret" 130 sanitize = { 131 cfi = true 132 cfi_cross_dso = true 133 debug = false 134 } 135 136 sources = [ 137 "${udmf_framework_path}/common/base32_utils.cpp", 138 "${udmf_framework_path}/common/custom_utd_json_parser.cpp", 139 "${udmf_framework_path}/common/custom_utd_store.cpp", 140 "${udmf_framework_path}/common/graph.cpp", 141 "${udmf_framework_path}/common/udmf_utils.cpp", 142 "${udmf_framework_path}/common/utd_cfgs_checker.cpp", 143 "${udmf_framework_path}/common/utd_graph.cpp", 144 "${udmf_framework_path}/innerkitsimpl/client/utd_client.cpp", 145 "${udmf_framework_path}/innerkitsimpl/data/flexible_type.cpp", 146 "${udmf_framework_path}/innerkitsimpl/data/preset_type_descriptors.cpp", 147 "${udmf_framework_path}/innerkitsimpl/data/type_descriptor.cpp", 148 ] 149 150 public_configs = [ ":utd_client_config" ] 151 152 external_deps = [ 153 "access_token:libaccesstoken_sdk", 154 "cJSON:cjson", 155 "c_utils:utils", 156 "hilog:libhilog", 157 "ipc:ipc_core", 158 "os_account:os_account_innerkits", 159 ] 160 161 public_external_deps = [ "cJSON:cjson" ] 162 use_exceptions = true 163 innerapi_tags = [ "platformsdk" ] 164 subsystem_name = "distributeddatamgr" 165 166 part_name = "udmf" 167 cflags_cc = [ "-fvisibility=hidden" ] 168 if (build_selinux) { 169 cflags = [ "-DWITH_SELINUX" ] 170 external_deps += [ "selinux_adapter:librestorecon" ] 171 } 172} 173