• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("account_napi_common_config") {
18  include_dirs = [ "include" ]
19
20  cflags = []
21
22  if (target_cpu == "arm") {
23    cflags += [ "-DBINDER_IPC_32BIT" ]
24  }
25
26  cflags += [ "-pipe" ]
27
28  cflags_cc = [
29    "-Wdate-time",
30    "-Wformat=2",
31    "-Wfloat-equal",
32    "-Wshadow",
33  ]
34}
35
36ohos_shared_library("account_napi_common") {
37  branch_protector_ret = "pac_ret"
38
39  sanitize = {
40    cfi = true
41    cfi_cross_dso = true
42    debug = false
43  }
44
45  include_dirs = []
46  configs = [ ":account_napi_common_config" ]
47  public_configs = [ ":account_napi_common_config" ]
48
49  sources = [
50    "${os_account_path}/interfaces/kits/napi/common/src/napi_account_common.cpp",
51    "${os_account_path}/interfaces/kits/napi/common/src/napi_account_error.cpp",
52  ]
53
54  defines = [
55    "ACCOUNT_LOG_TAG = \"AccountNapiCommon\"",
56    "LOG_DOMAIN = 0xD001B00",
57  ]
58
59  public_deps = [ "${common_path}:libaccount_common" ]
60
61  external_deps = [
62    "access_token:libtokenid_sdk",
63    "c_utils:utils",
64    "hilog:libhilog",
65    "ipc:ipc_single",
66    "napi:ace_napi",
67  ]
68
69  subsystem_name = "account"
70  innerapi_tags = [ "platformsdk" ]
71  part_name = "os_account"
72}
73