• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023 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
17NETMANAGER_EXT_NAPI_ROOT = "$NETMANAGER_EXT_ROOT/frameworks/js/napi/"
18
19ohos_shared_library("vpn") {
20  sources = [
21    "src/context/destroy_context.cpp",
22    "src/context/prepare_context.cpp",
23    "src/context/protect_context.cpp",
24    "src/context/setup_context.cpp",
25    "src/vpn_async_work.cpp",
26    "src/vpn_connection.cpp",
27    "src/vpn_exec.cpp",
28    "src/vpn_module.cpp",
29    "src/vpn_monitor.cpp",
30  ]
31
32  include_dirs = [
33    "$NETMANAGER_EXT_NAPI_ROOT/vpn/include",
34    "$NETMANAGER_EXT_NAPI_ROOT/vpn/include/context",
35    "$NETMANAGER_BASE_ROOT/utils/common_utils/include",
36    "$NETMANAGER_BASE_ROOT/utils/errorcode_utils/include",
37    "$NETMANAGER_BASE_ROOT/utils/napi_utils/include",
38    "$BASE_INNERKITS_ROOT/netvpnclient/include",
39    "$BASE_INNERKITS_ROOT/netvpnclient/include/ipc",
40  ]
41
42  deps = [
43    "$NETMANAGER_EXT_ROOT/interfaces/innerkits/netvpnclient:net_vpn_manager_if",
44    "$NETMANAGER_EXT_ROOT/utils:net_manager_ext_common",
45  ]
46
47  external_deps = [
48    "c_utils:utils",
49    "hilog:libhilog",
50    "ipc:ipc_core",
51    "napi:ace_napi",
52    "netmanager_base:napi_utils",
53    "netmanager_base:net_manager_common",
54  ]
55
56  relative_install_dir = "module/net"
57  part_name = "netmanager_ext"
58  subsystem_name = "communication"
59}
60