• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_base/netmanager_base_config.gni")
16
17ohos_shared_library("network") {
18  include_dirs = [
19    "async_context/include",
20    "async_work/include",
21    "constant/include",
22    "network_exec/include",
23    "network_module/include",
24    "observer/include",
25    "options/include",
26    "$NETMANAGER_BASE_ROOT/utils/log/include",
27  ]
28
29  sources = [
30    "async_context/src/gettype_context.cpp",
31    "async_context/src/subscribe_context.cpp",
32    "async_context/src/unsubscribe_context.cpp",
33    "async_work/src/network_async_work.cpp",
34    "network_exec/src/network_exec.cpp",
35    "network_module/src/network_module.cpp",
36  ]
37
38  deps = [
39    "$INNERKITS_ROOT/netconnclient:net_conn_manager_if",
40    "$NETMANAGER_BASE_ROOT/utils/napi_utils:napi_utils",
41    "$THIRD_PARTY_ROOT/libuv:uv",
42  ]
43  if (defined(global_parts_info) &&
44      defined(global_parts_info.telephony_core_service) &&
45      global_parts_info.telephony_core_service) {
46    deps += [
47      "$TELEPHONY_ROOT/core_service/interfaces/innerkits:tel_core_service_api",
48    ]
49    defines = [ "HAS_TELEPHONY=1" ]
50  } else {
51    defines = [ "HAS_TELEPHONY=0" ]
52  }
53
54  external_deps = [
55    "c_utils:utils",
56    "hiviewdfx_hilog_native:libhilog",
57    "ipc:ipc_core",
58  ]
59
60  relative_install_dir = "module"
61  part_name = "netmanager_base"
62  subsystem_name = "communication"
63}
64