# Copyright (c) 2024 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//base/location/config.gni") import("//build/ohos.gni") ohos_shared_library("cj_geolocationmanager_ffi") { sanitize = { boundary_sanitize = true ubsan = true cfi = true cfi_cross_dso = true debug = false } include_dirs = [ "include", "$LOCATION_ROOT_DIR/frameworks/js/napi/include", "$LOCATION_ROOT_DIR/interfaces/inner_api/include", "$LOCATION_ROOT_DIR/frameworks/js/napi/notification/include", ] sources = [ "source/cached_locations_callback.cpp", "source/country_code_callback.cpp", "source/geolocationmanager_ffi.cpp", "source/geolocationmanager_impl.cpp", "source/geolocationmanager_utils.cpp", "source/gnss_status_callback.cpp", "source/location_error_callback.cpp", "source/location_switch_callback.cpp", "source/locator_callback.cpp", "source/nmea_message_callback.cpp", ] deps = [ "$LOCATION_ROOT_DIR/frameworks/js/napi:geolocationmanager", "$LOCATION_ROOT_DIR/frameworks/location_common/common:lbsservice_common", "$LOCATION_ROOT_DIR/frameworks/native/geofence_sdk:geofence_sdk", "$LOCATION_ROOT_DIR/frameworks/native/locator_sdk:locator_sdk", ] defines = [ "ENABLE_NAPI_MANAGER" ] external_deps = [ "hilog:libhilog", "ipc:ipc_single", "napi:ace_napi", "napi:cj_bind_ffi", "napi:cj_bind_native", ] innerapi_tags = [ "platformsdk" ] subsystem_name = "location" part_name = "location" }