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/ace/ace.gni")
15import("//foundation/distributeddatamgr/udmf/udmf.gni")
16
17ohos_shared_library("cj_unified_data_channel_ffi") {
18  branch_protector_ret = "pac_ret"
19  sanitize = {
20    cfi = true
21    cfi_cross_dso = true
22    debug = false
23  }
24
25  include_dirs = [
26    "${udmf_interfaces_path}/cj/include",
27    "${udmf_interfaces_path}/innerkits/client",
28    "${udmf_interfaces_path}/innerkits/common",
29    "${udmf_interfaces_path}/innerkits/data",
30    "${udmf_interfaces_path}/jskits/common",
31    "${udmf_interfaces_path}/jskits/data",
32
33    "${udmf_framework_path}/common",
34    "${udmf_framework_path}/innerkits/service",
35  ]
36
37  if (product_name != "ohos-sdk") {
38    sources = [
39      "${udmf_interfaces_path}/cj/src/unified_data_ffi.cpp",
40      "${udmf_interfaces_path}/cj/src/unified_data_impl.cpp",
41      "${udmf_interfaces_path}/cj/src/unified_record_ffi.cpp",
42      "${udmf_interfaces_path}/cj/src/unified_record_impl.cpp",
43      "${udmf_interfaces_path}/cj/src/utils.cpp",
44    ]
45
46    deps = [ "../innerkits:udmf_client" ]
47
48    external_deps = [
49      "ability_base:base",
50      "ability_base:want",
51      "ability_runtime:abilitykit_native",
52      "ability_runtime:napi_common",
53      "c_utils:utils",
54      "hilog:libhilog",
55      "image_framework:cj_image_ffi",
56      "ipc:ipc_core",
57      "kv_store:distributeddata_inner",
58      "napi:ace_napi",
59      "napi:cj_bind_ffi",
60      "napi:cj_bind_native",
61    ]
62
63    public_external_deps = [ "image_framework:image" ]
64  }
65
66  # cflags = [ "-fvisibility=hidden" ]
67  innerapi_tags = [ "platformsdk" ]
68  subsystem_name = "distributeddatamgr"
69  part_name = "udmf"
70}
71
72ohos_shared_library("cj_uniform_type_descriptor_ffi") {
73  branch_protector_ret = "pac_ret"
74  sanitize = {
75    cfi = true
76    cfi_cross_dso = true
77    debug = false
78  }
79
80  include_dirs = [
81    "${udmf_interfaces_path}/cj/include",
82    "${udmf_interfaces_path}/innerkits/client",
83    "${udmf_interfaces_path}/innerkits/common",
84    "${udmf_interfaces_path}/innerkits/data",
85    "${udmf_interfaces_path}/jskits/common",
86    "${udmf_interfaces_path}/jskits/data",
87
88    "${udmf_framework_path}/common",
89    "${udmf_framework_path}/innerkits/service",
90  ]
91
92  if (product_name != "ohos-sdk") {
93    sources = [
94      "${udmf_interfaces_path}/cj/src/type_descriptor_ffi.cpp",
95      "${udmf_interfaces_path}/cj/src/type_descriptor_impl.cpp",
96      "${udmf_interfaces_path}/cj/src/uniform_type_descriptor_ffi.cpp",
97      "${udmf_interfaces_path}/cj/src/uniform_type_descriptor_impl.cpp",
98      "${udmf_interfaces_path}/cj/src/utils.cpp",
99    ]
100
101    deps = [
102      "../innerkits:udmf_client",
103      "../innerkits:utd_client",
104    ]
105
106    external_deps = [
107      "ability_base:base",
108      "ability_base:want",
109      "ability_runtime:abilitykit_native",
110      "ability_runtime:napi_common",
111      "c_utils:utils",
112      "hilog:libhilog",
113      "image_framework:cj_image_ffi",
114      "ipc:ipc_core",
115      "kv_store:distributeddata_inner",
116      "napi:ace_napi",
117      "napi:cj_bind_ffi",
118      "napi:cj_bind_native",
119    ]
120
121    public_external_deps = [ "image_framework:image" ]
122  }
123
124  # cflags = [ "-fvisibility=hidden" ]
125  innerapi_tags = [ "platformsdk" ]
126  subsystem_name = "distributeddatamgr"
127  part_name = "udmf"
128}
129