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("osaccount_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  defines = [
34    "ACCOUNT_LOG_TAG = \"OsAccountJsKit\"",
35    "LOG_DOMAIN = 0xD001B00",
36  ]
37}
38
39ohos_shared_library("osaccount") {
40  configs = [ ":osaccount_kit_config" ]
41  sources = [
42    "${os_account_kits_path}/src/napi_init.cpp",
43    "${os_account_kits_path}/src/napi_os_account.cpp",
44    "${os_account_kits_path}/src/napi_os_account_common.cpp",
45  ]
46
47  deps = [
48    "${account_iam_kits_path}:account_iam_napi",
49    "${account_napi_common_path}:account_napi_common",
50    "${domain_account_napi_path}:domain_account_napi",
51    "${innerkits_native_path}:libaccountkits",
52    "${os_account_innerkits_native_path}:os_account_innerkits",
53  ]
54
55  relative_install_dir = "module/account"
56
57  external_deps = [
58    "ability_base:want",
59    "c_utils:utils",
60    "hilog:libhilog",
61    "napi:ace_napi",
62  ]
63
64  subsystem_name = "account"
65
66  part_name = "os_account"
67}
68