1# Copyright (c) 2021-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("appaccount_kit_config") {
18  include_dirs = [
19    "${app_account_interfaces_native_path}/include",
20    "${app_account_kits_path}/include",
21    "${os_account_path}/interfaces/kits/napi/common/include",
22    "include",
23    "${app_account_innerkits_native_path}/include",
24  ]
25
26  cflags = []
27  if (target_cpu == "arm") {
28    cflags += [ "-DBINDER_IPC_32BIT" ]
29  }
30  cflags += [ "-pipe" ]
31
32  defines = [
33    "ACCOUNT_LOG_TAG = \"AppAccountJsKit\"",
34    "LOG_DOMAIN = 0xD001B00",
35  ]
36}
37
38ohos_shared_library("appaccount") {
39  include_dirs = []
40  if (!use_clang_coverage) {
41    version_script = "libappaccount.map"
42  }
43  configs = [ ":appaccount_kit_config" ]
44
45  public_configs = [ ":appaccount_kit_config" ]
46  sources = [
47    "src/napi_app_account.cpp",
48    "src/napi_app_account_authenticator.cpp",
49    "src/napi_app_account_authenticator_callback.cpp",
50    "src/napi_app_account_common.cpp",
51    "src/napi_app_account_constant.cpp",
52    "src/napi_app_account_module.cpp",
53  ]
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  relative_install_dir = "module/account"
62
63  external_deps = [
64    "ability_base:want",
65    "ability_runtime:ability_context_native",
66    "ability_runtime:ability_manager",
67    "ability_runtime:abilitykit_native",
68    "ability_runtime:app_context",
69    "ability_runtime:extensionkit_native",
70    "ability_runtime:napi_base_context",
71    "ability_runtime:napi_common",
72    "ability_runtime:runtime",
73    "ability_runtime:service_extension",
74    "ability_runtime:ui_extension",
75    "c_utils:utils",
76    "hilog:libhilog",
77    "ipc:ipc_napi",
78    "ipc:ipc_single",
79    "napi:ace_napi",
80  ]
81
82  subsystem_name = "account"
83  part_name = "os_account"
84}
85