communication_dsoftbus/dsoftbus.gni
gaowen 8b51b78d09 设备名称统一
Signed-off-by: gaowen <gaowen17@huawei.com>
2025-01-17 16:35:48 +08:00

202 lines
6.2 KiB
Plaintext

# Copyright (c) 2021-2024 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
hispark_pegasus_sdk_path = "//device/soc/hisilicon/hi3861v100/sdk_liteos"
dsoftbus_root_path = rebase_path(".")
dsoftbus_sdk_path = "${dsoftbus_root_path}/sdk"
dsoftbus_core_path = "${dsoftbus_root_path}/core"
dsoftbus_dfx_path = "${dsoftbus_root_path}/dfx"
dsoftbus_test_path = "${dsoftbus_root_path}/tests"
dsoftbus_test_dfx_path = "${dsoftbus_test_path}/dfx"
dsoftbus_fuzz_out_path = "dsoftbus/soft_bus"
import("adapter/feature_config/external_deps_feature/external_deps_feature.gni")
import("adapter/feature_config/inner_feature/conn_inner_feature.gni")
import("adapter/feature_config/inner_feature/disc_inner_feature.gni")
import("adapter/feature_config/inner_feature/lnn_inner_feature.gni")
import("adapter/feature_config/inner_feature/softbus_common_feature.gni")
import("adapter/feature_config/inner_feature/t2stack_inner_feature.gni")
import("adapter/feature_config/inner_feature/trans_inner_feature.gni")
import("adapter/feature_config/public_feature/public_feature.gni")
declare_args() {
softbus_adapter_common = "${dsoftbus_root_path}/adapter/common"
softbus_adapter_config = "${dsoftbus_root_path}/adapter/default_config"
dsoftbus_feature_product_config_path =
"${dsoftbus_root_path}/adapter/default_config"
}
declare_args() {
dsoftbus_get_devicename = true
softbus_communication_wifi_feature = true
softbus_os_account = true
softbus_lnn_lp_feature = true
dsoftbus_build_eng = false
dsoftbus_access_token_feature = true
dsoftbus_ipc_feature = true
if (product_name != "qemu-arm-linux-min") {
qemu_arm_disable = true
} else {
qemu_arm_disable = false
}
}
dsoftbus_feature_lnn_frame = true
if (defined(global_parts_info) &&
!defined(global_parts_info.communication_wifi)) {
softbus_communication_wifi_feature = false
}
if (defined(global_parts_info) &&
!defined(global_parts_info.ability_ability_runtime)) {
dsoftbus_get_devicename = false
}
if (defined(global_parts_info) &&
!defined(global_parts_info.account_os_account)) {
softbus_os_account = false
}
if (defined(global_parts_info) &&
!defined(global_parts_info.communication_bluetooth)) {
support_bluetooth = false
} else {
support_bluetooth = true
}
if (defined(global_parts_info) &&
!defined(global_parts_info.resourceschedule_device_standby_ext)) {
softbus_lnn_lp_feature = false
}
if (defined(global_parts_info) &&
!defined(global_parts_info.security_access_token)) {
dsoftbus_access_token_feature = false
}
if (defined(global_parts_info) &&
!defined(global_parts_info.communication_ipc)) {
dsoftbus_ipc_feature = false
}
if (defined(ohos_lite)) {
import("//build/lite/config/component/lite_component.gni")
if (ohos_kernel_type == "liteos_m") {
defines = [ "SOFTBUS_LITEOS_M" ]
import("$softbus_adapter_config/feature_config/mini/config.gni")
} else {
defines = [ "SOFTBUS_LITEOS_A" ]
import("$softbus_adapter_config/feature_config/small/config.gni")
}
} else {
if (defined(os_win)) {
os_type = "windows"
} else {
os_type = "standard"
}
defines = [ "SOFTBUS_LINUX" ]
if (is_standard_system) {
defines += [ "SOFTBUS_STANDARD_OS" ]
}
import("//build/ohos.gni")
import(
"$dsoftbus_feature_product_config_path/feature_config/standard/config.gni")
if (build_variant == "root") {
defines += [ "BUILD_VARIANT_ENG" ]
dsoftbus_build_eng = true
} else {
dsoftbus_build_eng = false
}
}
defines += [ "OPENSSL_NO_FILENAMES" ]
if (dsoftbus_feature_disc_notification &&
dsoftbus_feature_inner_disc_broadcast) {
defines += [ "DSOFTBUS_FEATURE_DISC_NOTIFICATION" ]
}
if (dsoftbus_feature_disc_notification_rx &&
dsoftbus_feature_inner_disc_broadcast) {
defines += [ "DSOFTBUS_FEATURE_DISC_NOTIFICATION_RX" ]
}
if (dsoftbus_feature_disc_link_ble && dsoftbus_feature_inner_disc_broadcast) {
defines += [ "DSOFTBUS_FEATURE_DISC_LINK_BLE" ]
}
if (dsoftbus_feature_disc_coap && dsoftbus_feature_inner_disc_coap) {
defines += [ "DSOFTBUS_FEATURE_DISC_COAP" ]
}
if (dsoftbus_feature_disc_lnn_coap && dsoftbus_feature_inner_disc_coap) {
defines += [ "DSOFTBUS_FEATURE_DISC_LNN_COAP" ]
}
if (dsoftbus_feature_disc_share_coap && dsoftbus_feature_inner_disc_coap) {
defines += [ "DSOFTBUS_FEATURE_DISC_SHARE_COAP" ]
}
if (defined(global_parts_info) &&
!defined(global_parts_info.distributeddatamgr_kv_store)) {
dsoftbus_feature_lnn_cloud_sync = false
} else {
dsoftbus_feature_lnn_cloud_sync = true
}
if (defined(global_parts_info) && !defined(global_parts_info.global_i18n)) {
support_i18n = false
} else {
support_i18n = true
}
import("$dsoftbus_dfx_path/dsoftbus_dfx.gni")
if (defined(global_parts_info) &&
!defined(global_parts_info.notification_common_event_service)) {
has_ces_part = false
} else {
has_ces_part = true
}
if (dsoftbus_feature_lnn_wifi) {
defines += [ "ENABLE_FEATURE_LNN_WIFI" ]
}
if (dsoftbus_feature_lnn_ble) {
defines += [ "ENABLE_FEATURE_LNN_BLE" ]
}
if (dsoftbus_feature_conn_pv1 && softbus_communication_wifi_feature &&
dsoftbus_feature_conn_tcp_comm) {
defines += [ "DSOFTBUS_FEATURE_CONN_PV1" ]
if (dsoftbus_feature_conn_pv2 && dsoftbus_feature_conn_pv1) {
defines += [ "DSOFTBUS_FEATURE_CONN_PV2" ]
}
if (dsoftbus_feature_conn_action) {
defines += [ "DSOFTBUS_FEATURE_CONN_ACTION" ]
if (dsoftbus_feature_conn_hv2 && dsoftbus_feature_disc_link_ble) {
defines += [ "DSOFTBUS_FEATURE_CONN_HV2" ]
if (dsoftbus_feature_conn_hv1 && dsoftbus_feature_conn_pv2 &&
dsoftbus_feature_conn_pv1) {
defines += [ "DSOFTBUS_FEATURE_CONN_HV1" ]
}
if (dsoftbus_feature_conn_hv2c) {
defines += [ "DSOFTBUS_FEATURE_CONN_HV2C" ]
}
}
}
}