1# Copyright (C) 2022 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 17ohos_shared_library("geolocation") { 18 install_enable = true 19 include_dirs = [ 20 "$LOCATION_ROOT_DIR/frameworks/js/napi/include", 21 "$LOCATION_ROOT_DIR/interfaces/inner_api/include", 22 ] 23 24 sources = [ 25 "$LOCATION_ROOT_DIR/frameworks/js/napi/source/location_napi_adapter.cpp", 26 "$LOCATION_ROOT_DIR/frameworks/js/napi/source/location_napi_entry.cpp", 27 "$LOCATION_ROOT_DIR/frameworks/js/napi/source/location_napi_event.cpp", 28 "$LOCATION_ROOT_DIR/frameworks/js/napi/source/location_napi_system.cpp", 29 ] 30 31 deps = [ 32 "$LOCATION_ROOT_DIR/frameworks/location_common/common:lbsservice_common", 33 "$LOCATION_ROOT_DIR/frameworks/native:locator_sdk", 34 ] 35 36 external_deps = [ 37 "ability_runtime:wantagent_innerkits", 38 "c_utils:utils", 39 "common_event_service:cesfwk_innerkits", 40 "hilog:libhilog", 41 "ipc:ipc_core", 42 "napi:ace_napi", 43 ] 44 45 defines = [] 46 if (location_feature_with_jsstack) { 47 defines += [ "SUPPORT_JSSTACK" ] 48 external_deps += [ "hiview:libxpower_event_js" ] 49 } 50 51 relative_install_dir = "module" 52 part_name = "location" 53 subsystem_name = "location" 54} 55 56ohos_static_library("geolocation_static") { 57 include_dirs = [ 58 "$LOCATION_ROOT_DIR/frameworks/js/napi/include", 59 "$LOCATION_ROOT_DIR/interfaces/inner_api/include", 60 ] 61 62 sources = [ 63 "$LOCATION_ROOT_DIR/frameworks/js/napi/source/location_napi_adapter.cpp", 64 "$LOCATION_ROOT_DIR/frameworks/js/napi/source/location_napi_entry.cpp", 65 "$LOCATION_ROOT_DIR/frameworks/js/napi/source/location_napi_event.cpp", 66 "$LOCATION_ROOT_DIR/frameworks/js/napi/source/location_napi_system.cpp", 67 ] 68 69 deps = [ 70 "$LOCATION_ROOT_DIR/frameworks/location_common/common:lbsservice_common", 71 "$LOCATION_ROOT_DIR/frameworks/native:locator_sdk", 72 ] 73 74 external_deps = [ 75 "ability_runtime:wantagent_innerkits", 76 "c_utils:utils", 77 "common_event_service:cesfwk_innerkits", 78 "hilog:libhilog", 79 "ipc:ipc_core", 80 "napi:ace_napi", 81 ] 82 83 part_name = "location" 84 subsystem_name = "location" 85} 86 87ohos_shared_library("geolocationmanager") { 88 install_enable = true 89 include_dirs = [ 90 "$LOCATION_ROOT_DIR/frameworks/js/napi/include", 91 "$LOCATION_ROOT_DIR/interfaces/inner_api/include", 92 ] 93 94 sources = [ 95 "$LOCATION_ROOT_DIR/frameworks/js/napi/source/location_napi_adapter.cpp", 96 "$LOCATION_ROOT_DIR/frameworks/js/napi/source/location_napi_entry.cpp", 97 "$LOCATION_ROOT_DIR/frameworks/js/napi/source/location_napi_errcode.cpp", 98 "$LOCATION_ROOT_DIR/frameworks/js/napi/source/location_napi_event.cpp", 99 "$LOCATION_ROOT_DIR/frameworks/js/napi/source/location_napi_system.cpp", 100 ] 101 102 deps = [ 103 "$LOCATION_ROOT_DIR/frameworks/location_common/common:lbsservice_common", 104 "$LOCATION_ROOT_DIR/frameworks/native:locator_sdk", 105 ] 106 107 defines = [ "ENABLE_NAPI_MANAGER" ] 108 109 external_deps = [ 110 "ability_runtime:wantagent_innerkits", 111 "c_utils:utils", 112 "common_event_service:cesfwk_innerkits", 113 "hilog:libhilog", 114 "ipc:ipc_core", 115 "napi:ace_napi", 116 ] 117 118 if (location_feature_with_jsstack) { 119 defines += [ "SUPPORT_JSSTACK" ] 120 external_deps += [ "hiview:libxpower_event_js" ] 121 } 122 123 relative_install_dir = "module" 124 part_name = "location" 125 subsystem_name = "location" 126} 127