1# Copyright (C) 2022-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 17if (location_feature_with_gnss) { 18 ohos_shared_library("lbsservice_gnss") { 19 sources = [ 20 "$LOCATION_GNSS_ROOT/source/agnss_event_callback.cpp", 21 "$LOCATION_GNSS_ROOT/source/gnss_ability.cpp", 22 "$LOCATION_GNSS_ROOT/source/gnss_ability_skeleton.cpp", 23 "$LOCATION_GNSS_ROOT/source/gnss_event_callback.cpp", 24 "$LOCATION_LOCATOR_ROOT/source/subability_common.cpp", 25 "$LOCATION_LOCATOR_ROOT/source/work_record.cpp", 26 ] 27 28 include_dirs = [ 29 "$LOCATION_ROOT_DIR/interfaces/inner_api/include", 30 "$LOCATION_GNSS_ROOT/include", 31 "$LOCATION_LOCATOR_ROOT/include", 32 ] 33 34 deps = [ 35 "$LOCATION_ROOT_DIR/frameworks/location_common/common:lbsservice_common", 36 ] 37 38 external_deps = [ 39 "access_token:libaccesstoken_sdk", 40 "c_utils:utils", 41 "common_event_service:cesfwk_innerkits", 42 "eventhandler:libeventhandler", 43 "hdf_core:libhdi", 44 "hdf_core:libpub_utils", 45 "hilog:libhilog", 46 "ipc:ipc_core", 47 "safwk:system_ability_fwk", 48 "samgr:samgr_proxy", 49 ] 50 51 defines = [] 52 53 if (telephony_core_service_enable) { 54 external_deps += [ "core_service:tel_core_service_api" ] 55 defines += [ "TEL_CORE_SERVICE_ENABLE" ] 56 } 57 58 if (telephony_cellular_data_enable) { 59 external_deps += [ "cellular_data:tel_cellular_data_api" ] 60 defines += [ "TEL_CELLULAR_DATA_ENABLE" ] 61 } 62 63 if (hdf_drivers_interface_location_agnss_enable) { 64 external_deps += 65 [ "drivers_interface_location_agnss:liblocation_agnss_proxy_1.0" ] 66 defines += [ "HDF_DRIVERS_INTERFACE_AGNSS_ENABLE" ] 67 } 68 69 if (location_feature_with_gnss && 70 hdf_drivers_interface_location_gnss_enable) { 71 external_deps += 72 [ "drivers_interface_location_gnss:liblocation_gnss_proxy_1.0" ] 73 defines += [ "FEATURE_GNSS_SUPPORT" ] 74 } 75 76 if (location_feature_with_passive) { 77 defines += [ "FEATURE_PASSIVE_SUPPORT" ] 78 } 79 80 part_name = "location" 81 subsystem_name = "location" 82 } 83} else { 84 ohos_shared_library("lbsservice_gnss") { 85 part_name = "location" 86 subsystem_name = "location" 87 } 88} 89