15c735df2Sopenharmony_ci# Copyright (C) 2022 Huawei Device Co., Ltd. 25c735df2Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 35c735df2Sopenharmony_ci# you may not use this file except in compliance with the License. 45c735df2Sopenharmony_ci# You may obtain a copy of the License at 55c735df2Sopenharmony_ci# 65c735df2Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 75c735df2Sopenharmony_ci# 85c735df2Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 95c735df2Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 105c735df2Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 115c735df2Sopenharmony_ci# See the License for the specific language governing permissions and 125c735df2Sopenharmony_ci# limitations under the License. 135c735df2Sopenharmony_ci 145c735df2Sopenharmony_ciimport("//base/location/config.gni") 155c735df2Sopenharmony_ciimport("//build/ohos.gni") 165c735df2Sopenharmony_ci 175c735df2Sopenharmony_cilocal_base_sources = [ 185c735df2Sopenharmony_ci "$LOCATION_GEOCONVERT_ROOT/source/geo_convert_request.cpp", 195c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/callback/source/cached_locations_callback_proxy.cpp", 205c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/callback/source/country_code_callback_proxy.cpp", 215c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/callback/source/gnss_status_callback_proxy.cpp", 225c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/callback/source/locating_required_data_callback_proxy.cpp", 235c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/callback/source/location_gnss_geofence_callback_proxy.cpp", 245c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/callback/source/locator_callback_proxy.cpp", 255c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/callback/source/locator_msdp_state_change_cb.cpp", 265c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/callback/source/nmea_message_callback_proxy.cpp", 275c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/locator/source/fusion_controller.cpp", 285c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/locator/source/geo_convert_proxy.cpp", 295c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/locator/source/gnss_ability_proxy.cpp", 305c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/locator/source/location_config_manager.cpp", 315c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/locator/source/locator_ability.cpp", 325c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/locator/source/locator_background_proxy.cpp", 335c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/locator/source/locator_event_manager.cpp", 345c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/locator/source/locator_event_subscriber.cpp", 355c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/locator/source/locator_msdp_monitor_manager.cpp", 365c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/locator/source/locator_required_data_manager.cpp", 375c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/locator/source/locator_skeleton.cpp", 385c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/locator/source/network_ability_proxy.cpp", 395c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/locator/source/passive_ability_proxy.cpp", 405c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/locator/source/permission_status_change_cb.cpp", 415c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/locator/source/report_manager.cpp", 425c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/locator/source/request_manager.cpp", 435c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/locator/source/subability_common.cpp", 445c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/locator/source/work_record.cpp", 455c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/locator/source/work_record_statistic.cpp", 465c735df2Sopenharmony_ci] 475c735df2Sopenharmony_ci 485c735df2Sopenharmony_ciohos_shared_library("lbsservice_locator") { 495c735df2Sopenharmony_ci sanitize = { 505c735df2Sopenharmony_ci cfi = true 515c735df2Sopenharmony_ci cfi_cross_dso = true 525c735df2Sopenharmony_ci debug = false 535c735df2Sopenharmony_ci } 545c735df2Sopenharmony_ci branch_protector_ret = "pac_ret" 555c735df2Sopenharmony_ci 565c735df2Sopenharmony_ci sources = local_base_sources 575c735df2Sopenharmony_ci 585c735df2Sopenharmony_ci include_dirs = [ 595c735df2Sopenharmony_ci "$LOCATION_ROOT_DIR/interfaces/inner_api/include", 605c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_geocode/geocode/include", 615c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_gnss/gnss/include", 625c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/callback/include", 635c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/locator/include", 645c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_network/network/include", 655c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_passive/passive/include", 665c735df2Sopenharmony_ci ] 675c735df2Sopenharmony_ci 685c735df2Sopenharmony_ci deps = [ 695c735df2Sopenharmony_ci "$LOCATION_COMMON_DIR:lbsservice_common", 705c735df2Sopenharmony_ci "$LOCATION_ROOT_DIR/frameworks/base_module:lbsbase_module", 715c735df2Sopenharmony_ci "$LOCATION_ROOT_DIR/frameworks/native/geofence_sdk:geofence_sdk", 725c735df2Sopenharmony_ci ] 735c735df2Sopenharmony_ci 745c735df2Sopenharmony_ci external_deps = [ 755c735df2Sopenharmony_ci "ability_base:want", 765c735df2Sopenharmony_ci "ability_runtime:app_manager", 775c735df2Sopenharmony_ci "access_token:libaccesstoken_sdk", 785c735df2Sopenharmony_ci "access_token:libprivacy_sdk", 795c735df2Sopenharmony_ci "eventhandler:libeventhandler", 805c735df2Sopenharmony_ci "ffrt:libffrt", 815c735df2Sopenharmony_ci "hilog:libhilog", 825c735df2Sopenharmony_ci "init:libbeget_proxy", 835c735df2Sopenharmony_ci "ipc:ipc_single", 845c735df2Sopenharmony_ci "os_account:os_account_innerkits", 855c735df2Sopenharmony_ci "safwk:system_ability_fwk", 865c735df2Sopenharmony_ci "samgr:samgr_proxy", 875c735df2Sopenharmony_ci ] 885c735df2Sopenharmony_ci 895c735df2Sopenharmony_ci defines = [] 905c735df2Sopenharmony_ci 915c735df2Sopenharmony_ci ldflags = [ 925c735df2Sopenharmony_ci "-Wl,--as-needed", 935c735df2Sopenharmony_ci "-Wl,--gc-sections", 945c735df2Sopenharmony_ci ] 955c735df2Sopenharmony_ci 965c735df2Sopenharmony_ci cflags_cc = [ 975c735df2Sopenharmony_ci "-ffunction-sections", 985c735df2Sopenharmony_ci "-fdata-sections", 995c735df2Sopenharmony_ci "-flto=thin", 1005c735df2Sopenharmony_ci "-Os", 1015c735df2Sopenharmony_ci ] 1025c735df2Sopenharmony_ci 1035c735df2Sopenharmony_ci if (communication_wifi_enable) { 1045c735df2Sopenharmony_ci external_deps += [ "wifi:wifi_sdk" ] 1055c735df2Sopenharmony_ci defines += [ "WIFI_ENABLE" ] 1065c735df2Sopenharmony_ci } 1075c735df2Sopenharmony_ci 1085c735df2Sopenharmony_ci if (communication_bluetooth_enable) { 1095c735df2Sopenharmony_ci external_deps += [ "bluetooth:btframework" ] 1105c735df2Sopenharmony_ci defines += [ "BLUETOOTH_ENABLE" ] 1115c735df2Sopenharmony_ci } 1125c735df2Sopenharmony_ci 1135c735df2Sopenharmony_ci if (location_feature_with_geocode) { 1145c735df2Sopenharmony_ci defines += [ "FEATURE_GEOCODE_SUPPORT" ] 1155c735df2Sopenharmony_ci } 1165c735df2Sopenharmony_ci 1175c735df2Sopenharmony_ci if (location_feature_with_gnss) { 1185c735df2Sopenharmony_ci defines += [ "FEATURE_GNSS_SUPPORT" ] 1195c735df2Sopenharmony_ci } 1205c735df2Sopenharmony_ci 1215c735df2Sopenharmony_ci if (location_feature_with_network) { 1225c735df2Sopenharmony_ci defines += [ "FEATURE_NETWORK_SUPPORT" ] 1235c735df2Sopenharmony_ci } 1245c735df2Sopenharmony_ci 1255c735df2Sopenharmony_ci if (location_feature_with_passive) { 1265c735df2Sopenharmony_ci defines += [ "FEATURE_PASSIVE_SUPPORT" ] 1275c735df2Sopenharmony_ci } 1285c735df2Sopenharmony_ci 1295c735df2Sopenharmony_ci if (resourceschedule_background_task_mgr_enable) { 1305c735df2Sopenharmony_ci external_deps += [ "background_task_mgr:bgtaskmgr_innerkits" ] 1315c735df2Sopenharmony_ci defines += [ "BGTASKMGR_SUPPORT" ] 1325c735df2Sopenharmony_ci } 1335c735df2Sopenharmony_ci 1345c735df2Sopenharmony_ci if (is_emulator) { 1355c735df2Sopenharmony_ci defines += [ "EMULATOR_ENABLED" ] 1365c735df2Sopenharmony_ci } 1375c735df2Sopenharmony_ci 1385c735df2Sopenharmony_ci if (ability_form_fwk_enable) { 1395c735df2Sopenharmony_ci external_deps += [ "form_fwk:fmskit_native" ] 1405c735df2Sopenharmony_ci defines += [ "FMSKIT_NATIVE_SUPPORT" ] 1415c735df2Sopenharmony_ci } 1425c735df2Sopenharmony_ci 1435c735df2Sopenharmony_ci if (resourceschedule_schedule_service_enable) { 1445c735df2Sopenharmony_ci external_deps += [ "resource_schedule_service:ressched_client" ] 1455c735df2Sopenharmony_ci defines += [ "RES_SCHED_SUPPROT" ] 1465c735df2Sopenharmony_ci } 1475c735df2Sopenharmony_ci 1485c735df2Sopenharmony_ci if (notification_distributed_notification_service_enable) { 1495c735df2Sopenharmony_ci defines += [ "NOTIFICATION_ENABLE" ] 1505c735df2Sopenharmony_ci } 1515c735df2Sopenharmony_ci 1525c735df2Sopenharmony_ci if (movement_client_enable) { 1535c735df2Sopenharmony_ci external_deps += [ "movement:movement_client" ] 1545c735df2Sopenharmony_ci defines += [ "MOVEMENT_CLIENT_ENABLE" ] 1555c735df2Sopenharmony_ci } 1565c735df2Sopenharmony_ci 1575c735df2Sopenharmony_ci if (location_device_standby_enable) { 1585c735df2Sopenharmony_ci external_deps += [ "device_standby:standby_innerkits" ] 1595c735df2Sopenharmony_ci defines += [ "DEVICE_STANDBY_ENABLE" ] 1605c735df2Sopenharmony_ci } 1615c735df2Sopenharmony_ci 1625c735df2Sopenharmony_ci # Used to control the export of dynamic library symbols. 1635c735df2Sopenharmony_ci version_script = "liblbsservice_locator_version_script.txt" 1645c735df2Sopenharmony_ci 1655c735df2Sopenharmony_ci part_name = "location" 1665c735df2Sopenharmony_ci subsystem_name = "location" 1675c735df2Sopenharmony_ci} 1685c735df2Sopenharmony_ci 1695c735df2Sopenharmony_ciohos_static_library("lbsservice_locator_static") { 1705c735df2Sopenharmony_ci sanitize = { 1715c735df2Sopenharmony_ci cfi = true 1725c735df2Sopenharmony_ci cfi_cross_dso = true 1735c735df2Sopenharmony_ci debug = false 1745c735df2Sopenharmony_ci } 1755c735df2Sopenharmony_ci branch_protector_ret = "pac_ret" 1765c735df2Sopenharmony_ci 1775c735df2Sopenharmony_ci sources = local_base_sources 1785c735df2Sopenharmony_ci 1795c735df2Sopenharmony_ci include_dirs = [ 1805c735df2Sopenharmony_ci "$LOCATION_ROOT_DIR/interfaces/inner_api/include", 1815c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_geocode/geocode/include", 1825c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_gnss/gnss/include", 1835c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/callback/include", 1845c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_locator/locator/include", 1855c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_network/network/include", 1865c735df2Sopenharmony_ci "$SUBSYSTEM_DIR/location_passive/passive/include", 1875c735df2Sopenharmony_ci ] 1885c735df2Sopenharmony_ci 1895c735df2Sopenharmony_ci deps = [ 1905c735df2Sopenharmony_ci "$LOCATION_COMMON_DIR:lbsservice_common", 1915c735df2Sopenharmony_ci "$LOCATION_ROOT_DIR/frameworks/base_module:lbsbase_module", 1925c735df2Sopenharmony_ci "$LOCATION_ROOT_DIR/frameworks/native/geofence_sdk:geofence_sdk", 1935c735df2Sopenharmony_ci ] 1945c735df2Sopenharmony_ci 1955c735df2Sopenharmony_ci external_deps = [ 1965c735df2Sopenharmony_ci "ability_base:want", 1975c735df2Sopenharmony_ci "ability_runtime:app_manager", 1985c735df2Sopenharmony_ci "access_token:libaccesstoken_sdk", 1995c735df2Sopenharmony_ci "access_token:libprivacy_sdk", 2005c735df2Sopenharmony_ci "eventhandler:libeventhandler", 2015c735df2Sopenharmony_ci "ffrt:libffrt", 2025c735df2Sopenharmony_ci "hilog:libhilog", 2035c735df2Sopenharmony_ci "ipc:ipc_single", 2045c735df2Sopenharmony_ci "os_account:os_account_innerkits", 2055c735df2Sopenharmony_ci "safwk:system_ability_fwk", 2065c735df2Sopenharmony_ci "samgr:samgr_proxy", 2075c735df2Sopenharmony_ci ] 2085c735df2Sopenharmony_ci 2095c735df2Sopenharmony_ci defines = [] 2105c735df2Sopenharmony_ci if (communication_wifi_enable) { 2115c735df2Sopenharmony_ci external_deps += [ "wifi:wifi_sdk" ] 2125c735df2Sopenharmony_ci defines += [ "WIFI_ENABLE" ] 2135c735df2Sopenharmony_ci } 2145c735df2Sopenharmony_ci 2155c735df2Sopenharmony_ci if (communication_bluetooth_enable) { 2165c735df2Sopenharmony_ci external_deps += [ "bluetooth:btframework" ] 2175c735df2Sopenharmony_ci defines += [ "BLUETOOTH_ENABLE" ] 2185c735df2Sopenharmony_ci } 2195c735df2Sopenharmony_ci 2205c735df2Sopenharmony_ci if (location_feature_with_geocode) { 2215c735df2Sopenharmony_ci defines += [ "FEATURE_GEOCODE_SUPPORT" ] 2225c735df2Sopenharmony_ci } 2235c735df2Sopenharmony_ci 2245c735df2Sopenharmony_ci if (location_feature_with_gnss) { 2255c735df2Sopenharmony_ci defines += [ "FEATURE_GNSS_SUPPORT" ] 2265c735df2Sopenharmony_ci } 2275c735df2Sopenharmony_ci 2285c735df2Sopenharmony_ci if (location_feature_with_network) { 2295c735df2Sopenharmony_ci defines += [ "FEATURE_NETWORK_SUPPORT" ] 2305c735df2Sopenharmony_ci } 2315c735df2Sopenharmony_ci 2325c735df2Sopenharmony_ci if (location_feature_with_passive) { 2335c735df2Sopenharmony_ci defines += [ "FEATURE_PASSIVE_SUPPORT" ] 2345c735df2Sopenharmony_ci } 2355c735df2Sopenharmony_ci 2365c735df2Sopenharmony_ci if (resourceschedule_background_task_mgr_enable) { 2375c735df2Sopenharmony_ci external_deps += [ "background_task_mgr:bgtaskmgr_innerkits" ] 2385c735df2Sopenharmony_ci defines += [ "BGTASKMGR_SUPPORT" ] 2395c735df2Sopenharmony_ci } 2405c735df2Sopenharmony_ci 2415c735df2Sopenharmony_ci if (is_emulator) { 2425c735df2Sopenharmony_ci defines += [ "EMULATOR_ENABLED" ] 2435c735df2Sopenharmony_ci } 2445c735df2Sopenharmony_ci 2455c735df2Sopenharmony_ci if (ability_form_fwk_enable) { 2465c735df2Sopenharmony_ci external_deps += [ "form_fwk:fmskit_native" ] 2475c735df2Sopenharmony_ci defines += [ "FMSKIT_NATIVE_SUPPORT" ] 2485c735df2Sopenharmony_ci } 2495c735df2Sopenharmony_ci 2505c735df2Sopenharmony_ci if (resourceschedule_schedule_service_enable) { 2515c735df2Sopenharmony_ci external_deps += [ "resource_schedule_service:ressched_client" ] 2525c735df2Sopenharmony_ci defines += [ "RES_SCHED_SUPPROT" ] 2535c735df2Sopenharmony_ci } 2545c735df2Sopenharmony_ci 2555c735df2Sopenharmony_ci if (notification_distributed_notification_service_enable) { 2565c735df2Sopenharmony_ci defines += [ "NOTIFICATION_ENABLE" ] 2575c735df2Sopenharmony_ci } 2585c735df2Sopenharmony_ci 2595c735df2Sopenharmony_ci if (movement_client_enable) { 2605c735df2Sopenharmony_ci external_deps += [ "movement:movement_client" ] 2615c735df2Sopenharmony_ci defines += [ "MOVEMENT_CLIENT_ENABLE" ] 2625c735df2Sopenharmony_ci } 2635c735df2Sopenharmony_ci 2645c735df2Sopenharmony_ci if (location_device_standby_enable) { 2655c735df2Sopenharmony_ci external_deps += [ "device_standby:standby_innerkits" ] 2665c735df2Sopenharmony_ci defines += [ "DEVICE_STANDBY_ENABLE" ] 2675c735df2Sopenharmony_ci } 2685c735df2Sopenharmony_ci 2695c735df2Sopenharmony_ci part_name = "location" 2705c735df2Sopenharmony_ci subsystem_name = "location" 2715c735df2Sopenharmony_ci} 272