• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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")
15
16SUBSYSTEM_DIR = "//base/sensors/sensor"
17
18##############################################
19ohos_ndk_library("libsensor_ndk") {
20  output_name = "sensor"
21  ndk_description_file = "./libsensor.json"
22  min_compact_version = "6"
23}
24
25ohos_shared_library("sensor_interface_native") {
26  output_name = "sensor_agent"
27  sources = [
28    "src/geomagnetic_field.cpp",
29    "src/sensor_agent.cpp",
30    "src/sensor_algorithm.cpp",
31  ]
32
33  include_dirs = [
34    "include",
35    "//utils/native/base/include",
36    "//utils/system/safwk/native/include",
37    "$SUBSYSTEM_DIR/frameworks/native/sensor/include",
38    "$SUBSYSTEM_DIR/utils/include",
39    "$SUBSYSTEM_DIR/interfaces/native/include",
40    "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include",
41  ]
42  deps = [
43    "$SUBSYSTEM_DIR/frameworks/native/sensor:libsensor_native",
44    "$SUBSYSTEM_DIR/interfaces/native:libsensor_ndk",
45    "$SUBSYSTEM_DIR/utils:libsensor_utils",
46  ]
47  external_deps = [
48    "eventhandler:libeventhandler",
49    "hiviewdfx_hilog_native:libhilog",
50    "utils_base:utils",
51  ]
52  part_name = "sensor"
53  subsystem_name = "sensors"
54}
55
56##############################################
57group("sensor_ndk_target") {
58  deps = [ ":sensor_interface_native" ]
59}
60