# 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") ohos_shared_library("geolocation") { install_enable = true include_dirs = [ "$LOCATION_ROOT_DIR/frameworks/js/napi/include", "$LOCATION_ROOT_DIR/interfaces/inner_api/include", ] sources = [ "$LOCATION_ROOT_DIR/frameworks/js/napi/source/location_napi_adapter.cpp", "$LOCATION_ROOT_DIR/frameworks/js/napi/source/location_napi_entry.cpp", "$LOCATION_ROOT_DIR/frameworks/js/napi/source/location_napi_event.cpp", "$LOCATION_ROOT_DIR/frameworks/js/napi/source/location_napi_system.cpp", ] deps = [ "$LOCATION_ROOT_DIR/frameworks/location_common/common:lbsservice_common", "$LOCATION_ROOT_DIR/frameworks/native:locator_sdk", ] external_deps = [ "ability_runtime:wantagent_innerkits", "c_utils:utils", "common_event_service:cesfwk_innerkits", "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", ] defines = [] if (location_feature_with_jsstack) { defines += [ "SUPPORT_JSSTACK" ] external_deps += [ "hiview:libxpower_event_js" ] } relative_install_dir = "module" part_name = "location" subsystem_name = "location" } ohos_static_library("geolocation_static") { include_dirs = [ "$LOCATION_ROOT_DIR/frameworks/js/napi/include", "$LOCATION_ROOT_DIR/interfaces/inner_api/include", ] sources = [ "$LOCATION_ROOT_DIR/frameworks/js/napi/source/location_napi_adapter.cpp", "$LOCATION_ROOT_DIR/frameworks/js/napi/source/location_napi_entry.cpp", "$LOCATION_ROOT_DIR/frameworks/js/napi/source/location_napi_event.cpp", "$LOCATION_ROOT_DIR/frameworks/js/napi/source/location_napi_system.cpp", ] deps = [ "$LOCATION_ROOT_DIR/frameworks/location_common/common:lbsservice_common", "$LOCATION_ROOT_DIR/frameworks/native:locator_sdk", ] external_deps = [ "ability_runtime:wantagent_innerkits", "c_utils:utils", "common_event_service:cesfwk_innerkits", "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", ] part_name = "location" subsystem_name = "location" } ohos_shared_library("geolocationmanager") { install_enable = true include_dirs = [ "$LOCATION_ROOT_DIR/frameworks/js/napi/include", "$LOCATION_ROOT_DIR/interfaces/inner_api/include", ] sources = [ "$LOCATION_ROOT_DIR/frameworks/js/napi/source/location_napi_adapter.cpp", "$LOCATION_ROOT_DIR/frameworks/js/napi/source/location_napi_entry.cpp", "$LOCATION_ROOT_DIR/frameworks/js/napi/source/location_napi_errcode.cpp", "$LOCATION_ROOT_DIR/frameworks/js/napi/source/location_napi_event.cpp", "$LOCATION_ROOT_DIR/frameworks/js/napi/source/location_napi_system.cpp", ] deps = [ "$LOCATION_ROOT_DIR/frameworks/location_common/common:lbsservice_common", "$LOCATION_ROOT_DIR/frameworks/native:locator_sdk", ] defines = [ "ENABLE_NAPI_MANAGER" ] external_deps = [ "ability_runtime:wantagent_innerkits", "c_utils:utils", "common_event_service:cesfwk_innerkits", "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", ] if (location_feature_with_jsstack) { defines += [ "SUPPORT_JSSTACK" ] external_deps += [ "hiview:libxpower_event_js" ] } relative_install_dir = "module" part_name = "location" subsystem_name = "location" }