# Copyright (c) 2021 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") if (support_jsapi) { SUBSYSTEM_DIR = "//foundation/communication/ipc" config("rpc_public_config") { visibility = [ ":*" ] include_dirs = [ "$SUBSYSTEM_DIR/ipc/native/src/napi/include" ] } ohos_shared_library("rpc") { sanitize = { integer_overflow = true } version_script = "librpc_map" branch_protector_ret = "pac_ret" include_dirs = [ "$SUBSYSTEM_DIR/utils/include", "$SUBSYSTEM_DIR/ipc/native/c/adapter/include", "$SUBSYSTEM_DIR/ipc/native/c/adapter/access_token/include", "$SUBSYSTEM_DIR/ipc/native/src/napi_common/include", ] public_configs = [ ":rpc_public_config" ] sources = [ "$SUBSYSTEM_DIR/ipc/native/src/napi/src/napi_ipc_skeleton.cpp", "$SUBSYSTEM_DIR/ipc/native/src/napi/src/napi_message_option.cpp", "$SUBSYSTEM_DIR/ipc/native/src/napi/src/napi_remote_proxy.cpp", "$SUBSYSTEM_DIR/ipc/native/src/napi/src/napi_rpc_native_module.cpp", ] deps = [ "$SUBSYSTEM_DIR/interfaces/innerkits/ipc_core:ipc_core", "$SUBSYSTEM_DIR/interfaces/innerkits/ipc_napi_common:ipc_napi", ] external_deps = [ "c_utils:utils", "hilog:libhilog", "hitrace:hitrace_meter", "libuv:uv", "napi:ace_napi", ] relative_install_dir = "module" subsystem_name = "communication" part_name = "ipc" } } else { ohos_shared_library("rpc") { } }