1# Copyright (c) 2021-2022 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("//base/security/access_token/access_token.gni") 15import("//build/ohos.gni") 16 17config("accesstoken") { 18 visibility = [ ":*" ] 19 include_dirs = [ "include" ] 20} 21 22if (is_standard_system) { 23 ohos_shared_library("libaccesstoken_sdk") { 24 subsystem_name = "security" 25 part_name = "access_token" 26 27 output_name = "libaccesstoken_sdk" 28 29 public_configs = [ ":accesstoken" ] 30 31 include_dirs = [ 32 "//commonlibrary/c_utils/base/include", 33 "include", 34 "src", 35 "//base/security/access_token/frameworks/accesstoken/include", 36 "//base/security/access_token/frameworks/common/include", 37 "//base/security/access_token/interfaces/innerkits/accesstoken/include", 38 "//base/security/access_token/interfaces/innerkits/token_setproc/include", 39 ] 40 41 sources = [ 42 "src/accesstoken_death_recipient.cpp", 43 "src/accesstoken_kit.cpp", 44 "src/accesstoken_manager_client.cpp", 45 "src/accesstoken_manager_proxy.cpp", 46 "src/perm_state_change_callback_customize.cpp", 47 "src/permission_state_change_callback.cpp", 48 "src/permission_state_change_callback_stub.cpp", 49 ] 50 51 deps = [ 52 "//base/security/access_token/frameworks/accesstoken:accesstoken_communication_adapter_cxx", 53 "//base/security/access_token/frameworks/common:accesstoken_common_cxx", 54 "//base/security/access_token/interfaces/innerkits/token_setproc:libtoken_setproc", 55 ] 56 57 external_deps = [ 58 "c_utils:utils", 59 "hisysevent_native:libhisysevent", 60 "hiviewdfx_hilog_native:libhilog", 61 "ipc:ipc_single", 62 "samgr:samgr_proxy", 63 ] 64 65 configs = [ "//base/security/access_token/config:coverage_flags" ] 66 67 cflags_cc = [ 68 "-DHILOG_ENABLE", 69 "-DDEBUG_API_PERFORMANCE", 70 ] 71 if (token_sync_enable == true) { 72 cflags_cc += [ "-DTOKEN_SYNC_ENABLE" ] 73 } 74 } 75} 76