• 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("vpnextension") {
20  sanitize = {
21    cfi = true
22    cfi_cross_dso = true
23    debug = false
24  }
25
26  branch_protector_ret = "pac_ret"
27
28  sources = [
29    "src/context/destroy_context_ext.cpp",
30    "src/context/prepare_context_ext.cpp",
31    "src/context/protect_context_ext.cpp",
32    "src/context/setup_context_ext.cpp",
33    "src/vpn_async_work_ext.cpp",
34    "src/vpn_connection_ext.cpp",
35    "src/vpn_exec_ext.cpp",
36    "src/vpn_module_ext.cpp",
37    "src/vpn_monitor_ext.cpp",
38  ]
39
40  if (netmanager_ext_feature_sysvpn) {
41    sources += [
42      "src/context/generate_vpnId_context_ext.cpp",
43      "src/uuid.cpp",
44      "src/vpn_config_utils_ext.cpp",
45    ]
46  }
47
48  include_dirs = [
49    "$EXT_INNERKITS_ROOT/include",
50    "$NETMANAGER_EXT_NAPI_ROOT/vpnext/include",
51    "$NETMANAGER_EXT_NAPI_ROOT/vpnext/include/context",
52    "$NETMANAGER_EXT_ROOT/interfaces/innerkits/vpnextension/include",
53  ]
54
55  deps = [
56    "$NETMANAGER_EXT_ROOT/interfaces/innerkits/netvpnclient:net_vpn_manager_if",
57    "$NETMANAGER_EXT_ROOT/interfaces/innerkits/vpnextension:vpn_extension",
58  ]
59
60  external_deps = [
61    "ability_base:want",
62    "ability_base:zuri",
63    "ability_runtime:ability_connect_callback_stub",
64    "ability_runtime:ability_manager",
65    "ability_runtime:app_context",
66    "ability_runtime:napi_common",
67    "bundle_framework:appexecfwk_base",
68    "c_utils:utils",
69    "hilog:libhilog",
70    "ipc:ipc_core",
71    "napi:ace_napi",
72    "netmanager_base:napi_utils",
73    "netmanager_base:net_conn_manager_if",
74    "netmanager_base:net_data_share",
75    "netmanager_base:net_manager_common",
76    "samgr:samgr_proxy",
77    "os_account:os_account_innerkits",
78  ]
79
80  if (product_name != "qemu-arm-linux-min") {
81    external_deps += [ "hiappevent:hiappevent_innerapi" ]
82  }
83
84  relative_install_dir = "module/net"
85  part_name = "netmanager_ext"
86  subsystem_name = "communication"
87}
88