• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2023 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("locator_agent_config") {
18  visibility = [ ":*" ]
19  include_dirs = [
20    "$LOCATION_ROOT_DIR/interfaces/inner_api/native/include",
21    "$LOCATION_ROOT_DIR/interfaces/inner_api/include",
22    "$LOCATION_ROOT_DIR/frameworks/native/locator_agent/include",
23  ]
24}
25
26ohos_shared_library("locator_agent") {
27  public_configs = [ ":locator_agent_config" ]
28
29  sources = [
30    "$LOCATION_ROOT_DIR/frameworks/native/locator_agent/source/locator_agent.cpp",
31    "$LOCATION_ROOT_DIR/frameworks/native/locator_agent/source/native_location_callback_host.cpp",
32    "$LOCATION_ROOT_DIR/frameworks/native/locator_agent/source/native_nmea_callback_host.cpp",
33    "$LOCATION_ROOT_DIR/frameworks/native/locator_agent/source/native_sv_callback_host.cpp",
34  ]
35
36  sanitize = {
37    cfi = true
38    cfi_cross_dso = true
39    debug = false
40  }
41
42  branch_protector_ret = "pac_ret"
43
44  deps = [ "$LOCATION_COMMON_DIR:lbsservice_common" ]
45
46  external_deps = [
47    "hilog:libhilog",
48    "ipc:ipc_single",
49    "samgr:samgr_proxy",
50  ]
51
52  ldflags = [
53    "-Wl,--as-needed",
54    "-Wl,--gc-sections",
55  ]
56
57  cflags_cc = [
58    "-ffunction-sections",
59    "-fdata-sections",
60  ]
61
62  defines = []
63  if (is_emulator) {
64    defines += [ "EMULATOR_ENABLED" ]
65  }
66
67  innerapi_tags = [ "platformsdk" ]
68  part_name = "location"
69  subsystem_name = "location"
70}
71