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