xref: /base/location/frameworks/cj/BUILD.gn (revision 5c735df2)
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("//base/location/config.gni")
15import("//build/ohos.gni")
16
17ohos_shared_library("cj_geolocationmanager_ffi") {
18  sanitize = {
19    boundary_sanitize = true
20    ubsan = true
21    cfi = true
22    cfi_cross_dso = true
23    debug = false
24  }
25
26  include_dirs = [
27    "include",
28    "$LOCATION_ROOT_DIR/frameworks/js/napi/include",
29    "$LOCATION_ROOT_DIR/interfaces/inner_api/include",
30    "$LOCATION_ROOT_DIR/frameworks/js/napi/notification/include",
31  ]
32
33  sources = [
34    "source/cached_locations_callback.cpp",
35    "source/country_code_callback.cpp",
36    "source/geolocationmanager_ffi.cpp",
37    "source/geolocationmanager_impl.cpp",
38    "source/geolocationmanager_utils.cpp",
39    "source/gnss_status_callback.cpp",
40    "source/location_error_callback.cpp",
41    "source/location_switch_callback.cpp",
42    "source/locator_callback.cpp",
43    "source/nmea_message_callback.cpp",
44  ]
45
46  deps = [
47    "$LOCATION_ROOT_DIR/frameworks/js/napi:geolocationmanager",
48    "$LOCATION_ROOT_DIR/frameworks/location_common/common:lbsservice_common",
49    "$LOCATION_ROOT_DIR/frameworks/native/geofence_sdk:geofence_sdk",
50    "$LOCATION_ROOT_DIR/frameworks/native/locator_sdk:locator_sdk",
51  ]
52
53  defines = [ "ENABLE_NAPI_MANAGER" ]
54
55  external_deps = [
56    "hilog:libhilog",
57    "ipc:ipc_single",
58    "napi:ace_napi",
59    "napi:cj_bind_ffi",
60    "napi:cj_bind_native",
61  ]
62
63  innerapi_tags = [ "platformsdk" ]
64  subsystem_name = "location"
65  part_name = "location"
66}
67