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