1# Copyright (c) 2023 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") 15 16if (support_jsapi) { 17 config("napi_common_deps_config") { 18 include_dirs = [ 19 "include", 20 "../../../ipc/native/src/napi_common/include", 21 ] 22 } 23 24 ohos_shared_library("ipc_napi") { 25 sanitize = { 26 integer_overflow = true 27 } 28 branch_protector_ret = "pac_ret" 29 include_dirs = [ 30 "include", 31 "../../../utils/include", 32 "../../../ipc/native/src/napi_common/include", 33 ] 34 all_dependent_configs = [ ":napi_common_deps_config" ] 35 public_configs = [ ":napi_common_deps_config" ] 36 37 sources = [ 38 "../../../ipc/native/src/napi_common/source/napi_ashmem.cpp", 39 "../../../ipc/native/src/napi_common/source/napi_message_parcel_read.cpp", 40 "../../../ipc/native/src/napi_common/source/napi_message_parcel_write.cpp", 41 "../../../ipc/native/src/napi_common/source/napi_message_sequence_read.cpp", 42 "../../../ipc/native/src/napi_common/source/napi_message_sequence_write.cpp", 43 "../../../ipc/native/src/napi_common/source/napi_process_skeleton.cpp", 44 "../../../ipc/native/src/napi_common/source/napi_remote_object.cpp", 45 "../../../ipc/native/src/napi_common/source/napi_remote_object_holder.cpp", 46 "../../../ipc/native/src/napi_common/source/napi_remote_proxy_holder.cpp", 47 "../../../ipc/native/src/napi_common/source/napi_rpc_error.cpp", 48 ] 49 50 deps = [ "../../../interfaces/innerkits/ipc_core:ipc_core" ] 51 52 external_deps = [ 53 "c_utils:utils", 54 "hilog:libhilog", 55 "hitrace:hitrace_meter", 56 "libuv:uv", 57 "napi:ace_napi", 58 ] 59 60 install_images = [ system_base_dir ] 61 subsystem_name = "communication" 62 innerapi_tags = [ "platformsdk" ] 63 part_name = "ipc" 64 } 65} else { 66 ohos_shared_library("ipc_napi") { 67 } 68} 69