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("app_account_kits_config") {
18  include_dirs = [
19    "${app_account_interfaces_native_path}/include",
20    "${app_account_kits_path}/include",
21    "include",
22    "${app_account_innerkits_native_path}/include",
23  ]
24
25  cflags = []
26  if (target_cpu == "arm") {
27    cflags += [ "-DBINDER_IPC_32BIT" ]
28  }
29
30  cflags += [ "-pipe" ]
31
32  defines = [
33    "ACCOUNT_LOG_TAG = \"AppAccountFwk\"",
34    "LOG_DOMAIN = 0xD001B00",
35  ]
36}
37
38ohos_shared_library("cj_appAccount_ffi") {
39  branch_protector_ret = "pac_ret"
40  sanitize = {
41    cfi = true
42    cfi_cross_dso = true
43    debug = false
44  }
45
46  include_dirs = []
47
48  sources = [
49    "src/appaccount_common.cpp",
50    "src/appaccount_ffi.cpp",
51    "src/appaccount_impl.cpp",
52    "src/appaccount_parameter_parse.cpp",
53  ]
54  configs = [ ":app_account_kits_config" ]
55
56  deps = [
57    "${app_account_innerkits_native_path}:app_account_innerkits",
58    "${common_path}:libaccount_common",
59  ]
60
61  external_deps = [
62    "ability_base:base",
63    "ability_runtime:ability_context_native",
64    "ability_runtime:ability_manager",
65    "ability_runtime:abilitykit_native",
66    "ability_runtime:app_context",
67    "ability_runtime:extensionkit_native",
68    "ability_runtime:napi_base_context",
69    "ability_runtime:runtime",
70    "ability_runtime:service_extension",
71    "ability_runtime:ui_extension",
72    "c_utils:utils",
73    "hilog:libhilog",
74    "ipc:ipc_single",
75    "napi:cj_bind_ffi",
76    "napi:cj_bind_native",
77    "samgr:samgr_proxy",
78  ]
79
80  public_external_deps = [ "ability_base:want" ]
81
82  innerapi_tags = [ "platformsdk" ]
83  subsystem_name = "account"
84  part_name = "os_account"
85}
86