• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023-2025 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/config/components/hdi/hdi.gni")
15import("//build/ohos.gni")
16import("./../input.gni")
17
18ohos_shared_library("libhid_ddk_service_1.1") {
19  sources = [
20    "src/ddk_sysfs_dev_node.cpp",
21    "src/hid_ddk_permission.cpp",
22    "src/hid_ddk_service.cpp",
23  ]
24
25  if (is_standard_system) {
26    sources += [ "src/hid_linux_adapter.cpp" ]
27  } else if (defined(ohos_lite)) {
28    sources += [ "src/hid_liteos_adapter.cpp" ]
29  }
30  include_dirs = [
31    "include/",
32    "include/emit_event_manager/",
33    "${input_driver_path}/utils/include",
34    "//drivers/hdf_core/framework/model/usb/include",
35    "//drivers/peripheral/usb/ddk/host/include",
36  ]
37
38  deps = [ "${input_driver_path}/ddk_service/src/emit_event_manager:emit_event_manager" ]
39
40  external_deps = [
41    "access_token:libaccesstoken_sdk",
42    "c_utils:utils",
43    "drivers_interface_input:hid_ddk_idl_headers",
44    "hdf_core:libhdf_utils",
45    "hilog:libhilog",
46    "ipc:ipc_single",
47  ]
48
49  install_images = [ chipset_base_dir ]
50  subsystem_name = "hdf"
51  part_name = "drivers_peripheral_input"
52}
53
54ohos_shared_library("libhid_ddk_driver") {
55  sources = [ "src/hid_ddk_driver.cpp" ]
56
57  include_dirs = [
58    "include/",
59    "include/emit_event_manager/",
60    "${input_driver_path}/utils/include",
61  ]
62
63  deps = [ "${input_driver_path}/ddk_service/src/emit_event_manager:emit_event_manager" ]
64
65  external_deps = [
66    "c_utils:utils",
67    "drivers_interface_input:libhid_ddk_stub_1.1",
68    "hdf_core:libhdf_host",
69    "hdf_core:libhdf_ipc_adapter",
70    "hdf_core:libhdf_utils",
71    "hdf_core:libhdi",
72    "hilog:libhilog",
73    "ipc:ipc_single",
74  ]
75
76  shlib_type = "hdi"
77  install_images = [ chipset_base_dir ]
78  subsystem_name = "hdf"
79  part_name = "drivers_peripheral_input"
80}
81
82group("hid_ddk_target") {
83  deps = [
84    ":libhid_ddk_driver",
85    ":libhid_ddk_service_1.1",
86  ]
87}
88