• 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
26ohos_shared_library("datashare_common") {
27  include_dirs = [
28    "${datashare_common_napi_path}/include",
29    "${datashare_common_native_path}/include",
30    "${datashare_base_path}/interfaces/inner_api/common/include",
31    "${datashare_base_path}/interfaces/inner_api/consumer/include",
32    "${datashare_base_path}/interfaces/inner_api/provider/include",
33  ]
34
35  sources = [
36    "${datashare_common_napi_path}/src/datashare_error.cpp",
37    "${datashare_common_napi_path}/src/datashare_js_utils.cpp",
38    "${datashare_common_napi_path}/src/datashare_predicates_proxy.cpp",
39    "${datashare_common_napi_path}/src/datashare_result_set_proxy.cpp",
40    "${datashare_common_napi_path}/src/napi_datashare_values_bucket.cpp",
41    "${datashare_common_native_path}/src/datashare_abs_result_set.cpp",
42    "${datashare_common_native_path}/src/datashare_block_writer_impl.cpp",
43    "${datashare_common_native_path}/src/datashare_result_set.cpp",
44    "${datashare_common_native_path}/src/ishared_result_set.cpp",
45    "${datashare_common_native_path}/src/ishared_result_set_proxy.cpp",
46    "${datashare_common_native_path}/src/ishared_result_set_stub.cpp",
47    "${datashare_common_native_path}/src/itypes_utils.cpp",
48    "${datashare_common_native_path}/src/shared_block.cpp",
49  ]
50
51  public_deps = []
52
53  configs = [ ":ability_config" ]
54  version_script = "libdatashare_common.map"
55
56  external_deps = [
57    "ability_base:zuri",
58    "c_utils:utils",
59    "hisysevent_native:libhisysevent",
60    "hitrace_native:hitrace_meter",
61    "hitrace_native:libhitracechain",
62    "hiviewdfx_hilog_native:libhilog",
63    "ipc:ipc_core",
64    "napi:ace_napi",
65    "relational_store:native_appdatafwk",
66  ]
67
68  subsystem_name = "distributeddatamgr"
69  part_name = "data_share"
70}
71