• 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("../../../dsoftbus.gni")
15
16native_source_path = rebase_path("$dsoftbus_root_path")
17disc_dep_dir = "dsoftbus_enhance/core/discovery/ble"
18
19ble_discovery_inc = [
20  "$dsoftbus_root_path/core/broadcast/common/include",
21  "$dsoftbus_root_path/core/discovery/ble/dispatcher/include",
22  "$dsoftbus_root_path/core/discovery/ble/approach_ble/include",
23  "$dsoftbus_root_path/core/discovery/ble/oop_ble/include",
24  "$dsoftbus_root_path/core/discovery/ble/share_ble/include",
25  "$dsoftbus_root_path/core/discovery/ble/softbus_ble/include",
26  "$dsoftbus_root_path/core/discovery/ble/touch_ble/include",
27  "$dsoftbus_root_path/core/discovery/ble/virtual_link_ble/include",
28  "$dsoftbus_root_path/core/discovery/common/include",
29  "$dsoftbus_root_path/core/common/include",
30]
31
32ble_discovery_deps = []
33ble_discovery_src = []
34if (dsoftbus_feature_deps_bluetooth) {
35  ble_discovery_deps += [ "$dsoftbus_dfx_path:softbus_dfx" ]
36}
37
38if (!dsoftbus_feature_inner_disc_ble) {
39  ble_discovery_src += [ "$dsoftbus_root_path/core/discovery/ble/dispatcher/src/disc_ble_dispatcher_virtual.c" ]
40} else {
41  ble_discovery_src += [ "$dsoftbus_root_path/core/discovery/ble/dispatcher/src/disc_ble_dispatcher.c" ]
42}
43
44if (dsoftbus_feature_disc_ble && dsoftbus_feature_inner_disc_ble) {
45  ble_discovery_src += [
46    "$dsoftbus_root_path/core/discovery/ble/softbus_ble/src/disc_ble_utils.c",
47    "$dsoftbus_root_path/core/discovery/ble/softbus_ble/src/disc_ble.c",
48  ]
49} else {
50  ble_discovery_src += [
51    "$dsoftbus_root_path/core/discovery/ble/softbus_ble/src/disc_ble_virtual.c",
52  ]
53}
54
55if (dsoftbus_feature_disc_virtual_link_ble && dsoftbus_feature_inner_disc_ble &&
56    dsoftbus_feature_ex_kits) {
57  import(
58      "$dsoftbus_root_path/dsoftbus_enhance/core/discovery/ble/virtual_link_ble/virtual_link_ble.gni")
59
60  ble_discovery_src += vlink_sources
61  ble_discovery_inc += vlink_include_dirs
62  ble_discovery_deps += vlink_deps
63} else {
64  ble_discovery_src += [ "$dsoftbus_root_path/core/discovery/ble/virtual_link_ble/src/disc_virtual_link_ble_virtual.c" ]
65}
66
67if (dsoftbus_feature_disc_approach && dsoftbus_feature_inner_disc_ble &&
68    dsoftbus_feature_ex_kits) {
69  import(
70      "$dsoftbus_root_path/dsoftbus_enhance/core/discovery/ble/approach_ble/approach_ble.gni")
71  import(
72      "$dsoftbus_root_path/dsoftbus_enhance/core/discovery/ble/oh_approach_ble/oh_approach_ble.gni")
73
74  ble_discovery_src += approach_sources
75  ble_discovery_inc += approach_include_dirs
76  ble_discovery_deps += approach_deps
77  ble_discovery_src += oh_approach_sources
78  ble_discovery_inc += oh_approach_include_dirs
79  ble_discovery_deps += oh_approach_deps
80} else {
81  ble_discovery_src += [ "$dsoftbus_root_path/core/discovery/ble/approach_ble/src/disc_approach_ble_virtual.c" ]
82}
83
84if (dsoftbus_feature_disc_touch && dsoftbus_feature_inner_disc_ble &&
85    dsoftbus_feature_ex_kits) {
86  import(
87      "$dsoftbus_root_path/dsoftbus_enhance/core/discovery/ble/touch_ble/touch_ble.gni")
88
89  ble_discovery_src += touch_sources
90  ble_discovery_inc += touch_include_dirs
91  ble_discovery_deps += touch_deps
92} else {
93  ble_discovery_src += [ "$dsoftbus_root_path/core/discovery/ble/touch_ble/src/disc_touch_ble_virtual.c" ]
94}
95
96if (dsoftbus_feature_disc_oop && dsoftbus_feature_inner_disc_ble &&
97    dsoftbus_feature_ex_kits) {
98  import(
99      "$dsoftbus_root_path/dsoftbus_enhance/core/discovery/ble/oop_ble/oop_ble.gni")
100
101  ble_discovery_src += oop_sources
102  ble_discovery_inc += oop_include_dirs
103  ble_discovery_deps += oop_deps
104} else {
105  ble_discovery_src += [
106    "$dsoftbus_root_path/core/discovery/ble/oop_ble/src/disc_oop_ble_virtual.c",
107  ]
108}
109
110if (dsoftbus_feature_ex_kits) {
111  import(
112      "$dsoftbus_root_path/dsoftbus_enhance/core/discovery/ble/share_ble/share_ble.gni")
113
114  ble_discovery_src += share_sources
115  ble_discovery_inc += share_include_dirs
116  ble_discovery_deps += share_deps
117} else {
118  ble_discovery_src += [ "$dsoftbus_root_path/core/discovery/ble/share_ble/src/disc_share_ble_virtual.c" ]
119}
120