15c735df2Sopenharmony_ci# Copyright (C) 2024 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_ciohos_ndk_headers("location_ndk_header") { 185c735df2Sopenharmony_ci dest_dir = "$ndk_headers_out_dir/location" 195c735df2Sopenharmony_ci sources = [ 205c735df2Sopenharmony_ci "$LOCATION_ROOT_DIR/interfaces/c_api/include/oh_location.h", 215c735df2Sopenharmony_ci "$LOCATION_ROOT_DIR/interfaces/c_api/include/oh_location_type.h", 225c735df2Sopenharmony_ci ] 235c735df2Sopenharmony_ci} 245c735df2Sopenharmony_ci 255c735df2Sopenharmony_ciohos_ndk_library("liblocation_ndk") { 265c735df2Sopenharmony_ci ndk_description_file = 275c735df2Sopenharmony_ci "$LOCATION_NATIVE_DIR/location_ndk/liblocation.ndk.json" 285c735df2Sopenharmony_ci output_name = "location_ndk" 295c735df2Sopenharmony_ci output_extension = "so" 305c735df2Sopenharmony_ci min_compact_version = "13" 315c735df2Sopenharmony_ci} 325c735df2Sopenharmony_ci 335c735df2Sopenharmony_ciconfig("location_ndk_config") { 345c735df2Sopenharmony_ci visibility = [ ":*" ] 355c735df2Sopenharmony_ci include_dirs = [ 365c735df2Sopenharmony_ci "$LOCATION_ROOT_DIR/interfaces/c_api/include", 375c735df2Sopenharmony_ci "$LOCATION_ROOT_DIR/frameworks/native/location_ndk/include", 385c735df2Sopenharmony_ci ] 395c735df2Sopenharmony_ci} 405c735df2Sopenharmony_ci 415c735df2Sopenharmony_ciohos_shared_library("location_ndk") { 425c735df2Sopenharmony_ci sources = [ 435c735df2Sopenharmony_ci "$LOCATION_NATIVE_DIR/location_ndk/source/location_info_callback_host.cpp", 445c735df2Sopenharmony_ci "$LOCATION_NATIVE_DIR/location_ndk/source/locator_c_impl.cpp", 455c735df2Sopenharmony_ci ] 465c735df2Sopenharmony_ci output_extension = "so" 475c735df2Sopenharmony_ci defines = [ "API_EXPORT=__attribute__((visibility (\"default\")))" ] 485c735df2Sopenharmony_ci 495c735df2Sopenharmony_ci configs = [ ":location_ndk_config" ] 505c735df2Sopenharmony_ci 515c735df2Sopenharmony_ci branch_protector_ret = "pac_ret" 525c735df2Sopenharmony_ci sanitize = { 535c735df2Sopenharmony_ci cfi = true 545c735df2Sopenharmony_ci cfi_cross_dso = true 555c735df2Sopenharmony_ci debug = false 565c735df2Sopenharmony_ci } 575c735df2Sopenharmony_ci 585c735df2Sopenharmony_ci deps = [ 595c735df2Sopenharmony_ci "$LOCATION_ROOT_DIR/frameworks/base_module:lbsbase_module", 605c735df2Sopenharmony_ci "$LOCATION_ROOT_DIR/frameworks/location_common/common:lbsservice_common", 615c735df2Sopenharmony_ci "$LOCATION_ROOT_DIR/frameworks/native/location_ndk:liblocation_ndk", 625c735df2Sopenharmony_ci "$LOCATION_ROOT_DIR/frameworks/native/locator_sdk:locator_sdk", 635c735df2Sopenharmony_ci ] 645c735df2Sopenharmony_ci 655c735df2Sopenharmony_ci external_deps = [ 665c735df2Sopenharmony_ci "hilog:libhilog", 675c735df2Sopenharmony_ci "ipc:ipc_single", 685c735df2Sopenharmony_ci ] 695c735df2Sopenharmony_ci 705c735df2Sopenharmony_ci relative_install_dir = "ndk" 715c735df2Sopenharmony_ci part_name = "location" 725c735df2Sopenharmony_ci subsystem_name = "location" 735c735df2Sopenharmony_ci} 74