115053c2dSopenharmony_ci# Copyright (c) 2022 Huawei Device Co., Ltd. 215053c2dSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 315053c2dSopenharmony_ci# you may not use this file except in compliance with the License. 415053c2dSopenharmony_ci# You may obtain a copy of the License at 515053c2dSopenharmony_ci# 615053c2dSopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 715053c2dSopenharmony_ci# 815053c2dSopenharmony_ci# Unless required by applicable law or agreed to in writing, software 915053c2dSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 1015053c2dSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1115053c2dSopenharmony_ci# See the License for the specific language governing permissions and 1215053c2dSopenharmony_ci# limitations under the License. 1315053c2dSopenharmony_ci 1415053c2dSopenharmony_ciimport("//build/ohos.gni") 1515053c2dSopenharmony_ciimport("//build/ohos/ace/ace.gni") 1615053c2dSopenharmony_ciimport("//foundation/distributeddatamgr/kv_store/kv_store.gni") 1715053c2dSopenharmony_ci 1815053c2dSopenharmony_ciohos_shared_library("cj_distributed_kv_store_ffi") { 1915053c2dSopenharmony_ci sanitize = { 2015053c2dSopenharmony_ci cfi = true 2115053c2dSopenharmony_ci cfi_cross_dso = true 2215053c2dSopenharmony_ci debug = false 2315053c2dSopenharmony_ci } 2415053c2dSopenharmony_ci 2515053c2dSopenharmony_ci include_dirs = [ 2615053c2dSopenharmony_ci "${kv_store_base_path}/frameworks/common", 2715053c2dSopenharmony_ci "${kv_store_base_path}/frameworks/jskitsimpl/distributedkvstore/include", 2815053c2dSopenharmony_ci "${kv_store_base_path}/frameworks/innerkitsimpl/distributeddatafwk/include", 2915053c2dSopenharmony_ci "${kv_store_base_path}/frameworks/innerkitsimpl/kvdb/include", 3015053c2dSopenharmony_ci "${kv_store_base_path}/frameworks/cj/include", 3115053c2dSopenharmony_ci ] 3215053c2dSopenharmony_ci 3315053c2dSopenharmony_ci if (product_name != "ohos-sdk") { 3415053c2dSopenharmony_ci sources = [ 3515053c2dSopenharmony_ci "../../frameworks/cj/src/distributed_kv_store_ffi.cpp", 3615053c2dSopenharmony_ci "../../frameworks/cj/src/distributed_kv_store_impl.cpp", 3715053c2dSopenharmony_ci "../../frameworks/cj/src/distributed_kv_store_utils.cpp", 3815053c2dSopenharmony_ci ] 3915053c2dSopenharmony_ci 4015053c2dSopenharmony_ci deps = [ "${kv_store_base_path}/interfaces/innerkits/distributeddata:distributeddata_inner" ] 4115053c2dSopenharmony_ci 4215053c2dSopenharmony_ci external_deps = [ 4315053c2dSopenharmony_ci "ability_base:want", 4415053c2dSopenharmony_ci "ability_runtime:ability_connect_callback_stub", 4515053c2dSopenharmony_ci "ability_runtime:ability_manager", 4615053c2dSopenharmony_ci "ability_runtime:abilitykit_native", 4715053c2dSopenharmony_ci "ability_runtime:napi_base_context", 4815053c2dSopenharmony_ci "c_utils:utils", 4915053c2dSopenharmony_ci "common_event_service:cesfwk_innerkits", 5015053c2dSopenharmony_ci "hilog:libhilog", 5115053c2dSopenharmony_ci "ipc:ipc_single", 5215053c2dSopenharmony_ci "napi:ace_napi", 5315053c2dSopenharmony_ci "napi:cj_bind_ffi", 5415053c2dSopenharmony_ci "napi:cj_bind_native", 5515053c2dSopenharmony_ci ] 5615053c2dSopenharmony_ci } else { 5715053c2dSopenharmony_ci defines += [ "PREVIEWER" ] 5815053c2dSopenharmony_ci sources = 5915053c2dSopenharmony_ci [ "../../kvstoremock/frameworks/cj/distributed_kv_store_mock.cpp" ] 6015053c2dSopenharmony_ci } 6115053c2dSopenharmony_ci innerapi_tags = [ "platformsdk" ] 6215053c2dSopenharmony_ci subsystem_name = "distributeddatamgr" 6315053c2dSopenharmony_ci part_name = "kv_store" 6415053c2dSopenharmony_ci} 65