• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2022 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("//base/account/os_account/os_account.gni")
15import("//build/ohos.gni")
16
17group("common_target") {
18  deps = [ ":libaccount_common" ]
19}
20
21config("account_common_config") {
22  include_dirs = [
23    "file_operator/include",
24    "log/include",
25    "perf_stat/include",
26    "//commonlibrary/c_utils/base/include",
27    "//third_party/json/include",
28    "${os_account_dfx_path}/hisysevent_adapter",
29  ]
30}
31
32config("account_common_all_dependent_configs") {
33  include_dirs = [
34    "database/include",
35    "account_error/include",
36  ]
37}
38
39ohos_shared_library("libaccount_common") {
40  sources = [
41    "${os_account_dfx_path}/hisysevent_adapter/hisysevent_adapter.cpp",
42    "account_error/src/account_error_no.cpp",
43    "file_operator/src/account_file_operator.cpp",
44    "log/src/account_log_wrapper.cpp",
45    "perf_stat/src/perf_stat.cpp",
46  ]
47
48  cflags = [ "-pipe" ]
49  cflags_cc = [
50    "-Wdate-time",
51    "-Wformat=2",
52    "-Wfloat-equal",
53    "-Wshadow",
54  ]
55
56  configs = [ "${account_coverage_config_path}:coverage_flags" ]
57
58  defines = [
59    "ACCOUNT_LOG_TAG = \"AccountCommonFwk\"",
60    "LOG_DOMAIN = 0xD001B00",
61  ]
62
63  public_configs = [
64    ":account_common_config",
65    "//commonlibrary/c_utils/base:utils_config",
66  ]
67
68  all_dependent_configs = [ ":account_common_all_dependent_configs" ]
69
70  public_deps = [ "//commonlibrary/c_utils/base:utils" ]
71
72  external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
73
74  if (build_selinux) {
75    external_deps += [ "selinux:librestorecon" ]
76    cflags += [ "-DWITH_SELINUX" ]
77  }
78
79  part_name = "os_account"
80}
81