# Copyright (c) 2021-2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("../../../../access_token.gni") ohos_shared_library("libabilityaccessctrl") { sanitize = { cfi = true cfi_cross_dso = true debug = false } branch_protector_ret = "pac_ret" include_dirs = [ "${access_token_path}/frameworks/common/include", "${access_token_path}/interfaces/innerkits/accesstoken/include", "${access_token_path}/interfaces/innerkits/token_callback/include", "${access_token_path}/interfaces/innerkits/token_setproc/include", "../common/include", "include", ] sources = [ "src/napi_atmanager.cpp", "src/napi_context_common.cpp", "src/napi_request_global_switch_on_setting.cpp", "src/napi_request_permission.cpp", "src/napi_request_permission_on_setting.cpp", ] deps = [ "${access_token_path}/interfaces/innerkits/accesstoken:libaccesstoken_sdk", "${access_token_path}/interfaces/innerkits/token_callback:libtoken_callback_sdk", "${access_token_path}/interfaces/innerkits/token_setproc:libtokensetproc_shared", "../common:libnapi_common", ] cflags_cc = [ "-DHILOG_ENABLE" ] external_deps = [ "ability_base:want", "ability_runtime:ability_context_native", "ability_runtime:ability_manager", "ability_runtime:abilitykit_native", "ability_runtime:napi_base_context", "ability_runtime:ui_extension", "ace_engine:ace_uicontent", "c_utils:utils", "hilog:libhilog", "hisysevent:libhisysevent", "init:libbegetutil", "ipc:ipc_single", "napi:ace_napi", ] if (eventhandler_enable == true) { cflags_cc += [ "-DEVENTHANDLER_ENABLE" ] external_deps += [ "eventhandler:libeventhandler" ] } configs = [ "${access_token_path}/config:access_token_compile_flags", "${access_token_path}/config:coverage_flags", ] relative_install_dir = "module" subsystem_name = "security" part_name = "access_token" }