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/relational_store/relational_store.gni") 17 18ohos_shared_library("cj_relational_store_ffi") { 19 sanitize = { 20 boundary_sanitize = true 21 ubsan = true 22 cfi = true 23 cfi_cross_dso = true 24 debug = false 25 } 26 27 include_dirs = [ 28 "include", 29 "${relational_store_common_path}/include", 30 "${relational_store_js_common_path}/include", 31 "${relational_store_napi_path}/relationalstore/include", 32 ] 33 34 if (product_name != "ohos-sdk") { 35 sources = [ 36 "src/relational_store_ffi.cpp", 37 "src/relational_store_impl_rdbpredicatesproxy.cpp", 38 "src/relational_store_impl_rdbstore.cpp", 39 "src/relational_store_impl_resultsetproxy.cpp", 40 "src/relational_store_utils.cpp", 41 ] 42 43 deps = [ 44 "${relational_store_innerapi_path}/appdatafwk:native_appdatafwk", 45 "${relational_store_innerapi_path}/rdb:native_rdb", 46 "${relational_store_innerapi_path}/rdb_data_share_adapter:rdb_data_share_adapter", 47 "${relational_store_napi_path}/rdb:napi_rdb", 48 "${relational_store_napi_path}/relationalstore:relationalstore", 49 ] 50 51 external_deps = [ 52 "ability_runtime:abilitykit_native", 53 "ability_runtime:napi_base_context", 54 "c_utils:utils", 55 "common_event_service:cesfwk_innerkits", 56 "hilog:libhilog", 57 "hitrace:hitrace_meter", 58 "napi:ace_napi", 59 "napi:cj_bind_ffi", 60 "napi:cj_bind_native", 61 ] 62 } else { 63 defines += [ "PREVIEWER" ] 64 sources = [ "mock/relational_store_mock.cpp" ] 65 } 66 innerapi_tags = [ "platformsdk" ] 67 subsystem_name = "distributeddatamgr" 68 part_name = "relational_store" 69} 70