• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2022-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("//base/location/config.gni")
15import("//build/ohos.gni")
16
17config("location_common_config") {
18  visibility = [ ":*" ]
19  include_dirs = [ "$LOCATION_ROOT_DIR/interfaces/inner_api/include" ]
20}
21
22local_base_sources = [
23  "$LOCATION_COMMON_DIR/source/app_identity.cpp",
24  "$LOCATION_COMMON_DIR/source/common_hisysevent.cpp",
25  "$LOCATION_COMMON_DIR/source/common_utils.cpp",
26  "$LOCATION_COMMON_DIR/source/geo_address.cpp",
27  "$LOCATION_COMMON_DIR/source/geo_coding_mock_info.cpp",
28  "$LOCATION_COMMON_DIR/source/hook_utils.cpp",
29  "$LOCATION_COMMON_DIR/source/location.cpp",
30  "$LOCATION_COMMON_DIR/source/location_data_rdb_helper.cpp",
31  "$LOCATION_COMMON_DIR/source/location_data_rdb_manager.cpp",
32  "$LOCATION_COMMON_DIR/source/location_dumper.cpp",
33  "$LOCATION_COMMON_DIR/source/location_sa_load_manager.cpp",
34  "$LOCATION_COMMON_DIR/source/permission_manager.cpp",
35  "$LOCATION_COMMON_DIR/source/request.cpp",
36  "$LOCATION_COMMON_DIR/source/request_config.cpp",
37  "$LOCATION_COMMON_DIR/source/satellite_status.cpp",
38  "$LOCATION_COMMON_DIR/source/ui_extension_ability_connection.cpp",
39]
40
41ohos_shared_library("lbsservice_common") {
42  public_configs = [ ":location_common_config" ]
43
44  sanitize = {
45    cfi = true
46    cfi_cross_dso = true
47    debug = false
48  }
49  branch_protector_ret = "pac_ret"
50
51  sources = local_base_sources
52
53  deps = []
54
55  public_external_deps = [
56    "ability_base:zuri",
57    "ability_runtime:extension_manager",
58    "ability_runtime:wantagent_innerkits",
59    "access_token:libaccesstoken_sdk",
60    "access_token:libtokenid_sdk",
61    "bundle_framework:appexecfwk_base",
62    "bundle_framework:appexecfwk_core",
63    "c_utils:utils",
64    "data_share:datashare_consumer",
65    "hilog:libhilog",
66    "hisysevent:libhisysevent",
67    "init:libbegetutil",
68    "ipc:ipc_single",
69    "os_account:os_account_innerkits",
70    "samgr:samgr_proxy",
71  ]
72
73  defines = []
74
75  if (is_emulator) {
76    defines += [ "EMULATOR_ENABLED" ]
77  }
78
79  ldflags = [
80    "-Wl,--as-needed",
81    "-Wl,--gc-sections",
82  ]
83
84  cflags_cc = [
85    "-ffunction-sections",
86    "-fdata-sections",
87    "-flto=thin",
88    "-Os",
89  ]
90
91  # Used to control the export of dynamic library symbols.
92  version_script = "liblbsservice_common_version_script.txt"
93
94  innerapi_tags = [ "platformsdk" ]
95  part_name = "location"
96  subsystem_name = "location"
97}
98
99ohos_static_library("lbsservice_common_static") {
100  public_configs = [ ":location_common_config" ]
101
102  sanitize = {
103    cfi = true
104    cfi_cross_dso = true
105    debug = false
106  }
107  branch_protector_ret = "pac_ret"
108
109  sources = local_base_sources
110
111  deps = []
112
113  public_external_deps = [
114    "ability_base:zuri",
115    "ability_runtime:extension_manager",
116    "ability_runtime:wantagent_innerkits",
117    "access_token:libaccesstoken_sdk",
118    "access_token:libtokenid_sdk",
119    "bundle_framework:appexecfwk_base",
120    "bundle_framework:appexecfwk_core",
121    "c_utils:utils",
122    "data_share:datashare_consumer",
123    "hilog:libhilog",
124    "hisysevent:libhisysevent",
125    "init:libbegetutil",
126    "ipc:ipc_single",
127    "os_account:os_account_innerkits",
128    "samgr:samgr_proxy",
129  ]
130
131  defines = []
132
133  if (is_emulator) {
134    defines += [ "EMULATOR_ENABLED" ]
135  }
136
137  part_name = "location"
138  subsystem_name = "location"
139}
140