• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2024 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("../../../dsoftbus.gni")
15
16native_source_path = rebase_path("$dsoftbus_root_path")
17
18usb_disc_inc = [
19  "$dsoftbus_root_path/core/common/include",
20  "$dsoftbus_root_path/core/discovery/usb/disc_usb/include",
21  "$dsoftbus_root_path/core/discovery/usb/dispatcher/include",
22]
23usb_disc_src = []
24usb_disc_deps = [ "$dsoftbus_dfx_path:softbus_dfx" ]
25usb_disc_external_deps = []
26
27if (dsoftbus_feature_disc_usb && has_ces_part) {
28  dsoftbus_feature_disc_usb_support = true
29} else {
30  dsoftbus_feature_disc_usb_support = false
31}
32
33if (!dsoftbus_feature_disc_usb_support || !dsoftbus_feature_ex_kits) {
34  usb_disc_src += [
35    "$dsoftbus_root_path/core/discovery/usb/dispatcher/src/disc_usb_dispatcher_virtual.c",
36    "$dsoftbus_root_path/core/discovery/usb/disc_usb/src/disc_usb_virtual.c",
37  ]
38} else {
39  import(
40      "$dsoftbus_root_path/dsoftbus_enhance/core/discovery/usb/disc_usb/disc_usb.gni")
41
42  usb_disc_src += [ "$dsoftbus_root_path/core/discovery/usb/dispatcher/src/disc_usb_dispatcher.c" ]
43
44  usb_disc_src += usb_discovery_sources
45  usb_disc_inc += usb_discovery_dirs
46  usb_disc_deps += usb_discovery_deps
47  usb_disc_external_deps += usb_discovery_external_deps
48}
49