• 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("//foundation/communication/dsoftbus/dsoftbus.gni")
15
16native_source_path = rebase_path("$dsoftbus_root_path")
17disc_dep_dir = "dsoftbus_enhance/core/discovery/ble/share_ble"
18enhanced_share = exec_script("$dsoftbus_root_path/check_sub_module.py",
19                             [
20                               "$native_source_path",
21                               "$disc_dep_dir",
22                             ],
23                             "value")
24
25ble_discovery_inc = [
26  "$dsoftbus_root_path/core/discovery/ble/dispatcher/include",
27  "$dsoftbus_root_path/core/discovery/ble/share_ble/include",
28  "$dsoftbus_root_path/core/discovery/ble/softbus_ble/include",
29  "$dsoftbus_root_path/core/common/include",
30  "$dsoftbus_root_path/core/common/dfx/hisysevent_adapter/include",
31]
32
33ble_discovery_deps = []
34
35if (dsoftbus_feature_disc_ble == false) {
36  ble_discovery_src = [ "$dsoftbus_root_path/core/discovery/ble/dispatcher/src/disc_ble_dispatcher_virtual.c" ]
37} else {
38  ble_discovery_src = [
39    "$dsoftbus_root_path/core/discovery/ble/dispatcher/src/disc_ble_dispatcher.c",
40    "$dsoftbus_root_path/core/discovery/ble/softbus_ble/src/disc_ble_utils.c",
41    "$dsoftbus_root_path/core/discovery/ble/softbus_ble/src/disc_ble.c",
42  ]
43}
44
45if (enhanced_share) {
46  import(
47      "$dsoftbus_root_path/dsoftbus_enhance/core/discovery/ble/share_ble/share_ble.gni")
48
49  ble_discovery_src += share_sources
50  ble_discovery_inc += share_include_dirs
51  ble_discovery_deps += share_deps
52} else {
53  ble_discovery_src += [ "$dsoftbus_root_path/core/discovery/ble/share_ble/src/disc_share_ble_virtual.c" ]
54}
55