# 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/kv_store/kv_store.gni") ohos_shared_library("cj_distributed_kv_store_ffi") { sanitize = { cfi = true cfi_cross_dso = true debug = false } include_dirs = [ "${kv_store_base_path}/frameworks/common", "${kv_store_base_path}/frameworks/jskitsimpl/distributedkvstore/include", "${kv_store_base_path}/frameworks/innerkitsimpl/distributeddatafwk/include", "${kv_store_base_path}/frameworks/innerkitsimpl/kvdb/include", "${kv_store_base_path}/frameworks/cj/include", ] if (product_name != "ohos-sdk") { sources = [ "../../frameworks/cj/src/distributed_kv_store_ffi.cpp", "../../frameworks/cj/src/distributed_kv_store_impl.cpp", "../../frameworks/cj/src/distributed_kv_store_utils.cpp", ] deps = [ "${kv_store_base_path}/interfaces/innerkits/distributeddata:distributeddata_inner" ] external_deps = [ "ability_base:want", "ability_runtime:ability_connect_callback_stub", "ability_runtime:ability_manager", "ability_runtime:abilitykit_native", "ability_runtime:napi_base_context", "c_utils:utils", "common_event_service:cesfwk_innerkits", "hilog:libhilog", "ipc:ipc_single", "napi:ace_napi", "napi:cj_bind_ffi", "napi:cj_bind_native", ] } else { defines += [ "PREVIEWER" ] sources = [ "../../kvstoremock/frameworks/cj/distributed_kv_store_mock.cpp" ] } innerapi_tags = [ "platformsdk" ] subsystem_name = "distributeddatamgr" part_name = "kv_store" }