• 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/miscdevice"
17ohos_ndk_library("libvibrator_ndk") {
18  output_name = "vibrator_agent"
19  ndk_description_file = "./libvibrator.json"
20  min_compact_version = "6"
21}
22
23ohos_ndk_headers("vibrator_ndk_header") {
24  dest_dir = "$ndk_headers_out_dir/sensors"
25  sources = [
26    "./include/vibrator_agent.h",
27    "./include/vibrator_agent_type.h",
28  ]
29}
30
31config("vibrator_config") {
32  include_dirs = [ "include" ]
33}
34
35ohos_shared_library("vibrator_interface_native") {
36  output_name = "vibrator_agent"
37  sources = [ "src/vibrator_agent.cpp" ]
38
39  include_dirs = [
40    "include",
41    "//commonlibrary/c_utils/base/include",
42    "//base/sensors/miscdevice/utils/include",
43    "//base/sensors/miscdevice/frameworks/native/miscdevice/include",
44    "//base/sensors/miscdevice/interfaces/native/light/include",
45    "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include",
46  ]
47
48  cflags = [ "-Wno-error=inconsistent-missing-override" ]
49
50  deps = [
51    "$SUBSYSTEM_DIR/frameworks/native/miscdevice:libvibrator_native",
52    "$SUBSYSTEM_DIR/interfaces/native/light:light_ndk_header",
53    "$SUBSYSTEM_DIR/interfaces/native/vibrator:libvibrator_ndk",
54  ]
55
56  external_deps = [
57    "c_utils:utils",
58    "hiviewdfx_hilog_native:libhilog",
59    "ipc:ipc_core",
60  ]
61
62  public_configs = [ ":vibrator_config" ]
63  part_name = "miscdevice"
64  subsystem_name = "sensors"
65}
66
67group("vibrator_target") {
68  deps = [ ":vibrator_interface_native" ]
69}
70