# Copyright (C) 2022 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") ################################################################################ config("locator_sdk_config") { visibility = [ ":*" ] include_dirs = [ "$LOCATION_ROOT_DIR/interfaces/inner_api/include", "$LOCATION_ROOT_DIR/frameworks/js/napi/include", ] } ohos_shared_library("locator_sdk") { install_enable = true public_configs = [ ":locator_sdk_config" ] sources = [ "$LOCATION_COMMON_DIR/source/geo_address.cpp", "$LOCATION_COMMON_DIR/source/geo_coding_mock_info.cpp", "$LOCATION_COMMON_DIR/source/location.cpp", "$LOCATION_COMMON_DIR/source/request_config.cpp", "$LOCATION_COMMON_DIR/source/satellite_status.cpp", "$LOCATION_NATIVE_DIR/source/cached_locations_callback_host.cpp", "$LOCATION_NATIVE_DIR/source/country_code_callback_host.cpp", "$LOCATION_NATIVE_DIR/source/country_code_manager.cpp", "$LOCATION_NATIVE_DIR/source/fence_impl.cpp", "$LOCATION_NATIVE_DIR/source/gnss_status_callback_host.cpp", "$LOCATION_NATIVE_DIR/source/locating_required_data_callback_host.cpp", "$LOCATION_NATIVE_DIR/source/location_data_manager.cpp", "$LOCATION_NATIVE_DIR/source/location_data_rdb_observer.cpp", "$LOCATION_NATIVE_DIR/source/location_switch_callback_host.cpp", "$LOCATION_NATIVE_DIR/source/locator.cpp", "$LOCATION_NATIVE_DIR/source/locator_callback_host.cpp", "$LOCATION_NATIVE_DIR/source/locator_impl.cpp", "$LOCATION_NATIVE_DIR/source/locator_proxy.cpp", "$LOCATION_NATIVE_DIR/source/napi_util.cpp", "$LOCATION_NATIVE_DIR/source/nmea_message_callback_host.cpp", "$LOCATION_NATIVE_DIR/source/switch_callback_proxy.cpp", ] deps = [ "$LOCATION_COMMON_DIR:lbsservice_common", "//third_party/libuv:uv", ] external_deps = [ "ability_base:zuri", "ability_runtime:dataobs_manager", "ability_runtime:wantagent_innerkits", "c_utils:utils", "common_event_service:cesfwk_innerkits", "data_share:datashare_consumer", "hilog:libhilog", "init:libbeget_proxy", "ipc:ipc_single", "napi:ace_napi", "samgr:samgr_proxy", ] defines = [] if (i18n_enable) { external_deps += [ "i18n:intl_util" ] defines += [ "I18N_ENABLE" ] } if (telephony_core_service_enable) { external_deps += [ "core_service:tel_core_service_api" ] defines += [ "TEL_CORE_SERVICE_ENABLE" ] } if (telephony_cellular_data_enable) { external_deps += [ "cellular_data:tel_cellular_data_api" ] defines += [ "TEL_CELLULAR_DATA_ENABLE" ] } cflags_cc = [ "-std=c++17", "-fno-rtti", ] ldflags = [ "-fPIC", "-Wl,-E", ] innerapi_tags = [ "platformsdk" ] part_name = "location" subsystem_name = "location" }