• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2021 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")
15
16group("common_target") {
17  deps = [ ":libtel_common" ]
18}
19
20config("telephony_log_config") {
21  include_dirs = [ "log/include" ]
22}
23
24config("tel_napi_config") {
25  include_dirs = [
26    "../frameworks/js/napi/",
27    "../frameworks/js/network_search/include/",
28    "../interfaces/innerkits/include/",
29  ]
30}
31
32config("tel_utils_config") {
33  include_dirs = [
34    "common/include",
35    "preferences/include",
36    "log/include",
37  ]
38}
39
40ohos_shared_library("libtel_common") {
41  version_script = "libtel_common.versionscript"
42  sources = [
43    "../frameworks/js/napi/napi_util.cpp",
44    "common/src/enum_convert.cpp",
45    "common/src/str_convert.cpp",
46    "common/src/telephony_common_utils.cpp",
47    "common/src/telephony_config.cpp",
48    "common/src/telephony_permission.cpp",
49    "preferences/src/tel_profile_util.cpp",
50  ]
51
52  defines = [
53    "TELEPHONY_LOG_TAG = \"TelephonyCommon\"",
54    "LOG_DOMAIN = 0xD001F04",
55  ]
56
57  if (is_standard_system) {
58    defines += [ "STANDARD_SYSTEM_ENABLE" ]
59  }
60
61  configs = [ "../utils:telephony_log_config" ]
62
63  public_configs = [
64    ":tel_napi_config",
65    ":tel_utils_config",
66  ]
67
68  if (is_double_framework) {
69    cflags_cc = [ "-DCONFIG_DUAL_FRAMEWORK" ]
70  }
71
72  external_deps = [
73    "access_token:libaccesstoken_sdk",
74    "access_token:libprivacy_sdk",
75    "access_token:libtokenid_sdk",
76    "bundle_framework:appexecfwk_base",
77    "bundle_framework:appexecfwk_core",
78    "c_utils:utils",
79    "hilog:libhilog",
80    "hisysevent:libhisysevent",
81    "init:libbegetutil",
82    "ipc:ipc_single",
83    "napi:ace_napi",
84    "preferences:native_preferences",
85    "samgr:samgr_proxy",
86  ]
87
88  innerapi_tags = [ "platformsdk" ]
89  part_name = "core_service"
90  subsystem_name = "telephony"
91}
92