• 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.
13
14import("//build/ohos.gni")
15import("//foundation/distributeddatamgr/data_share/datashare.gni")
16
17config("ability_config") {
18  visibility = [ ":*" ]
19
20  cflags = []
21  if (target_cpu == "arm") {
22    cflags += [ "-DBINDER_IPC_32BIT" ]
23  }
24}
25
26config("datashare_public_config") {
27  visibility = [ ":*" ]
28
29  include_dirs =
30      [ "${datashare_base_path}/interfaces/inner_api/common/include" ]
31}
32
33datashare_common_include_dirs = [
34  "${datashare_common_native_path}/include",
35  "${datashare_base_path}/interfaces/inner_api/common/include",
36  "${datashare_base_path}/interfaces/inner_api/consumer/include",
37  "${datashare_base_path}/interfaces/inner_api/provider/include",
38  "${datashare_native_proxy_path}/include",
39  "${kvstore_base_path}/frameworks/common",
40]
41
42datashare_common_sources = [
43  "${datashare_common_native_path}/src/datashare_abs_result_set.cpp",
44  "${datashare_common_native_path}/src/datashare_block_writer_impl.cpp",
45  "${datashare_common_native_path}/src/datashare_itypes_utils.cpp",
46  "${datashare_common_native_path}/src/datashare_result_set.cpp",
47  "${datashare_common_native_path}/src/datashare_template.cpp",
48  "${datashare_common_native_path}/src/ikvstore_data_service.cpp",
49  "${datashare_common_native_path}/src/ishared_result_set.cpp",
50  "${datashare_common_native_path}/src/ishared_result_set_proxy.cpp",
51  "${datashare_common_native_path}/src/ishared_result_set_stub.cpp",
52  "${datashare_common_native_path}/src/shared_block.cpp",
53]
54
55datashare_common_external_deps = [
56  "ability_base:zuri",
57  "c_utils:utils",
58  "hilog:libhilog",
59  "hisysevent:libhisysevent",
60  "hitrace:hitrace_meter",
61  "hitrace:libhitracechain",
62  "ipc:ipc_single",
63]
64
65ohos_shared_library("datashare_common") {
66  branch_protector_ret = "pac_ret"
67  sanitize = {
68    cfi = true
69    cfi_cross_dso = true
70    debug = false
71  }
72  include_dirs = datashare_common_include_dirs
73
74  sources = datashare_common_sources
75
76  deps = []
77
78  public_deps = []
79
80  configs = [ ":ability_config" ]
81  public_configs = [ ":datashare_public_config" ]
82  version_script = "libdatashare_common.map"
83  innerapi_tags = [
84    "platformsdk",
85    "sasdk",
86  ]
87
88  external_deps = datashare_common_external_deps
89
90  subsystem_name = "distributeddatamgr"
91  part_name = "data_share"
92}
93
94ohos_static_library("datashare_common_static") {
95  branch_protector_ret = "pac_ret"
96  sanitize = {
97    cfi = true
98    cfi_cross_dso = true
99    debug = false
100  }
101  include_dirs = datashare_common_include_dirs
102
103  sources = datashare_common_sources
104
105  deps = []
106
107  public_deps = []
108
109  configs = [ ":ability_config" ]
110  public_configs = [ ":datashare_public_config" ]
111
112  external_deps = datashare_common_external_deps
113
114  subsystem_name = "distributeddatamgr"
115  part_name = "data_share"
116}
117