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") 15import("//foundation/communication/netmanager_base/netmanager_base_config.gni") 16 17group("common_target") { 18 deps = [ ":net_manager_common" ] 19} 20 21config("netmgr_common_config") { 22 include_dirs = [ 23 "common_utils/include", 24 "log/include", 25 ] 26} 27 28ohos_shared_library("net_manager_common") { 29 sources = [ 30 "common_utils/src/netmanager_base_common_utils.cpp", 31 "common_utils/src/netmanager_base_permission.cpp", 32 "log/src/net_mgr_log_wrapper.cpp", 33 ] 34 35 defines = [ 36 "NETMGR_LOG_TAG = \"NetMgrCommon\"", 37 "LOG_DOMAIN = 0xD0015B0", 38 ] 39 40 if (enable_netmgr_debug) { 41 defines += [ "NETMGR_DEBUG" ] 42 } 43 44 if (is_standard_system) { 45 defines += [ "STANDARD_SYSTEM_ENABLE" ] 46 } 47 48 public_configs = [ 49 ":netmgr_common_config", 50 "//utils/native/base:utils_config", 51 ] 52 53 public_deps = [ "//utils/native/base:utils" ] 54 55 if (is_standard_system) { 56 external_deps = [ "hiviewdfx_hilog_native:libhilog" ] 57 } else { 58 external_deps = [ "hilog:libhilog" ] 59 } 60 61 external_deps += [ 62 "access_token:libaccesstoken_sdk", 63 "ipc:ipc_single", 64 ] 65 66 part_name = "netmanager_base" 67 subsystem_name = "communication" 68} 69