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 14if (defined(ohos_lite)) { 15 import("//build/lite/config/component/lite_component.gni") 16} else { 17 import("//build/ohos.gni") 18} 19import("//foundation/distributedhardware/device_manager/device_manager.gni") 20 21if (defined(ohos_lite)) { 22 shared_library("devicemanagerext_pin_auth") { 23 include_dirs = [ 24 "include", 25 "include/lite", 26 "${common_path}/include", 27 "${ext_path}/pin_auth/include/ability", 28 "${servicesimpl_path}/include/dependency/timer", 29 "${servicesimpl_path}/include/config", 30 "${servicesimpl_path}/include/adapter", 31 "${servicesimpl_path}/include/authentication", 32 "${servicesimpl_path}/include/authentication/showconfirm/lite", 33 "${servicesimpl_path}/include/ability", 34 "${servicesimpl_path}/include/devicestate", 35 "${servicesimpl_path}/include/discovery", 36 "${servicesimpl_path}/include/dependency/commonevent", 37 "${servicesimpl_path}/include/dependency/hichain", 38 "${servicesimpl_path}/include/dependency/softbus", 39 "${servicesimpl_path}/include/dependency/timer", 40 "${services_path}/include/ipc", 41 "${services_path}/include/ipc/lite", 42 "${utils_path}/include", 43 "${utils_path}/include/ipc/lite", 44 "${servicesimpl_path}/include", 45 "${innerkits_path}/native_cpp/include", 46 "${common_path}/include/ipc", 47 "${common_path}/include/ipc/model", 48 "${innerkits_path}/native_cpp/include", 49 "${innerkits_path}/native_cpp/include/ipc", 50 "${innerkits_path}/native_cpp/include/ipc/lite", 51 "//third_party/json/include", 52 ] 53 54 sources = [ 55 "src/ability/lite/dm_ability_manager.cpp", 56 "src/lite/pin_auth_ui.cpp", 57 "src/pin_auth.cpp", 58 ] 59 60 deps = [ 61 "${common_path}/include/show_confirm_dialog/dialog_ui/js:dialog_js_files_etc", 62 "${innerkits_path}/native_cpp:devicemanagersdk", 63 "${utils_path}:devicemanagerutils", 64 "//third_party/bounds_checking_function:libsec_shared", 65 "//third_party/mbedtls:mbedtls_shared", 66 ] 67 68 external_deps = [ 69 "c_utils:utils", 70 "common_event_service:cesfwk_core", 71 "common_event_service:cesfwk_innerkits", 72 "device_auth:deviceauth_sdk", 73 "dsoftbus:softbus_client", 74 "hilog_lite:hilog_shared", 75 "ipc:ipc_single", 76 "safwk:system_ability_fwk", 77 "utils_lite:utils", 78 ] 79 80 defines = [ 81 "LITE_DEVICE", 82 "HI_LOG_ENABLE", 83 "DH_LOG_TAG=\"devicemanagerext\"", 84 "LOG_DOMAIN=0xD004100", 85 ] 86 } 87} else { 88 ohos_shared_library("devicemanagerext_pin_auth") { 89 include_dirs = [ 90 "include", 91 "include/standard", 92 "${common_path}/include", 93 "${ext_path}/pin_auth/include/ability", 94 "${servicesimpl_path}/include/dependency/timer", 95 "${servicesimpl_path}/include/config", 96 "${servicesimpl_path}/include/adapter", 97 "${servicesimpl_path}/include/authentication", 98 "${servicesimpl_path}/include/authentication/showconfirm/standard", 99 "${servicesimpl_path}/include/ability", 100 "${servicesimpl_path}/include/devicestate", 101 "${servicesimpl_path}/include/discovery", 102 "${servicesimpl_path}/include/dependency/commonevent", 103 "${servicesimpl_path}/include/dependency/hichain", 104 "${servicesimpl_path}/include/dependency/softbus", 105 "${servicesimpl_path}/include/dependency/timer", 106 "${services_path}/include/ipc", 107 "${services_path}/include/ipc/standard", 108 "${utils_path}/include", 109 "${utils_path}/include/ipc/standard", 110 "${servicesimpl_path}/include", 111 "${innerkits_path}/native_cpp/include", 112 "${common_path}/include/ipc", 113 "${common_path}/include/ipc/model", 114 "${innerkits_path}/native_cpp/include", 115 "${innerkits_path}/native_cpp/include/ipc", 116 "${innerkits_path}/native_cpp/include/ipc/standard", 117 "//third_party/json/include", 118 ] 119 120 sources = [ 121 "src/ability/standard/dm_ability_manager.cpp", 122 "src/pin_auth.cpp", 123 "src/standard/pin_auth_ui.cpp", 124 ] 125 126 deps = [ 127 "${innerkits_path}/native_cpp:devicemanagersdk", 128 "${servicesimpl_path}:devicemanagerserviceimpl", 129 ] 130 131 external_deps = [ 132 "ability_base:want", 133 "ability_runtime:ability_manager", 134 "bundle_framework:appexecfwk_base", 135 "bundle_framework:appexecfwk_core", 136 "c_utils:utils", 137 "device_auth:deviceauth_sdk", 138 "init:libbegetutil", 139 "ipc:ipc_single", 140 "resource_management:resmgr_napi_core", 141 "safwk:system_ability_fwk", 142 ] 143 144 defines = [ 145 "HI_LOG_ENABLE", 146 "DH_LOG_TAG=\"devicemanagerext\"", 147 "LOG_DOMAIN=0xD004100", 148 ] 149 150 subsystem_name = "distributedhardware" 151 152 part_name = "device_manager" 153 } 154} 155