# Copyright (C) 2023 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/config/ohos/config.gni") import("//build/ohos.gni") import("//foundation/arkui/napi/napi.gni") import("//foundation/distributeddatamgr/relational_store/relational_store.gni") relational_store_ndk_path = "${relational_store_base_path}/interfaces" config("config") { visibility = [ ":*" ] cflags = [ "-Wall", "-Werror", "-g3", "-Wunused-variable", ] } ## backup ############################################################### ohos_shared_library("backup") { subsystem_name = "distributeddatamgr" part_name = "relational_store" sources = [ "./napi/rdb_store_backup_test.cpp" ] include_dirs = [ "../cpp", "../cpp/common", "${relational_store_common_path}/include", "${relational_store_native_path}/rdb/include", "${relational_store_ndk_path}/ndk/include/", "${relational_store_ndk_path}/ndk/src/", "${relational_store_base_path}/interfaces/ndk/include/oh_cursor.h", "${relational_store_base_path}/interfaces/ndk/include/oh_predicates.h", "${relational_store_base_path}/interfaces/ndk/include/oh_values_object.h", "${relational_store_base_path}/interfaces/ndk/include/oh_values_bucket.h", "${relational_store_base_path}/interfaces/ndk/include/relational_store.h", "${relational_store_base_path}/interfaces/ndk/include/relational_store_error_code.h", "${relational_store_base_path}/interfaces/ndk/src/relational_cursor.cpp", "${relational_store_base_path}/interfaces/ndk/src/relational_predicates.cpp", "${relational_store_base_path}/interfaces/ndk/src/relational_store.cpp", "${relational_store_base_path}/interfaces/ndk/src/relational_value_object.cpp", "${relational_store_base_path}/interfaces/ndk/src/relational_values_bucket.cpp", "${relational_store_base_path}/interfaces/ndk/include", ] configs = [ ":config" ] deps = [ "${relational_store_ndk_path}/ndk/src:native_rdb_ndk" ] external_deps = [ "napi:ace_napi" ] output_extension = "so" } ## encrypt ############################################################### ohos_shared_library("encrypt") { subsystem_name = "distributeddatamgr" part_name = "relational_store" sources = [ "./napi/rdb_store_encrypt_test.cpp" ] include_dirs = [ "../cpp", "../cpp/common", "${relational_store_common_path}/include", "${relational_store_native_path}/rdb/include", "${relational_store_ndk_path}/ndk/include/", "${relational_store_ndk_path}/ndk/src/", "${relational_store_base_path}/interfaces/ndk/include/oh_cursor.h", "${relational_store_base_path}/interfaces/ndk/include/oh_predicates.h", "${relational_store_base_path}/interfaces/ndk/include/oh_values_object.h", "${relational_store_base_path}/interfaces/ndk/include/oh_values_bucket.h", "${relational_store_base_path}/interfaces/ndk/include/relational_store.h", "${relational_store_base_path}/interfaces/ndk/include/relational_store_error_code.h", "${relational_store_base_path}/interfaces/ndk/src/relational_cursor.cpp", "${relational_store_base_path}/interfaces/ndk/src/relational_predicates.cpp", "${relational_store_base_path}/interfaces/ndk/src/relational_store.cpp", "${relational_store_base_path}/interfaces/ndk/src/relational_value_object.cpp", "${relational_store_base_path}/interfaces/ndk/src/relational_values_bucket.cpp", "${relational_store_base_path}/interfaces/ndk/include", ] configs = [ ":config" ] deps = [ "${relational_store_ndk_path}/ndk/src:native_rdb_ndk" ] external_deps = [ "napi:ace_napi" ] output_extension = "so" } ## level ############################################################### ohos_shared_library("level") { subsystem_name = "distributeddatamgr" part_name = "relational_store" sources = [ "./napi/rdb_store_level_test.cpp" ] include_dirs = [ "../cpp", "../cpp/common", "${relational_store_common_path}/include", "${relational_store_native_path}/rdb/include", "${relational_store_ndk_path}/ndk/include/", "${relational_store_ndk_path}/ndk/src/", "${relational_store_base_path}/interfaces/ndk/include/oh_cursor.h", "${relational_store_base_path}/interfaces/ndk/include/oh_predicates.h", "${relational_store_base_path}/interfaces/ndk/include/oh_values_object.h", "${relational_store_base_path}/interfaces/ndk/include/oh_values_bucket.h", "${relational_store_base_path}/interfaces/ndk/include/relational_store.h", "${relational_store_base_path}/interfaces/ndk/include/relational_store_error_code.h", "${relational_store_base_path}/interfaces/ndk/src/relational_cursor.cpp", "${relational_store_base_path}/interfaces/ndk/src/relational_predicates.cpp", "${relational_store_base_path}/interfaces/ndk/src/relational_store.cpp", "${relational_store_base_path}/interfaces/ndk/src/relational_value_object.cpp", "${relational_store_base_path}/interfaces/ndk/src/relational_values_bucket.cpp", "${relational_store_base_path}/interfaces/ndk/include", ] configs = [ ":config" ] deps = [ "${relational_store_ndk_path}/ndk/src:native_rdb_ndk" ] external_deps = [ "napi:ace_napi" ] output_extension = "so" } ## cursor ############################################################### ohos_shared_library("cursor") { subsystem_name = "distributeddatamgr" part_name = "relational_store" sources = [ "./napi/rdb_store_cursor_test.cpp" ] include_dirs = [ "../cpp", "../cpp/common", "${relational_store_common_path}/include", "${relational_store_native_path}/rdb/include", "${relational_store_ndk_path}/ndk/include/", "${relational_store_ndk_path}/ndk/src/", "${relational_store_base_path}/interfaces/ndk/include/oh_cursor.h", "${relational_store_base_path}/interfaces/ndk/include/oh_predicates.h", "${relational_store_base_path}/interfaces/ndk/include/oh_values_object.h", "${relational_store_base_path}/interfaces/ndk/include/oh_values_bucket.h", "${relational_store_base_path}/interfaces/ndk/include/relational_store.h", "${relational_store_base_path}/interfaces/ndk/include/relational_store_error_code.h", "${relational_store_base_path}/interfaces/ndk/src/relational_cursor.cpp", "${relational_store_base_path}/interfaces/ndk/src/relational_predicates.cpp", "${relational_store_base_path}/interfaces/ndk/src/relational_store.cpp", "${relational_store_base_path}/interfaces/ndk/src/relational_value_object.cpp", "${relational_store_base_path}/interfaces/ndk/src/relational_values_bucket.cpp", "${relational_store_base_path}/interfaces/ndk/include", ] configs = [ ":config" ] deps = [ "${relational_store_ndk_path}/ndk/src:native_rdb_ndk" ] external_deps = [ "napi:ace_napi" ] output_extension = "so" } ## predicates ############################################################### ohos_shared_library("predicates") { subsystem_name = "distributeddatamgr" part_name = "relational_store" sources = [ "./napi/rdb_store_predicates_test.cpp" ] include_dirs = [ "../cpp", "../cpp/common", "${relational_store_common_path}/include", "${relational_store_native_path}/rdb/include", "${relational_store_ndk_path}/ndk/include/", "${relational_store_ndk_path}/ndk/src/", "${relational_store_base_path}/interfaces/ndk/include/oh_cursor.h", "${relational_store_base_path}/interfaces/ndk/include/oh_predicates.h", "${relational_store_base_path}/interfaces/ndk/include/oh_values_object.h", "${relational_store_base_path}/interfaces/ndk/include/oh_values_bucket.h", "${relational_store_base_path}/interfaces/ndk/include/relational_store.h", "${relational_store_base_path}/interfaces/ndk/include/relational_store_error_code.h", "${relational_store_base_path}/interfaces/ndk/src/relational_cursor.cpp", "${relational_store_base_path}/interfaces/ndk/src/relational_predicates.cpp", "${relational_store_base_path}/interfaces/ndk/src/relational_store.cpp", "${relational_store_base_path}/interfaces/ndk/src/relational_value_object.cpp", "${relational_store_base_path}/interfaces/ndk/src/relational_values_bucket.cpp", "${relational_store_base_path}/interfaces/ndk/include", ] configs = [ ":config" ] deps = [ "${relational_store_ndk_path}/ndk/src:native_rdb_ndk" ] external_deps = [ "napi:ace_napi" ] output_extension = "so" } ## rdbstore ############################################################### ohos_shared_library("rdbstore") { subsystem_name = "distributeddatamgr" part_name = "relational_store" sources = [ "./napi/rdb_store_test.cpp" ] include_dirs = [ "../cpp", "../cpp/common", "${relational_store_common_path}/include", "${relational_store_native_path}/rdb/include", "${relational_store_ndk_path}/ndk/include/", "${relational_store_ndk_path}/ndk/src/", "${relational_store_base_path}/interfaces/ndk/include/oh_cursor.h", "${relational_store_base_path}/interfaces/ndk/include/oh_predicates.h", "${relational_store_base_path}/interfaces/ndk/include/oh_values_object.h", "${relational_store_base_path}/interfaces/ndk/include/oh_values_bucket.h", "${relational_store_base_path}/interfaces/ndk/include/relational_store.h", "${relational_store_base_path}/interfaces/ndk/include/relational_store_error_code.h", "${relational_store_base_path}/interfaces/ndk/src/relational_cursor.cpp", "${relational_store_base_path}/interfaces/ndk/src/relational_predicates.cpp", "${relational_store_base_path}/interfaces/ndk/src/relational_store.cpp", "${relational_store_base_path}/interfaces/ndk/src/relational_value_object.cpp", "${relational_store_base_path}/interfaces/ndk/src/relational_values_bucket.cpp", "${relational_store_base_path}/interfaces/ndk/include", ] configs = [ ":config" ] deps = [ "${relational_store_ndk_path}/ndk/src:native_rdb_ndk" ] external_deps = [ "napi:ace_napi" ] output_extension = "so" }