1# Copyright (c) 2021-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 17group("common_target") { 18 deps = [ 19 ":net_event_report", 20 ":net_manager_ext_common", 21 ] 22} 23 24config("netmgr_ext_common_config") { 25 include_dirs = [ 26 "log/include", 27 "event_report/include", 28 ] 29} 30 31ohos_shared_library("net_manager_ext_common") { 32 sources = [ "log/src/netmgr_ext_log_wrapper.cpp" ] 33 34 defines = [ 35 "NETMGR_EXT_LOG_TAG = \"NetMgrExtCommon\"", 36 "LOG_DOMAIN = 0xD0015B0", 37 ] 38 39 if (is_standard_system) { 40 defines += [ "STANDARD_SYSTEM_ENABLE" ] 41 } 42 43 public_configs = [ 44 ":netmgr_ext_common_config", 45 "$C_UTILS_ROOT/base:utils_config", 46 ] 47 48 public_deps = [ "$C_UTILS_ROOT/base:utils" ] 49 50 if (is_double_framework) { 51 cflags_cc = [ "-DCONFIG_DUAL_FRAMEWORK" ] 52 } 53 54 if (is_standard_system) { 55 external_deps = [ 56 "c_utils:utils", 57 "hiviewdfx_hilog_native:libhilog", 58 ] 59 } else { 60 external_deps = [ 61 "c_utils:utils", 62 "hilog:libhilog", 63 ] 64 } 65 66 part_name = "netmanager_ext" 67 subsystem_name = "communication" 68} 69 70ohos_shared_library("net_event_report") { 71 sources = [ "event_report/src/net_event_report.cpp" ] 72 73 public_configs = [ ":netmgr_ext_common_config" ] 74 75 external_deps = [ "hisysevent_native:libhisysevent" ] 76 77 part_name = "netmanager_ext" 78 subsystem_name = "communication" 79} 80