• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-2024 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("../../common/config/common.gni")
16
17config("edmservice_kits_config") {
18  include_dirs = [
19    "../../common/native/include",
20    "account_manager/include",
21    "application_manager/include",
22    "bluetooth_manager/include",
23    "browser/include",
24    "bundle_manager/include",
25    "common/include",
26    "datetime_manager/include",
27    "device_control/include",
28    "device_info/include",
29    "device_settings/include",
30    "location_manager/include",
31    "network_manager/include",
32    "restrictions/include",
33    "security_manager/include",
34    "system_manager/include",
35    "usb_manager/include",
36    "wifi_manager/include",
37  ]
38}
39
40ohos_shared_library("edmservice_kits") {
41  public_configs = [ ":edmservice_kits_config" ]
42
43  sources = [
44    "./account_manager/src/account_manager_proxy.cpp",
45    "./application_manager/src/application_manager_proxy.cpp",
46    "./bluetooth_manager/src/bluetooth_manager_proxy.cpp",
47    "./browser/src/browser_proxy.cpp",
48    "./bundle_manager/src/bundle_manager_proxy.cpp",
49    "./bundle_manager/src/install_param_serializer.cpp",
50    "./common/src/domain_account_policy.cpp",
51    "./common/src/edm_load_callback.cpp",
52    "./common/src/edm_load_manager.cpp",
53    "./common/src/ent_info.cpp",
54    "./common/src/enterprise_device_mgr_proxy.cpp",
55    "./datetime_manager/src/datetime_manager_proxy.cpp",
56    "./device_control/src/device_control_proxy.cpp",
57    "./device_info/src/device_info_proxy.cpp",
58    "./device_settings/src/device_settings_proxy.cpp",
59    "./device_settings/src/power_policy.cpp",
60    "./location_manager/src/location_manager_proxy.cpp",
61    "./network_manager/src/network_manager_proxy.cpp",
62    "./restrictions/src/fingerprint_policy_serializer.cpp",
63    "./restrictions/src/restrictions_proxy.cpp",
64    "./security_manager/src/security_manager_proxy.cpp",
65    "./system_manager/src/system_manager_proxy.cpp",
66    "./system_manager/src/update_policy_utils.cpp",
67    "./usb_manager/src/array_usb_device_id_serializer.cpp",
68    "./usb_manager/src/usb_manager_proxy.cpp",
69    "./wifi_manager/src/wifi_manager_proxy.cpp",
70  ]
71
72  innerapi_tags = [ "platformsdk" ]
73
74  configs = [ "../../common/config:coverage_flags" ]
75
76  version_script = "libedmservice_kits.map"
77
78  deps = [
79    "../../common/native:edm_commom",
80    "./plugin_kits:plugin_kits",
81  ]
82
83  external_deps = [
84    "cJSON:cjson",
85    "c_utils:utils",
86    "hilog:libhilog",
87    "init:libbegetutil",
88    "ipc:ipc_core",
89    "jsoncpp:jsoncpp",
90    "samgr:samgr_proxy",
91  ]
92
93  public_external_deps = [ "ability_base:want" ]
94  defines = []
95
96  if (os_account_edm_enable) {
97    external_deps += [ "os_account:os_account_innerkits" ]
98    defines += [ "OS_ACCOUNT_EDM_ENABLE" ]
99  }
100
101  if (useriam_edm_enable) {
102    sources += [ "./security_manager/src/password_policy_serializer.cpp" ]
103  }
104
105  if (netmanager_base_edm_enable) {
106    external_deps += [ "netmanager_base:net_conn_manager_if" ]
107    defines += [ "NETMANAGER_BASE_EDM_ENABLE" ]
108  }
109
110  if (wifi_edm_enable) {
111    external_deps += [ "wifi:wifi_sdk" ]
112    defines += [ "WIFI_EDM_ENABLE" ]
113  }
114
115  if (drivers_interface_usb_edm_enable && usb_manager_edm_enable) {
116    external_deps += [ "usb_manager:usbsrv_client" ]
117    defines += [ "USB_EDM_ENABLE" ]
118  }
119
120  if (pasteboard_edm_enable) {
121    sources += [ "./security_manager/src/clipboard_policy_serializer.cpp" ]
122  }
123
124  if (enterprise_device_management_feature_pc_only) {
125    defines += [ "FEATURE_PC_ONLY" ]
126  }
127
128  sanitize = {
129    boundary_sanitize = true
130    cfi = true
131    cfi_cross_dso = true
132    debug = false
133    integer_overflow = true
134    ubsan = true
135  }
136  branch_protector_ret = "pac_ret"
137  subsystem_name = "customization"
138  part_name = "enterprise_device_management"
139}
140