1# Copyright (c) 2021 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("//base/hiviewdfx/hiview/hiview.gni") 14import("//build/ohos.gni") 15 16config("db_store_config") { 17 visibility = [ "*:*" ] 18 19 include_dirs = [ 20 "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", 21 ".", 22 "include", 23 ] 24} 25 26ohos_source_set("db_store_source") { 27 part_name = "hiview" 28 public_configs = [ ":db_store_config" ] 29 30 sources = [ 31 "data_query.cpp", 32 "doc_db.cpp", 33 "doc_store.cpp", 34 "doc_util.cpp", 35 "store_manager.cpp", 36 ] 37 38 deps = [ 39 "//third_party/ejdb:ejdb", 40 "//third_party/iowow:iowow", 41 ] 42 43 if (is_standard_system) { 44 external_deps = [ "hiviewdfx_hilog_native:libhilog" ] 45 } else { 46 external_deps = [ "hilog:libhilog" ] 47 } 48} 49 50ohos_source_set("db_store_source_static_lib_for_tdd") { 51 part_name = "hiview" 52 public_configs = [ ":db_store_config" ] 53 54 sources = [ 55 "data_query.cpp", 56 "doc_db.cpp", 57 "doc_store.cpp", 58 "doc_util.cpp", 59 "store_manager.cpp", 60 ] 61 62 deps = [ 63 "//third_party/ejdb:ejdb_static_lib_for_tdd", 64 "//third_party/iowow:iowow", 65 ] 66 67 if (is_standard_system) { 68 external_deps = [ "hiviewdfx_hilog_native:libhilog" ] 69 } else { 70 external_deps = [ "hilog:libhilog" ] 71 } 72} 73 74group("unittest") { 75 testonly = true 76 deps = [ "test:DbStoreAdapterUnitTest" ] 77} 78