1# Copyright (c) 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/account/os_account/os_account.gni") 15import("//build/ohos.gni") 16 17config("account_iam_kit_config") { 18 include_dirs = [ 19 "${account_iam_kits_path}/include", 20 "//foundation/ace/napi/interfaces/kits", 21 "//third_party/libuv/include", 22 "//third_party/node/src", 23 "${os_account_path}/interfaces/kits/napi/common/include", 24 "//base/useriam/user_auth_framework/interfaces/inner_api", 25 ] 26 27 cflags = [] 28 if (target_cpu == "arm") { 29 cflags += [ "-DBINDER_IPC_32BIT" ] 30 } 31 32 cflags += [ "-pipe" ] 33 cflags_cc = [ 34 "-Wdate-time", 35 "-Wformat=2", 36 "-Wfloat-equal", 37 "-Wshadow", 38 ] 39 40 if (has_user_auth_part) { 41 cflags_cc += [ "-DHAS_USER_AUTH_PART" ] 42 } 43 44 if (has_pin_auth_part) { 45 cflags_cc += [ "-DHAS_PIN_AUTH_PART" ] 46 } 47} 48 49ohos_shared_library("account_iam_napi") { 50 include_dirs = [] 51 configs = [ 52 ":account_iam_kit_config", 53 "${account_coverage_config_path}:coverage_flags", 54 ] 55 public_configs = [ ":account_iam_kit_config" ] 56 sources = [ 57 "${account_iam_kits_path}/src/napi_account_iam_common.cpp", 58 "${account_iam_kits_path}/src/napi_account_iam_constant.cpp", 59 "${account_iam_kits_path}/src/napi_account_iam_identity_manager.cpp", 60 "${account_iam_kits_path}/src/napi_account_iam_inputer_manager.cpp", 61 "${account_iam_kits_path}/src/napi_account_iam_module.cpp", 62 "${account_iam_kits_path}/src/napi_account_iam_pin_auth.cpp", 63 "${account_iam_kits_path}/src/napi_account_iam_user_auth.cpp", 64 "${os_account_path}/frameworks/common/account_error/src/account_error_no.cpp", 65 "${os_account_path}/interfaces/kits/napi/common/src/napi_account_common.cpp", 66 "${os_account_path}/interfaces/kits/napi/common/src/napi_account_error.cpp", 67 ] 68 69 defines = [ 70 "ACCOUNT_LOG_TAG = \"AccountIAM\"", 71 "LOG_DOMAIN = 0xD001B00", 72 ] 73 74 deps = [ 75 "${account_iam_framework_path}:account_iam_innerkits", 76 "//foundation/arkui/napi/:ace_napi", 77 ] 78 79 if (has_user_auth_part) { 80 deps += [ 81 "//base/useriam/user_auth_framework/frameworks/native/client:userauth_client", 82 "//base/useriam/user_auth_framework/frameworks/native/ipc:userauth_client_ipc", 83 ] 84 } 85 86 external_deps = [ 87 "c_utils:utils", 88 "hiviewdfx_hilog_native:libhilog", 89 "ipc:ipc_core", 90 ] 91 92 subsystem_name = "account" 93 part_name = "os_account" 94} 95