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") 15import("//foundation/distributeddatamgr/pasteboard/pasteboard.gni") 16 17ohos_shared_library("pasteboard_napi") { 18 branch_protector_ret = "pac_ret" 19 include_dirs = [ 20 "${pasteboard_innerkits_path}/include", 21 "//foundation/distributeddatamgr/pasteboard/framework/tlv", 22 "//foundation/distributeddatamgr/pasteboard/framework/uri", 23 "napi/include", 24 "${pasteboard_utils_path}/native/include", 25 ] 26 27 cflags = [ 28 "-fPIC", 29 "-g3", 30 ] 31 32 cflags_cc = [ 33 "-fstack-protector", 34 "-D_FORTIFY_SOURCE=2", 35 "-O2", 36 ] 37 38 sources = [ 39 "napi/src/async_call.cpp", 40 "napi/src/napi_data_utils.cpp", 41 "napi/src/napi_init.cpp", 42 "napi/src/napi_pasteboard.cpp", 43 "napi/src/napi_pasteboard_progress_signal.cpp", 44 "napi/src/napi_pastedata.cpp", 45 "napi/src/napi_pastedata_record.cpp", 46 "napi/src/napi_systempasteboard.cpp", 47 "napi/src/pasteboard_common.cpp", 48 ] 49 50 deps = [ 51 "${pasteboard_framework_path}:pasteboard_framework", 52 "${pasteboard_root_path}/framework/innerkits:pasteboard_client", 53 ] 54 55 external_deps = [ 56 "ability_base:want", 57 "ability_base:zuri", 58 "ability_runtime:napi_common", 59 "c_utils:utils", 60 "ffrt:libffrt", 61 "hilog:libhilog", 62 "image_framework:image", 63 "ipc:ipc_core", 64 "libuv:uv", 65 "napi:ace_napi", 66 ] 67 68 public_external_deps = [ 69 "udmf:udmf_client", 70 "udmf:udmf_data_napi", 71 ] 72 73 relative_install_dir = "module" 74 75 subsystem_name = "distributeddatamgr" 76 part_name = "pasteboard" 77} 78