1# Copyright (c) 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") 15import("../../../os_account.gni") 16 17config("authorization_extension_config") { 18 visibility = [ ":*" ] 19 20 cflags = [] 21 if (target_cpu == "arm") { 22 cflags += [ "-DBINDER_IPC_32BIT" ] 23 } 24 defines = [ 25 "ACCOUNT_LOG_TAG = \"AppAccountFwk\"", 26 "LOG_DOMAIN = 0xD001B00", 27 ] 28} 29 30config("authorization_extension_public_config") { 31 visibility = [ ":*" ] 32 include_dirs = [ "include" ] 33} 34 35ohos_shared_library("authorization_extension") { 36 include_dirs = [ 37 "${os_account_path}/interfaces/innerkits/appaccount/native/include", 38 "${os_account_path}/frameworks/appaccount/native/include", 39 "${account_napi_common_path}/include", 40 "${app_account_kits_path}/include", 41 ] 42 sources = [ 43 "${ability_runtime_path}/frameworks/native/ability/native/ability_business_error/ability_business_error.cpp", 44 "${app_account_kits_path}/src/napi_app_account_authorization_extension.cpp", 45 "${app_account_kits_path}/src/napi_app_account_authorization_extension_context.cpp", 46 "src/authorization_extension.cpp", 47 "src/authorization_extension_context.cpp", 48 ] 49 configs = [ 50 ":authorization_extension_config", 51 "${account_coverage_config_path}:coverage_flags", 52 ] 53 public_configs = [ ":authorization_extension_public_config" ] 54 55 deps = [ 56 "${account_napi_common_path}:account_napi_common", 57 "${app_account_innerkits_native_path}:app_account_innerkits", 58 "${common_path}:libaccount_common", 59 ] 60 61 external_deps = [ 62 "ability_base:want", 63 "ability_runtime:ability_context_native", 64 "ability_runtime:ability_manager", 65 "ability_runtime:abilitykit_native", 66 "ability_runtime:app_context", 67 "ability_runtime:runtime", 68 "ability_runtime:service_extension", 69 "ability_runtime:ui_extension", 70 "c_utils:utils", 71 "eventhandler:libeventhandler", 72 "hilog:libhilog", 73 "i18n:intl_util", 74 "ipc:ipc_core", 75 "ipc:ipc_napi_common", 76 "napi:ace_napi", 77 ] 78 79 subsystem_name = "account" 80 part_name = "os_account" 81} 82 83ohos_shared_library("authorization_extension_module") { 84 include_dirs = [ "include" ] 85 86 sources = [ "src/authorization_extension_module_loader.cpp" ] 87 88 configs = [ 89 ":authorization_extension_config", 90 "${account_coverage_config_path}:coverage_flags", 91 ] 92 public_configs = [ ":authorization_extension_public_config" ] 93 94 deps = [ 95 ":authorization_extension", 96 "${common_path}:libaccount_common", 97 ] 98 99 external_deps = [ 100 "ability_base:base", 101 "ability_base:want", 102 "ability_base:zuri", 103 "ability_runtime:ability_manager", 104 "ability_runtime:abilitykit_native", 105 "ability_runtime:runtime", 106 "c_utils:utils", 107 "hilog:libhilog", 108 "ipc:ipc_core", 109 "napi:ace_napi", 110 ] 111 112 relative_install_dir = "extensionability/" 113 subsystem_name = "account" 114 part_name = "os_account" 115} 116