• 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")
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:app_context",
46    "ability_runtime:extensionkit_native",
47    "ability_runtime:runtime",
48    "access_token:libaccesstoken_sdk",
49    "c_utils:utils",
50    "ets_runtime:libark_jsruntime",
51    "eventhandler:libeventhandler",
52    "hilog:libhilog",
53    "ipc:ipc_core",
54    "ipc:ipc_napi",
55    "napi:ace_napi",
56  ]
57
58  sanitize = {
59    boundary_sanitize = true
60    cfi = true
61    cfi_cross_dso = true
62    debug = false
63    integer_overflow = true
64    ubsan = true
65  }
66  branch_protector_ret = "pac_ret"
67  subsystem_name = "customization"
68  part_name = "enterprise_device_management"
69}
70
71ohos_shared_library("enterprise_admin_extension_module") {
72  include_dirs = [ "include" ]
73
74  sources = [ "./src/enterprise_admin_extension_module_loader.cpp" ]
75
76  configs = [
77    "../../common/config:coverage_flags",
78    "//build/config/gcc:symbol_visibility_hidden",
79  ]
80  deps = [ ":enterprise_admin_extension" ]
81
82  external_deps = [
83    "ability_runtime:abilitykit_native",
84    "ets_runtime:libark_jsruntime",
85    "hilog:libhilog",
86    "ipc:ipc_napi",
87    "ipc:ipc_single",
88    "napi:ace_napi",
89  ]
90
91  relative_install_dir = "extensionability/"
92  sanitize = {
93    boundary_sanitize = true
94    cfi = true
95    cfi_cross_dso = true
96    debug = false
97    integer_overflow = true
98    ubsan = true
99  }
100  branch_protector_ret = "pac_ret"
101  subsystem_name = "customization"
102  part_name = "enterprise_device_management"
103}
104