• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2024 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("../../../../device_status.gni")
15
16config("device_motion_private_config") {
17  include_dirs = [
18    "include",
19    "${device_status_frameworks_path}/js/utils/include"
20  ]
21}
22
23ohos_shared_library("motion_napi") {
24  branch_protector_ret = "pac_ret"
25  sanitize = {
26    integer_overflow = true
27    ubsan = true
28    boundary_sanitize = true
29    cfi = true
30    cfi_cross_dso = true
31    debug = false
32  }
33
34  sources = [
35    "${device_status_frameworks_path}/js/napi/motion/src/motion_event_napi.cpp",
36    "${device_status_frameworks_path}/js/napi/motion/src/motion_napi.cpp",
37    "${device_status_frameworks_path}/js/napi/motion/src/motion_napi_error.cpp",
38  ]
39
40  configs = [ ":device_motion_private_config" ]
41
42  deps = [
43    "${device_status_utils_path}:devicestatus_util",
44    "${device_status_frameworks_path}/js/utils:device_status_napi_utils"
45  ]
46
47  external_deps = [
48    "c_utils:utils",
49    "eventhandler:libeventhandler",
50    "hilog:libhilog",
51    "ipc:ipc_single",
52    "napi:ace_napi",
53  ]
54
55  defines = [ "LOG_DOMAIN = 0xD002210" ]
56  if (device_status_motion_enable) {
57    defines += [ "MOTION_ENABLE" ]
58    external_deps += [
59      "motion:motion_client",
60      "motion:motion_interface_native",
61      "hiappevent:hiappevent_innerapi"
62    ]
63  }
64
65  relative_install_dir = "module/multimodalawareness"
66  subsystem_name = "msdp"
67  part_name = "${device_status_part_name}"
68}
69