• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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("//base/usb/usb_manager/usbmgr.gni")
15
16config("usbnapi_private_config") {
17  include_dirs = [
18    "//foundation/arkui/napi/native_engine",
19    "//foundation/arkui/napi/interfaces/kits",
20    "//third_party/node/src",
21    "//third_party/jsoncpp/include/json",
22    "${usb_manager_path}/interfaces/kits/js/napi/include",
23    "${usb_manager_path}/interfaces/innerkits/native/include",
24  ]
25}
26
27ohos_shared_library("usb") {
28  sources = [
29    "${utils_path}/native/src/usb_napi_errors.cpp",
30    "src/napi_util.cpp",
31    "src/usb_info.cpp",
32    "src/usb_middle.cpp",
33  ]
34  configs = [
35    "${utils_path}:utils_config",
36    ":usbnapi_private_config",
37  ]
38  deps = [
39    "${usb_manager_path}/interfaces/innerkits:usbsrv_client",
40    "//third_party/jsoncpp:jsoncpp",
41  ]
42  external_deps = [
43    "drivers_interface_usb:usb_idl_headers",
44    "hiviewdfx_hilog_native:libhilog",
45    "napi:ace_napi",
46  ]
47
48  relative_install_dir = "module"
49
50  subsystem_name = "usb"
51  part_name = "usb_manager"
52}
53
54ohos_shared_library("usbmanager") {
55  sources = [
56    "${utils_path}/native/src/usb_napi_errors.cpp",
57    "src/napi_util.cpp",
58    "src/usb_info.cpp",
59    "src/usbmanager_middle.cpp",
60  ]
61  configs = [
62    "${utils_path}:utils_config",
63    ":usbnapi_private_config",
64  ]
65  deps = [
66    "${usb_manager_path}/interfaces/innerkits:usbsrv_client",
67    "//third_party/jsoncpp:jsoncpp",
68  ]
69  external_deps = [
70    "drivers_interface_usb:usb_idl_headers",
71    "hiviewdfx_hilog_native:libhilog",
72    "napi:ace_napi",
73  ]
74
75  relative_install_dir = "module"
76
77  subsystem_name = "usb"
78  part_name = "usb_manager"
79}
80