• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023 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")
14
15config("gaussdb_rd_config") {
16  visibility = [ ":*" ]
17  include_dirs = [
18    "src/common/include",
19    "src/executor/include",
20    "src/executor/document",
21    "src/oh_adapter/include",
22    "src/oh_adapter/src",
23    "src/interface/include",
24  ]
25
26  defines = [
27    "SQLITE_ENABLE_SNAPSHOT",
28    "SQLITE_HAS_CODEC",
29    "SQLITE_ENABLE_JSON1",
30    "USING_HILOG_LOGGER",
31    "USE_SQLITE_SYMBOLS",
32    "SQLITE_ENABLE_DROPTABLE_CALLBACK",
33  ]
34  if (is_debug) {
35    defines += [ "TRACE_SQLITE_EXECUTE" ]
36  }
37}
38
39config("gaussdb_rd_public_config") {
40  visibility = [ "*:*" ]
41  include_dirs = [ "include" ]
42}
43
44group("build_module") {
45  deps = [ ":gaussdb_rd" ]
46}
47
48ohos_shared_library("gaussdb_rd") {
49  sources = [
50    "src/common/src/collection_option.cpp",
51    "src/common/src/db_config.cpp",
52    "src/common/src/db_constant.cpp",
53    "src/common/src/json_common.cpp",
54    "src/common/src/log_print.cpp",
55    "src/common/src/os_api.cpp",
56    "src/executor/base/grd_db_api.cpp",
57    "src/executor/document/check_common.cpp",
58    "src/executor/document/grd_document_api.cpp",
59    "src/executor/document/grd_resultset_api.cpp",
60    "src/interface/src/collection.cpp",
61    "src/interface/src/doc_errno.cpp",
62    "src/interface/src/document_key.cpp",
63    "src/interface/src/document_store.cpp",
64    "src/interface/src/document_store_manager.cpp",
65    "src/interface/src/projection_tree.cpp",
66    "src/interface/src/result_set.cpp",
67    "src/interface/src/result_set_common.cpp",
68    "src/oh_adapter/src/json_object.cpp",
69    "src/oh_adapter/src/kv_store_manager.cpp",
70    "src/oh_adapter/src/sqlite_store_executor_impl.cpp",
71    "src/oh_adapter/src/sqlite_utils.cpp",
72  ]
73
74  configs = [ ":gaussdb_rd_config" ]
75  public_configs = [ ":gaussdb_rd_public_config" ]
76
77  deps = [ "//third_party/sqlite:sqlite" ]
78
79  configs += [ "//third_party/cJSON:cJSON_config" ]
80  ldflags = [ "-Wl,--exclude-libs,ALL" ]
81  cflags_cc = [ "-fvisibility=hidden" ]
82  deps += [ "//third_party/cJSON:cjson" ]
83
84  external_deps = [
85    "c_utils:utils",
86    "hilog:libhilog",
87    "hisysevent:libhisysevent",
88    "hitrace:hitrace_meter",
89  ]
90
91  subsystem_name = "distributeddatamgr"
92  part_name = "datamgr_service"
93}
94