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