1# Copyright (c) 2021 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") 15if (support_jsapi) { 16 SUBSYSTEM_DIR = "//foundation/communication/ipc" 17 18 config("rpc_public_config") { 19 visibility = [ ":*" ] 20 include_dirs = [ "$SUBSYSTEM_DIR/ipc/native/src/napi/include" ] 21 } 22 23 ohos_shared_library("rpc") { 24 sanitize = { 25 integer_overflow = true 26 } 27 version_script = "librpc_map" 28 include_dirs = [ 29 "$SUBSYSTEM_DIR/utils/include", 30 "//foundation/arkui/napi/interfaces/kits", 31 "//foundation/arkui/napi/native_engine", 32 "//utils/system/safwk/native/include", 33 "$SUBSYSTEM_DIR/ipc/native/c/adapter/include", 34 "$SUBSYSTEM_DIR/ipc/native/c/adapter/access_token/include", 35 "$SUBSYSTEM_DIR/ipc/native/src/napi_common/include", 36 ] 37 public_configs = [ ":rpc_public_config" ] 38 39 sources = [ 40 "$SUBSYSTEM_DIR/ipc/native/src/napi/src/napi_ipc_skeleton.cpp", 41 "$SUBSYSTEM_DIR/ipc/native/src/napi/src/napi_message_option.cpp", 42 "$SUBSYSTEM_DIR/ipc/native/src/napi/src/napi_remote_proxy.cpp", 43 "$SUBSYSTEM_DIR/ipc/native/src/napi/src/napi_rpc_native_module.cpp", 44 ] 45 46 deps = [ 47 "$SUBSYSTEM_DIR/interfaces/innerkits/ipc_core:ipc_core", 48 "$SUBSYSTEM_DIR/interfaces/innerkits/ipc_napi_common:ipc_napi", 49 "//third_party/libuv:uv", 50 ] 51 52 external_deps = [ 53 "c_utils:utils", 54 "hilog:libhilog", 55 "hitrace:hitrace_meter", 56 "napi:ace_napi", 57 ] 58 59 relative_install_dir = "module" 60 61 subsystem_name = "communication" 62 part_name = "ipc" 63 } 64} 65 66group("ipc_js") { 67 if (support_jsapi) { 68 deps = [ ":rpc" ] 69 } 70} 71