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/ace/ace.gni")
15import("../../../device_status.gni")
16
17config("devicestatusnapi_private_config") {
18  include_dirs = [
19    "include",
20    "${device_status_interfaces_path}/innerkits/include",
21    "${device_status_service_path}/native/include",
22  ]
23}
24
25ohos_shared_library("deviceagent") {
26  branch_protector_ret = "pac_ret"
27  sanitize = {
28    integer_overflow = true
29    ubsan = true
30    boundary_sanitize = true
31    cfi = true
32    cfi_cross_dso = true
33    debug = false
34  }
35  sources = [ "./devicestatus_agent.cpp" ]
36
37  configs = [
38    "${device_status_utils_path}:devicestatus_utils_config",
39    ":devicestatusnapi_private_config",
40  ]
41
42  deps = [ "../../../interfaces/innerkits:devicestatus_client" ]
43
44  public_configs = [
45    "${device_status_frameworks_path}/js/napi:devicestatus_callback_config",
46  ]
47
48  external_deps = [
49    "c_utils:utils",
50    "hilog:libhilog",
51    "image_framework:image_native",
52    "ipc:ipc_single",
53  ]
54
55  subsystem_name = "${device_status_subsystem_name}"
56  part_name = "${device_status_part_name}"
57}
58