1# Copyright (c) 2024 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_ffi_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("cj_osaccount_ffi") {
40  sanitize = {
41    cfi = true
42    cfi_cross_dso = true
43    debug = false
44  }
45  configs = [ ":osaccount_ffi_kit_config" ]
46  sources = [
47    "${os_account_ffi_kits_path}/src/cj_osaccount_ffi.cpp",
48    "${os_account_ffi_kits_path}/src/osaccount_manager_impl.cpp",
49  ]
50
51  deps = [
52    "${common_path}:libaccount_common",
53    "${innerkits_native_path}:libaccountkits",
54    "${os_account_innerkits_native_path}:os_account_innerkits",
55  ]
56
57  external_deps = [
58    "ability_base:want",
59    "c_utils:utils",
60    "hilog:libhilog",
61    "napi:cj_bind_ffi",
62    "napi:cj_bind_native",
63  ]
64
65  innerapi_tags = [ "platformsdk" ]
66  part_name = "os_account"
67  subsystem_name = "account"
68}
69