# Copyright (c) 2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("//build/ohos/ace/ace.gni") import("//foundation/distributeddatamgr/data_share/datashare.gni") import("//foundation/distributeddatamgr/kv_store/kv_store.gni") base_output_path = get_label_info(":distributed_kvstore_js", "target_out_dir") distributed_data_js_obj_path = base_output_path + "/distributed_kvstore.o" gen_js_obj("distributed_kvstore_js") { input = "distributed_kvstore.js" output = distributed_data_js_obj_path } group("build_module") { deps = [] if (use_platform_win || use_platforn_mac) { deps += [ ":distributedkvstore" ] } } if (use_platform_win || use_platforn_mac) { ohos_shared_library("distributedkvstore") { include_dirs = [ "//third_party/json/single_include", "//third_party/libuv/include", "//third_party/node/src", "//foundation/distributeddatamgr/kv_store", "//foundation/distributeddatamgr/kv_store/frameworks/common", "//foundation/distributeddatamgr/kv_store/frameworks/jskitsimpl/distributedkvstore/include", "//foundation/distributeddatamgr/kv_store/frameworks/innerkitsimpl/distributeddatafwk/include", "//foundation/distributeddatamgr/kv_store/interfaces/innerkits/distributeddata/include", "//foundation/distributeddatamgr/kv_store/kvstoremock/interfaces/mock/base", "//foundation/distributeddatamgr/kv_store/kvstoremock/interfaces/mock", "//foundation/distributeddatamgr/data_share/interfaces/inner_api/common/include", "//foundation/distributeddatamgr/data_share/interfaces/inner_api/provider/include", "//commonlibrary/c_utils/base/include", "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/include", "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/framework/include/utils", "//foundation/ability/ability_runtime/interfaces/kits/native/ability/native", "//foundation/bundlemanager/bundle_framework/interfaces/inner_api/appexecfwk_base/include", ] cflags_cc = [ "-std=c++17" ] sources = [ "../../../frameworks/innerkitsimpl/distributeddatafwk/src/kv_utils.cpp", "../../../frameworks/jskitsimpl/distributedkvstore/src/js_util_mock.cpp", "../../../interfaces/mock/log_print.cpp", "//foundation/distributeddatamgr/kv_store/frameworks/jskitsimpl/distributedkvstore/src/entry_point.cpp", "//foundation/distributeddatamgr/kv_store/frameworks/jskitsimpl/distributedkvstore/src/js_const_properties.cpp", "//foundation/distributeddatamgr/kv_store/frameworks/jskitsimpl/distributedkvstore/src/js_device_kv_store.cpp", "//foundation/distributeddatamgr/kv_store/frameworks/jskitsimpl/distributedkvstore/src/js_error_utils.cpp", "//foundation/distributeddatamgr/kv_store/frameworks/jskitsimpl/distributedkvstore/src/js_field_node.cpp", "//foundation/distributeddatamgr/kv_store/frameworks/jskitsimpl/distributedkvstore/src/js_kv_manager.cpp", "//foundation/distributeddatamgr/kv_store/frameworks/jskitsimpl/distributedkvstore/src/js_kv_store_resultset.cpp", "//foundation/distributeddatamgr/kv_store/frameworks/jskitsimpl/distributedkvstore/src/js_observer.cpp", "//foundation/distributeddatamgr/kv_store/frameworks/jskitsimpl/distributedkvstore/src/js_query.cpp", "//foundation/distributeddatamgr/kv_store/frameworks/jskitsimpl/distributedkvstore/src/js_schema.cpp", "//foundation/distributeddatamgr/kv_store/frameworks/jskitsimpl/distributedkvstore/src/js_single_kv_store.cpp", "//foundation/distributeddatamgr/kv_store/frameworks/jskitsimpl/distributedkvstore/src/napi_queue.cpp", "//foundation/distributeddatamgr/kv_store/frameworks/jskitsimpl/distributedkvstore/src/uv_queue.cpp", ] deps = [ "${kv_store_base_path}/kvstoremock/interfaces/innerkits/distributeddata:distributeddata_inner_mock", "//foundation/arkui/napi:ace_napi", "//third_party/bounds_checking_function:libsec_static", "//third_party/libuv:uv", ] if (use_platform_win) { defines = [ "IS_WINDOWS" ] deps += [ "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog_windows", ] } else if (use_platforn_mac) { defines = [ "_MACOS" ] deps += [ "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog_mac" ] } subsystem_name = "distributeddatamgr" relative_install_dir = "module/data" part_name = "kv_store" } }