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("//build/ohos.gni") 15import("../../../../os_account.gni") 16 17config("account_iam_kit_config") { 18 include_dirs = [ "include" ] 19 20 cflags = [] 21 if (target_cpu == "arm") { 22 cflags += [ "-DBINDER_IPC_32BIT" ] 23 } 24 25 cflags += [ "-pipe" ] 26 cflags_cc = [ 27 "-Wdate-time", 28 "-Wformat=2", 29 "-Wfloat-equal", 30 "-Wshadow", 31 ] 32} 33 34ohos_shared_library("account_iam_napi") { 35 configs = [ ":account_iam_kit_config" ] 36 public_configs = [ ":account_iam_kit_config" ] 37 38 include_dirs = [ "${account_iam_framework_path}/include" ] 39 sources = [ 40 "${account_iam_kits_path}/src/napi_account_iam_common.cpp", 41 "${account_iam_kits_path}/src/napi_account_iam_constant.cpp", 42 "${account_iam_kits_path}/src/napi_account_iam_identity_manager.cpp", 43 "${account_iam_kits_path}/src/napi_account_iam_module.cpp", 44 "${account_iam_kits_path}/src/napi_account_iam_user_auth.cpp", 45 ] 46 47 defines = [ 48 "ACCOUNT_LOG_TAG = \"AccountIAM\"", 49 "LOG_DOMAIN = 0xD001B00", 50 ] 51 52 deps = [ 53 "${account_iam_framework_path}:account_iam_innerkits", 54 "${account_napi_common_path}:account_napi_common", 55 ] 56 57 external_deps = [ 58 "c_utils:utils", 59 "hilog:libhilog", 60 "ipc:ipc_core", 61 "napi:ace_napi", 62 ] 63 64 cflags_cc = [] 65 if (has_pin_auth_part) { 66 cflags_cc += [ "-DHAS_PIN_AUTH_PART" ] 67 sources += [ 68 "${account_iam_kits_path}/src/napi_account_iam_inputer_manager.cpp", 69 "${account_iam_kits_path}/src/napi_account_iam_pin_auth.cpp", 70 ] 71 external_deps += [ "pin_auth:pinauth_framework" ] 72 } 73 if (has_user_auth_part) { 74 cflags_cc += [ "-DHAS_USER_AUTH_PART" ] 75 external_deps += [ "user_auth_framework:userauth_client" ] 76 } 77 78 subsystem_name = "account" 79 innerapi_tags = [ "platformsdk" ] 80 part_name = "os_account" 81} 82