fix external deps

Signed-off-by: Mark <liudongmiao@huawei.com>
This commit is contained in:
Mark 2023-07-17 15:33:04 +00:00
parent a1380099a6
commit df2674ccd0
8 changed files with 92 additions and 134 deletions

View File

@ -198,10 +198,11 @@ if (defined(ohos_lite)) {
]
}
external_deps = []
if (enhanced_range && defined(global_parts_info.msdp_algorithm)) {
include_dirs += [ "//base/msdp/algorithm/ble_range/include" ]
sources += [ "$dsoftbus_root_path/dsoftbus_enhance/adapter/common/range/softbus_adapter_range.c" ]
public_deps += [ "//base/msdp/algorithm/ble_range:msdp_ble_range" ]
external_deps += [ "algorithm:msdp_ble_range" ]
} else {
sources += [ "$softbus_adapter_common/range/softbus_adapter_range.c" ]
}
@ -215,7 +216,7 @@ if (defined(ohos_lite)) {
}
public_configs = [ ":config_adapter_common" ]
if (is_standard_system) {
external_deps = [
external_deps += [
"hilog:libhilog",
"hisysevent:libhisysevent",
"hitrace:libhitracechain",

View File

@ -12,7 +12,6 @@
# limitations under the License.
import("//foundation/communication/dsoftbus/dsoftbus.gni")
adapter_ble_external_deps = [ "hilog:libhilog" ]
adapter_ble_inc = [
"$dsoftbus_root_path/adapter/common/include",
@ -30,5 +29,6 @@ adapter_ble_src = [
"$dsoftbus_root_path/adapter/common/net/bluetooth/common/softbus_adapter_bt_common.c",
]
adapter_net_br_src = [ "$dsoftbus_root_path/adapter/common/net/bluetooth/common/softbus_adapter_bt_common.c" ]
adapter_ble_deps =
adapter_ble_external_deps = [ "bluetooth:btframework" ]
compatible_ble_deps =
[ "//foundation/communication/bluetooth/frameworks/inner:btframework" ]

View File

@ -47,8 +47,12 @@
"ability_base",
"ability_runtime",
"access_token",
"algorithm",
"bluetooth",
"bundle_framework",
"common",
"common_event_service",
"data_share",
"device_auth",
"drivers_interface_wlan",
"hicollie_native",
@ -67,7 +71,12 @@
],
"third_party": [
"bounds_checking_function",
"cJSON"
"cJSON",
"libcoap",
"libnl",
"mbedtls",
"openssl",
"sqlite"
]
},
"build": {

View File

@ -30,7 +30,8 @@ enhanced_conn_coc = exec_script("$dsoftbus_root_path/check_sub_module.py",
"$conn_coc_dir",
],
"value")
ble_connection_deps = []
ble_connection_external_deps = []
ble_compatible_external_deps = []
if (dsoftbus_feature_conn_ble == false) {
ble_connection_src = [
"$dsoftbus_root_path/core/connection/ble/src/softbus_conn_ble_direct_virtual.c",
@ -45,7 +46,8 @@ if (dsoftbus_feature_conn_ble == false) {
if (dsoftbus_feature_conn_br == true) {
ble_connection_src += adapter_net_br_src
ble_connection_inc += adapter_ble_inc
ble_connection_deps += adapter_ble_deps
ble_connection_external_deps += adapter_ble_external_deps
ble_compatible_external_deps += compatible_ble_deps
}
} else {
ble_connection_src = [
@ -87,5 +89,6 @@ if (dsoftbus_feature_conn_ble == false) {
}
ble_connection_src += adapter_ble_src
ble_connection_inc += adapter_ble_inc
ble_connection_deps += adapter_ble_deps
ble_connection_external_deps += adapter_ble_external_deps
ble_compatible_external_deps += compatible_ble_deps
}

View File

@ -14,7 +14,6 @@
import("//foundation/communication/dsoftbus/core/adapter/core_adapter.gni")
import("//foundation/communication/dsoftbus/dsoftbus.gni")
br_connection_deps = []
br_connection_inc = br_adapter_inc
if (dsoftbus_feature_conn_br == false) {
br_connection_src =

View File

@ -23,8 +23,9 @@ conn_manager_src = ble_connection_src + br_connection_src + tcp_connection_src +
wifi_direct_connection_src
conn_manager_inc = ble_connection_inc + br_connection_inc + tcp_connection_inc +
wifi_direct_connection_inc
conn_manager_deps = ble_connection_deps + br_connection_deps
conn_manager_external_deps = wifi_direct_connection_external_deps
conn_compatible_external_deps = ble_compatible_external_deps
conn_manager_external_deps =
wifi_direct_connection_external_deps + ble_connection_external_deps
conn_manager_src +=
[ "$dsoftbus_root_path/core/connection/manager/softbus_conn_manager.c" ]
conn_manager_inc += [

View File

@ -27,8 +27,8 @@ dsoftbus_server_common_inc =
auth_server_inc + bus_center_server_inc + conn_manager_inc +
disc_server_inc + trans_session_inc + softbus_permission_inc
dsoftbus_server_common_deps =
auth_server_deps + bus_center_server_deps + conn_manager_deps +
disc_server_deps + trans_session_deps + softbus_permission_deps
auth_server_deps + bus_center_server_deps + disc_server_deps +
trans_session_deps + softbus_permission_deps
if (defined(ohos_lite)) {
copy("permission_json") {
@ -74,6 +74,7 @@ if (defined(ohos_lite)) {
]
}
deps = dsoftbus_server_common_deps
deps += conn_compatible_external_deps
deps += [
"$dsoftbus_root_path/adapter:softbus_adapter",
"$dsoftbus_root_path/core/common:softbus_utils",
@ -116,6 +117,7 @@ if (defined(ohos_lite)) {
]
cflags_cc = cflags
deps = dsoftbus_server_common_deps
deps += conn_compatible_external_deps
deps += [
":permission_json",
"$dsoftbus_root_path/adapter:softbus_adapter",

View File

@ -17,147 +17,90 @@ import("//build/test.gni")
import("../../../adapter/common/net/bluetooth/net_bluetooth.gni")
import("../../../dsoftbus.gni")
module_output_path = "dsoftbus/adapter"
if (!defined(ohos_lite)) {
module_output_path = "dsoftbus/adapter"
bt_test_sources = [ "bluetooth_mock.cpp" ]
bt_test_sources += adapter_ble_src
ohos_unittest("AdapterBleGattTest") {
module_out_path = module_output_path
sources = [
"bluetooth_mock.cpp",
"softbus_adapter_ble_gatt_test.cpp",
]
bt_test_inc = [ "../../../adapter/common/net/bluetooth/include" ]
bt_test_inc += adapter_ble_inc
include_dirs = [ "../../../adapter/common/net/bluetooth/include" ]
deps = [
bt_test_deps = [
"$dsoftbus_root_path/core/common:softbus_utils",
"//third_party/googletest:gmock_main",
"//third_party/googletest:gtest_main",
]
external_deps = [ "c_utils:utils" ]
if (is_standard_system) {
external_deps += [ "hilog:libhilog" ]
} else {
external_deps += [ "hilog:libhilog" ]
bt_test_external_deps = [
"c_utils:utils",
"hilog:libhilog",
]
if (dsoftbus_feature_conn_ble == true || dsoftbus_feature_conn_br == true) {
bt_test_external_deps += [ "bluetooth:btframework" ]
}
sources += adapter_ble_src
include_dirs += adapter_ble_inc
deps += adapter_ble_deps
}
ohos_unittest("AdapterBleGattTest") {
module_out_path = module_output_path
sources = bt_test_sources
sources += [ "softbus_adapter_ble_gatt_test.cpp" ]
ohos_unittest("AdapterBleGattServerTest") {
module_out_path = module_output_path
sources = [
"bluetooth_mock.cpp",
"softbus_adapter_ble_gatt_server_test.cpp",
]
include_dirs = [ "../../../adapter/common/net/bluetooth/include" ]
deps = [
"$dsoftbus_root_path/core/common:softbus_utils",
"//third_party/googletest:gmock_main",
"//third_party/googletest:gtest_main",
]
external_deps = [ "c_utils:utils" ]
if (is_standard_system) {
external_deps += [ "hilog:libhilog" ]
} else {
external_deps += [ "hilog:libhilog" ]
include_dirs = bt_test_inc
deps = bt_test_deps
external_deps = bt_test_external_deps
}
sources += adapter_ble_src
include_dirs += adapter_ble_inc
deps += adapter_ble_deps
}
ohos_unittest("AdapterBleGattServerTest") {
module_out_path = module_output_path
sources = bt_test_sources
sources += [ "softbus_adapter_ble_gatt_server_test.cpp" ]
ohos_unittest("AdapterBleGattClientTest") {
module_out_path = module_output_path
sources = [
"bluetooth_mock.cpp",
"softbus_adapter_ble_gatt_client_test.cpp",
]
include_dirs = [ "../../../adapter/common/net/bluetooth/include" ]
deps = [
"$dsoftbus_root_path/core/common:softbus_utils",
"//third_party/googletest:gmock_main",
"//third_party/googletest:gtest_main",
]
external_deps = [ "c_utils:utils" ]
if (is_standard_system) {
external_deps += [ "hilog:libhilog" ]
} else {
external_deps += [ "hilog:libhilog" ]
include_dirs = bt_test_inc
deps = bt_test_deps
external_deps = bt_test_external_deps
}
sources += adapter_ble_src
include_dirs += adapter_ble_inc
deps += adapter_ble_deps
}
ohos_unittest("AdapterBleGattClientTest") {
module_out_path = module_output_path
sources = bt_test_sources
sources += [ "softbus_adapter_ble_gatt_client_test.cpp" ]
ohos_unittest("AdapterBtUtilsTest") {
module_out_path = module_output_path
sources = [ "adapter_bt_utils_test.cpp" ]
include_dirs = [ "../../../adapter/common/net/bluetooth/include" ]
deps = [
"$dsoftbus_root_path/core/common:softbus_utils",
"//third_party/googletest:gmock_main",
"//third_party/googletest:gtest_main",
]
external_deps = [ "c_utils:utils" ]
if (is_standard_system) {
external_deps += [ "hilog:libhilog" ]
} else {
external_deps += [ "hilog:libhilog" ]
include_dirs = bt_test_inc
deps = bt_test_deps
external_deps = bt_test_external_deps
}
sources += adapter_ble_src
include_dirs += adapter_ble_inc
deps += adapter_ble_deps
}
ohos_unittest("AdapterBtUtilsTest") {
module_out_path = module_output_path
sources = [ "adapter_bt_utils_test.cpp" ]
sources += adapter_ble_src
ohos_unittest("AdapterBtCommonTest") {
module_out_path = module_output_path
sources = [
"bluetooth_mock.cpp",
"softbus_adapter_bt_common_test.cpp",
]
include_dirs = [ "../../../adapter/common/net/bluetooth/include" ]
deps = [
"$dsoftbus_root_path/core/common:softbus_utils",
"//third_party/googletest:gmock_main",
"//third_party/googletest:gtest_main",
]
external_deps = [ "c_utils:utils" ]
if (is_standard_system) {
external_deps += [ "hilog:libhilog" ]
} else {
external_deps += [ "hilog:libhilog" ]
include_dirs = bt_test_inc
deps = bt_test_deps
external_deps = bt_test_external_deps
}
sources += adapter_ble_src
include_dirs += adapter_ble_inc
deps += adapter_ble_deps
}
ohos_unittest("AdapterBtCommonTest") {
module_out_path = module_output_path
sources = bt_test_sources
sources += [ "softbus_adapter_bt_common_test.cpp" ]
group("unittest") {
testonly = true
deps = [
":AdapterBleGattClientTest",
":AdapterBleGattServerTest",
":AdapterBleGattTest",
":AdapterBtCommonTest",
":AdapterBtUtilsTest",
]
include_dirs = bt_test_inc
deps = bt_test_deps
external_deps = bt_test_external_deps
}
group("unittest") {
testonly = true
deps = []
if (dsoftbus_feature_conn_ble == true || dsoftbus_feature_conn_br == true) {
deps += [
":AdapterBleGattClientTest",
":AdapterBleGattServerTest",
":AdapterBleGattTest",
":AdapterBtCommonTest",
":AdapterBtUtilsTest",
]
}
}
}