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
14import("//build/ohos.gni")
15import("//foundation/distributedhardware/device_manager/device_manager.gni")
16
17ohos_shared_library("devicemanagerext_pin_auth") {
18  branch_protector_ret = "pac_ret"
19
20  sanitize = {
21    boundary_sanitize = true
22    cfi = true
23    cfi_cross_dso = true
24    debug = false
25    integer_overflow = true
26    ubsan = true
27  }
28
29  include_dirs = [
30    "include",
31    "include/standard",
32    "${common_path}/include",
33    "${devicemanager_path}/commondependency/include",
34    "${ext_path}/pin_auth/include/ability",
35    "${servicesimpl_path}/include/dependency/timer",
36    "${servicesimpl_path}/include/config",
37    "${servicesimpl_path}/include/adapter",
38    "${servicesimpl_path}/include/authentication",
39    "${servicesimpl_path}/include/authentication/showconfirm/standard",
40    "${servicesimpl_path}/include/ability",
41    "${servicesimpl_path}/include/devicestate",
42    "${servicesimpl_path}/include/discovery",
43    "${servicesimpl_path}/include/dependency/commonevent",
44    "${servicesimpl_path}/include/dependency/hichain",
45    "${servicesimpl_path}/include/dependency/softbus",
46    "${services_path}/include/ipc",
47    "${services_path}/include/ipc/standard",
48    "${utils_path}/include",
49    "${utils_path}/include/ipc/standard",
50    "${servicesimpl_path}/include",
51    "${innerkits_path}/native_cpp/include",
52    "${common_path}/include/ipc",
53    "${common_path}/include/ipc/model",
54    "${innerkits_path}/native_cpp/include",
55    "${innerkits_path}/native_cpp/include/ipc",
56    "${innerkits_path}/native_cpp/include/ipc/standard",
57  ]
58
59  sources = [
60    "src/ability/standard/dm_ability_manager.cpp",
61    "src/pin_auth.cpp",
62    "src/standard/pin_auth_ui.cpp",
63  ]
64
65  deps = [
66    "${innerkits_path}/native_cpp:devicemanagersdk",
67    "${servicesimpl_path}:devicemanagerserviceimpl",
68  ]
69
70  external_deps = [
71    "ability_base:want",
72    "ability_runtime:ability_manager",
73    "bundle_framework:appexecfwk_base",
74    "bundle_framework:appexecfwk_core",
75    "c_utils:utils",
76    "device_auth:deviceauth_sdk",
77    "device_info_manager:distributed_device_profile_common",
78    "device_info_manager:distributed_device_profile_sdk",
79    "ffrt:libffrt",
80    "hilog:libhilog",
81    "init:libbegetutil",
82    "ipc:ipc_single",
83    "json:nlohmann_json_static",
84    "resource_management:resmgr_napi_core",
85    "safwk:system_ability_fwk",
86  ]
87
88  defines = [
89    "HI_LOG_ENABLE",
90    "DH_LOG_TAG=\"devicemanagerext\"",
91    "LOG_DOMAIN=0xD004110",
92  ]
93
94  subsystem_name = "distributedhardware"
95  part_name = "device_manager"
96}
97