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("//build/ohos/ace/ace.gni") 16import("//foundation/distributeddatamgr/kv_store/kv_store.gni") 17 18ohos_shared_library("cj_distributed_kv_store_ffi") { 19 sanitize = { 20 cfi = true 21 cfi_cross_dso = true 22 debug = false 23 } 24 25 include_dirs = [ 26 "${kv_store_base_path}/frameworks/common", 27 "${kv_store_base_path}/frameworks/jskitsimpl/distributedkvstore/include", 28 "${kv_store_base_path}/frameworks/innerkitsimpl/distributeddatafwk/include", 29 "${kv_store_base_path}/frameworks/innerkitsimpl/kvdb/include", 30 "${kv_store_base_path}/frameworks/cj/include", 31 ] 32 33 if (product_name != "ohos-sdk") { 34 sources = [ 35 "../../frameworks/cj/src/distributed_kv_store_ffi.cpp", 36 "../../frameworks/cj/src/distributed_kv_store_impl.cpp", 37 "../../frameworks/cj/src/distributed_kv_store_utils.cpp", 38 ] 39 40 deps = [ "${kv_store_base_path}/interfaces/innerkits/distributeddata:distributeddata_inner" ] 41 42 external_deps = [ 43 "ability_base:want", 44 "ability_runtime:ability_connect_callback_stub", 45 "ability_runtime:ability_manager", 46 "ability_runtime:abilitykit_native", 47 "ability_runtime:napi_base_context", 48 "c_utils:utils", 49 "common_event_service:cesfwk_innerkits", 50 "hilog:libhilog", 51 "ipc:ipc_single", 52 "napi:ace_napi", 53 "napi:cj_bind_ffi", 54 "napi:cj_bind_native", 55 ] 56 } else { 57 defines += [ "PREVIEWER" ] 58 sources = 59 [ "../../kvstoremock/frameworks/cj/distributed_kv_store_mock.cpp" ] 60 } 61 innerapi_tags = [ "platformsdk" ] 62 subsystem_name = "distributeddatamgr" 63 part_name = "kv_store" 64} 65