• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_base/netmanager_base_config.gni")
16
17group("common_target") {
18  deps = [
19    ":net_manager_common",
20    "napi_utils:napi_utils",
21  ]
22}
23
24config("netmgr_common_config") {
25  include_dirs = [
26    "common_utils/include",
27    "log/include",
28    "errorcode_utils/include",
29    "$INNERKITS_ROOT/include",
30    "$INNERKITS_ROOT/netconnclient/include",
31    "$INNERKITS_ROOT/netpolicyclient/include",
32    "$INNERKITS_ROOT/netstatsclient/include",
33  ]
34}
35
36ohos_shared_library("net_manager_common") {
37  sources = [
38    "common_utils/src/base64_utils.cpp",
39    "common_utils/src/event_report.cpp",
40    "common_utils/src/netmanager_base_common_utils.cpp",
41    "common_utils/src/netmanager_base_permission.cpp",
42    "common_utils/src/netmanager_hitrace.cpp",
43    "errorcode_utils/src/errorcode_convertor.cpp",
44    "log/src/net_mgr_log_wrapper.cpp",
45  ]
46
47  defines = [
48    "NETMGR_LOG_TAG = \"NetMgrCommon\"",
49    "LOG_DOMAIN = 0xD0015B0",
50  ]
51
52  if (enable_netmgr_debug) {
53    defines += [ "NETMGR_DEBUG" ]
54  }
55
56  if (is_standard_system) {
57    defines += [ "STANDARD_SYSTEM_ENABLE" ]
58  }
59
60  public_configs = [
61    ":netmgr_common_config",
62    "$C_UTILS_ROOT/base:utils_config",
63  ]
64
65  public_deps = [ "$C_UTILS_ROOT/base:utils" ]
66
67  if (is_standard_system) {
68    external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
69  } else {
70    external_deps = [ "hilog:libhilog" ]
71  }
72
73  external_deps += [
74    "access_token:libaccesstoken_sdk",
75    "hisysevent_native:libhisysevent",
76    "hitrace_native:hitrace_meter",
77    "ipc:ipc_single",
78  ]
79
80  part_name = "netmanager_base"
81  subsystem_name = "communication"
82}
83