1816fd32cSopenharmony_ci# Copyright (c) 2022 Huawei Device Co., Ltd.
2816fd32cSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3816fd32cSopenharmony_ci# you may not use this file except in compliance with the License.
4816fd32cSopenharmony_ci# You may obtain a copy of the License at
5816fd32cSopenharmony_ci#
6816fd32cSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7816fd32cSopenharmony_ci#
8816fd32cSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9816fd32cSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10816fd32cSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11816fd32cSopenharmony_ci# See the License for the specific language governing permissions and
12816fd32cSopenharmony_ci# limitations under the License.
13816fd32cSopenharmony_ci
14816fd32cSopenharmony_ciimport("//build/ohos.gni")
15816fd32cSopenharmony_ciimport("//foundation/distributeddatamgr/data_share/datashare.gni")
16816fd32cSopenharmony_ci
17816fd32cSopenharmony_ciconfig("ability_config") {
18816fd32cSopenharmony_ci  visibility = [ ":*" ]
19816fd32cSopenharmony_ci
20816fd32cSopenharmony_ci  cflags = []
21816fd32cSopenharmony_ci  if (target_cpu == "arm") {
22816fd32cSopenharmony_ci    cflags += [ "-DBINDER_IPC_32BIT" ]
23816fd32cSopenharmony_ci  }
24816fd32cSopenharmony_ci}
25816fd32cSopenharmony_ci
26816fd32cSopenharmony_ciconfig("datashare_public_config") {
27816fd32cSopenharmony_ci  visibility = [ ":*" ]
28816fd32cSopenharmony_ci
29816fd32cSopenharmony_ci  include_dirs =
30816fd32cSopenharmony_ci      [ "${datashare_base_path}/interfaces/inner_api/common/include" ]
31816fd32cSopenharmony_ci}
32816fd32cSopenharmony_ci
33816fd32cSopenharmony_cidatashare_common_include_dirs = [
34816fd32cSopenharmony_ci  "${datashare_common_native_path}/include",
35816fd32cSopenharmony_ci  "${datashare_base_path}/interfaces/inner_api/common/include",
36816fd32cSopenharmony_ci  "${datashare_base_path}/interfaces/inner_api/consumer/include",
37816fd32cSopenharmony_ci  "${datashare_base_path}/interfaces/inner_api/provider/include",
38816fd32cSopenharmony_ci  "${datashare_native_proxy_path}/include",
39816fd32cSopenharmony_ci]
40816fd32cSopenharmony_ci
41816fd32cSopenharmony_cidatashare_common_sources = [
42816fd32cSopenharmony_ci  "${datashare_common_native_path}/src/datashare_abs_result_set.cpp",
43816fd32cSopenharmony_ci  "${datashare_common_native_path}/src/datashare_block_writer_impl.cpp",
44816fd32cSopenharmony_ci  "${datashare_common_native_path}/src/datashare_itypes_utils.cpp",
45816fd32cSopenharmony_ci  "${datashare_common_native_path}/src/datashare_result_set.cpp",
46816fd32cSopenharmony_ci  "${datashare_common_native_path}/src/datashare_template.cpp",
47816fd32cSopenharmony_ci  "${datashare_common_native_path}/src/datashare_valuebucket_convert.cpp",
48816fd32cSopenharmony_ci  "${datashare_common_native_path}/src/ikvstore_data_service.cpp",
49816fd32cSopenharmony_ci  "${datashare_common_native_path}/src/ishared_result_set.cpp",
50816fd32cSopenharmony_ci  "${datashare_common_native_path}/src/ishared_result_set_proxy.cpp",
51816fd32cSopenharmony_ci  "${datashare_common_native_path}/src/ishared_result_set_stub.cpp",
52816fd32cSopenharmony_ci  "${datashare_common_native_path}/src/shared_block.cpp",
53816fd32cSopenharmony_ci]
54816fd32cSopenharmony_ci
55816fd32cSopenharmony_cidatashare_common_external_deps = [
56816fd32cSopenharmony_ci  "ability_base:zuri",
57816fd32cSopenharmony_ci  "c_utils:utils",
58816fd32cSopenharmony_ci  "hilog:libhilog",
59816fd32cSopenharmony_ci  "hisysevent:libhisysevent",
60816fd32cSopenharmony_ci  "hitrace:hitrace_meter",
61816fd32cSopenharmony_ci  "hitrace:libhitracechain",
62816fd32cSopenharmony_ci  "ipc:ipc_single",
63816fd32cSopenharmony_ci  "kv_store:distributeddata_inner",
64816fd32cSopenharmony_ci]
65816fd32cSopenharmony_ci
66816fd32cSopenharmony_ciohos_shared_library("datashare_common") {
67816fd32cSopenharmony_ci  branch_protector_ret = "pac_ret"
68816fd32cSopenharmony_ci  sanitize = {
69816fd32cSopenharmony_ci    ubsan = true
70816fd32cSopenharmony_ci    boundary_sanitize = true
71816fd32cSopenharmony_ci    cfi = true
72816fd32cSopenharmony_ci    cfi_cross_dso = true
73816fd32cSopenharmony_ci    debug = false
74816fd32cSopenharmony_ci  }
75816fd32cSopenharmony_ci  include_dirs = datashare_common_include_dirs
76816fd32cSopenharmony_ci
77816fd32cSopenharmony_ci  sources = datashare_common_sources
78816fd32cSopenharmony_ci
79816fd32cSopenharmony_ci  deps = []
80816fd32cSopenharmony_ci
81816fd32cSopenharmony_ci  public_deps = []
82816fd32cSopenharmony_ci
83816fd32cSopenharmony_ci  configs = [ ":ability_config" ]
84816fd32cSopenharmony_ci  public_configs = [ ":datashare_public_config" ]
85816fd32cSopenharmony_ci  version_script = "libdatashare_common.map"
86816fd32cSopenharmony_ci  innerapi_tags = [
87816fd32cSopenharmony_ci    "platformsdk",
88816fd32cSopenharmony_ci    "sasdk",
89816fd32cSopenharmony_ci  ]
90816fd32cSopenharmony_ci
91816fd32cSopenharmony_ci  external_deps = datashare_common_external_deps
92816fd32cSopenharmony_ci
93816fd32cSopenharmony_ci  subsystem_name = "distributeddatamgr"
94816fd32cSopenharmony_ci  part_name = "data_share"
95816fd32cSopenharmony_ci}
96816fd32cSopenharmony_ci
97816fd32cSopenharmony_ciohos_static_library("datashare_common_static") {
98816fd32cSopenharmony_ci  branch_protector_ret = "pac_ret"
99816fd32cSopenharmony_ci  sanitize = {
100816fd32cSopenharmony_ci    ubsan = true
101816fd32cSopenharmony_ci    boundary_sanitize = true
102816fd32cSopenharmony_ci    cfi = true
103816fd32cSopenharmony_ci    cfi_cross_dso = true
104816fd32cSopenharmony_ci    debug = false
105816fd32cSopenharmony_ci  }
106816fd32cSopenharmony_ci  include_dirs = datashare_common_include_dirs
107816fd32cSopenharmony_ci
108816fd32cSopenharmony_ci  sources = datashare_common_sources
109816fd32cSopenharmony_ci
110816fd32cSopenharmony_ci  deps = []
111816fd32cSopenharmony_ci
112816fd32cSopenharmony_ci  public_deps = []
113816fd32cSopenharmony_ci
114816fd32cSopenharmony_ci  configs = [ ":ability_config" ]
115816fd32cSopenharmony_ci  public_configs = [ ":datashare_public_config" ]
116816fd32cSopenharmony_ci
117816fd32cSopenharmony_ci  external_deps = datashare_common_external_deps
118816fd32cSopenharmony_ci
119816fd32cSopenharmony_ci  subsystem_name = "distributeddatamgr"
120816fd32cSopenharmony_ci  part_name = "data_share"
121816fd32cSopenharmony_ci}
122