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
25config("devicestatus_callback_config") {
26  include_dirs = [ "include" ]
27}
28
29ohos_shared_library("stationary") {
30  branch_protector_ret = "pac_ret"
31  sanitize = {
32    integer_overflow = true
33    ubsan = true
34    boundary_sanitize = true
35    cfi = true
36    cfi_cross_dso = true
37    debug = false
38  }
39  sources = [
40    "${device_status_frameworks_path}/js/napi/src/devicestatus_event.cpp",
41    "${device_status_frameworks_path}/js/napi/src/devicestatus_napi.cpp",
42    "${device_status_frameworks_path}/js/napi/src/devicestatus_napi_error.cpp",
43  ]
44
45  configs = [
46    "${device_status_utils_path}:devicestatus_utils_config",
47    ":devicestatusnapi_private_config",
48  ]
49
50  public_configs = [ ":devicestatus_callback_config" ]
51
52  deps = [ "../../../interfaces/innerkits:devicestatus_client" ]
53
54  external_deps = [
55    "c_utils:utils",
56    "hilog:libhilog",
57    "image_framework:image_native",
58    "ipc:ipc_single",
59    "napi:ace_napi",
60  ]
61
62  relative_install_dir = "module"
63  subsystem_name = "${device_status_subsystem_name}"
64  part_name = "${device_status_part_name}"
65}
66