• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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("./../../sensor.gni")
16
17ohos_shared_library("libsensor_utils") {
18  sources = [
19    "src/active_info.cpp",
20    "src/motion_plugin.cpp",
21    "src/permission_util.cpp",
22    "src/print_sensor_data.cpp",
23    "src/report_data_callback.cpp",
24    "src/sensor.cpp",
25    "src/sensor_basic_data_channel.cpp",
26    "src/sensor_basic_info.cpp",
27    "src/sensor_channel_info.cpp",
28    "src/sensor_xcollie.cpp",
29  ]
30
31  cflags = [
32    "-ffunction-sections",
33    "-fdata-sections",
34    "-Oz",
35  ]
36
37  cflags_cc = [
38    "-ffunction-sections",
39    "-fdata-sections",
40    "-Oz",
41  ]
42
43  branch_protector_ret = "pac_ret"
44  sanitize = {
45    cfi = true
46    cfi_cross_dso = true
47    debug = false
48  }
49
50  include_dirs = [
51    "$SUBSYSTEM_DIR/interfaces/inner_api",
52    "$SUBSYSTEM_DIR/frameworks/native/include",
53    "$SUBSYSTEM_DIR/utils/common/include",
54  ]
55
56  external_deps = [
57    "access_token:libaccesstoken_sdk",
58    "access_token:libprivacy_sdk",
59    "c_utils:utils",
60    "hicollie:libhicollie",
61    "hilog:libhilog",
62    "ipc:ipc_single",
63  ]
64
65  defines = sensor_default_defines
66  if (hiviewdfx_hisysevent_enable) {
67    external_deps += [ "hisysevent:libhisysevent" ]
68  }
69
70  innerapi_tags = [ "platformsdk_indirect" ]
71  part_name = "sensor"
72  subsystem_name = "sensors"
73}
74