• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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  branch_protector_ret = "pac_ret"
40
41  sanitize = {
42    cfi = true
43    cfi_cross_dso = true
44    debug = false
45  }
46
47  include_dirs = []
48  if (!use_clang_coverage) {
49    version_script = "libappaccount.map"
50  }
51  configs = [
52    ":appaccount_kit_config",
53    "${account_coverage_config_path}:coverage_flags",
54  ]
55
56  public_configs = [ ":appaccount_kit_config" ]
57  sources = [
58    "src/napi_app_account.cpp",
59    "src/napi_app_account_authenticator.cpp",
60    "src/napi_app_account_authenticator_callback.cpp",
61    "src/napi_app_account_common.cpp",
62    "src/napi_app_account_constant.cpp",
63    "src/napi_app_account_module.cpp",
64  ]
65
66  deps = [
67    "${account_napi_common_path}:account_napi_common",
68    "${app_account_innerkits_native_path}:app_account_innerkits",
69    "${common_path}:libaccount_common",
70  ]
71
72  relative_install_dir = "module/account"
73
74  external_deps = [
75    "ability_base:want",
76    "ability_runtime:ability_context_native",
77    "ability_runtime:ability_manager",
78    "ability_runtime:abilitykit_native",
79    "ability_runtime:app_context",
80    "ability_runtime:extensionkit_native",
81    "ability_runtime:napi_base_context",
82    "ability_runtime:runtime",
83    "ability_runtime:service_extension",
84    "ability_runtime:ui_extension",
85    "c_utils:utils",
86    "eventhandler:libeventhandler",
87    "hilog:libhilog",
88    "ipc:ipc_napi",
89    "ipc:ipc_single",
90    "napi:ace_napi",
91  ]
92
93  subsystem_name = "account"
94  part_name = "os_account"
95}
96