• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-2025 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")
15
16config("enterprise_admin_config") {
17  include_dirs = [ "../../common/native/include" ]
18}
19
20config("enterprise_admin_public_config") {
21  include_dirs = [ "include" ]
22}
23
24ohos_shared_library("enterprise_admin_extension") {
25  sources = [
26    "./src/enterprise_admin_extension.cpp",
27    "./src/enterprise_admin_extension_context.cpp",
28    "./src/enterprise_admin_stub.cpp",
29    "./src/enterprise_admin_stub_impl.cpp",
30    "./src/js_enterprise_admin_extension.cpp",
31    "./src/js_enterprise_admin_extension_context.cpp",
32  ]
33
34  configs = [
35    ":enterprise_admin_config",
36    "../../common/config:coverage_flags",
37  ]
38
39  version_script = "libenterprise_admin_extension.map"
40
41  public_configs = [ ":enterprise_admin_public_config" ]
42
43  external_deps = [
44    "ability_runtime:ability_context_native",
45    "ability_runtime:abilitykit_utils",
46    "ability_runtime:app_context",
47    "ability_runtime:extensionkit_native",
48    "ability_runtime:runtime",
49    "access_token:libaccesstoken_sdk",
50    "c_utils:utils",
51    "ets_runtime:libark_jsruntime",
52    "eventhandler:libeventhandler",
53    "hilog:libhilog",
54    "ipc:ipc_core",
55    "ipc:ipc_napi",
56    "napi:ace_napi",
57  ]
58
59  sanitize = {
60    boundary_sanitize = true
61    cfi = true
62    cfi_cross_dso = true
63    debug = false
64    integer_overflow = true
65    ubsan = true
66  }
67  branch_protector_ret = "pac_ret"
68  subsystem_name = "customization"
69  part_name = "enterprise_device_management"
70}
71
72ohos_shared_library("enterprise_admin_extension_module") {
73  include_dirs = [ "include" ]
74
75  sources = [ "./src/enterprise_admin_extension_module_loader.cpp" ]
76
77  configs = [
78    "../../common/config:coverage_flags",
79    "//build/config/gcc:symbol_visibility_hidden",
80  ]
81  deps = [ ":enterprise_admin_extension" ]
82
83  external_deps = [
84    "ability_base:configuration",
85    "ability_runtime:abilitykit_native",
86    "ets_runtime:libark_jsruntime",
87    "hilog:libhilog",
88    "ipc:ipc_napi",
89    "ipc:ipc_single",
90    "napi:ace_napi",
91    "resource_management:global_resmgr",
92  ]
93
94  relative_install_dir = "extensionability/"
95  sanitize = {
96    boundary_sanitize = true
97    cfi = true
98    cfi_cross_dso = true
99    debug = false
100    integer_overflow = true
101    ubsan = true
102  }
103  branch_protector_ret = "pac_ret"
104  subsystem_name = "customization"
105  part_name = "enterprise_device_management"
106}
107