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 include_dirs = [ 19 "${pasteboard_innerkits_path}/include", 20 "//foundation/distributeddatamgr/pasteboard/framework/tlv", 21 "//foundation/distributeddatamgr/pasteboard/framework/uri", 22 "${ability_runtime_napi_path}/inner/napi_common", 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_init.cpp", 41 "napi/src/napi_pasteboard.cpp", 42 "napi/src/napi_pastedata.cpp", 43 "napi/src/napi_pastedata_record.cpp", 44 "napi/src/napi_systempasteboard.cpp", 45 "napi/src/pasteboard_common.cpp", 46 ] 47 48 deps = [ 49 "//foundation/distributeddatamgr/pasteboard/framework/innerkits:pasteboard_client", 50 "//third_party/libuv:uv", 51 ] 52 53 external_deps = [ 54 "ability_base:want", 55 "ability_base:zuri", 56 "ability_runtime:napi_common", 57 "c_utils:utils", 58 "hilog:libhilog", 59 "image_framework:image", 60 "ipc:ipc_core", 61 "napi:ace_napi", 62 ] 63 64 relative_install_dir = "module" 65 66 subsystem_name = "distributeddatamgr" 67 part_name = "pasteboard" 68} 69