1# Copyright (c) 2022 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/communication/netmanager_ext/netmanager_ext_config.gni") 16 17config("sharing_config") { 18 visibility = [ ":netshare" ] 19 include_dirs = [ 20 "include", 21 "$NETMANAGER_BASE_ROOT/utils/log/include", 22 ] 23} 24 25ohos_shared_library("sharing") { 26 sources = [ 27 "src/netshare_async_work.cpp", 28 "src/netshare_callback_observer.cpp", 29 "src/netshare_exec.cpp", 30 "src/netshare_issharing_context.cpp", 31 "src/netshare_module.cpp", 32 "src/netshare_observer_wrapper.cpp", 33 "src/netshare_startsharing_context.cpp", 34 ] 35 36 deps = [ 37 "$NETMANAGER_BASE_ROOT/utils/napi_utils:napi_utils", 38 "$NETMANAGER_EXT_ROOT/interfaces/innerkits/netshareclient:net_tether_manager_if", 39 "$NETMANAGER_EXT_ROOT/utils:net_manager_ext_common", 40 "$THIRD_PARTY_ROOT/libuv:uv", 41 ] 42 43 external_deps = [ 44 "hiviewdfx_hilog_native:libhilog", 45 "ipc:ipc_core", 46 ] 47 48 configs = [ ":sharing_config" ] 49 50 relative_install_dir = "module/net" 51 part_name = "netmanager_ext" 52 subsystem_name = "communication" 53} 54