mirror of
https://gitee.com/openharmony/communication_dsoftbus
synced 2024-12-14 05:18:57 +00:00
97 lines
3.2 KiB
Plaintext
97 lines
3.2 KiB
Plaintext
# Copyright (c) 2021 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.
|
|
|
|
import("//foundation/communication/dsoftbus/dsoftbus.gni")
|
|
|
|
import("//foundation/communication/dsoftbus/sdk/bus_center/bus_center_sdk.gni")
|
|
import("//foundation/communication/dsoftbus/sdk/discovery/disc_sdk.gni")
|
|
import("//foundation/communication/dsoftbus/sdk/frame/frame_sdk.gni")
|
|
import("//foundation/communication/dsoftbus/sdk/transmission/trans_sdk.gni")
|
|
|
|
common_client_src = bus_center_sdk_src + disc_sdk_src +
|
|
softbus_client_frame_src + trans_session_manager_sdk_src
|
|
common_client_inc = bus_center_sdk_inc + disc_sdk_inc +
|
|
softbus_client_frame_inc + trans_session_manager_sdk_inc
|
|
common_client_deps = bus_center_sdk_deps + trans_session_manager_sdk_deps
|
|
|
|
common_client_deps += [
|
|
"$dsoftbus_root_path/adapter:softbus_adapter",
|
|
"$dsoftbus_root_path/core/common:softbus_utils",
|
|
]
|
|
|
|
if (defined(ohos_lite)) {
|
|
if (dsoftbus_standard_feature_build_shared_sdk == true) {
|
|
build_type = "shared_library"
|
|
} else {
|
|
build_type = "static_library"
|
|
}
|
|
if (ohos_kernel_type != "liteos_m") {
|
|
common_client_deps += [
|
|
"//foundation/communication/ipc_lite:liteipc_adapter",
|
|
"//foundation/distributedschedule/samgr_lite/samgr:samgr",
|
|
"//third_party/bounds_checking_function:libsec_shared",
|
|
]
|
|
}
|
|
} else {
|
|
if (dsoftbus_standard_feature_build_shared_sdk == true) {
|
|
build_type = "ohos_shared_library"
|
|
} else {
|
|
build_type = "ohos_static_library"
|
|
}
|
|
common_client_deps += [
|
|
"//utils/native/base:utils",
|
|
"//utils/native/base:utilsecurec_shared",
|
|
]
|
|
}
|
|
|
|
config("dsoftbus_sdk_interface") {
|
|
include_dirs = [
|
|
"$dsoftbus_root_path/interfaces/kits",
|
|
"$dsoftbus_root_path/interfaces/kits/bus_center",
|
|
"$dsoftbus_root_path/interfaces/kits/common",
|
|
"$dsoftbus_root_path/interfaces/kits/discovery",
|
|
"$dsoftbus_root_path/interfaces/kits/transport",
|
|
"$dsoftbus_root_path/sdk/transmission/session/cpp/include",
|
|
"$dsoftbus_root_path/interfaces/inner_kits/transport",
|
|
]
|
|
}
|
|
|
|
target(build_type, "softbus_client") {
|
|
sources = common_client_src
|
|
include_dirs = common_client_inc
|
|
deps = common_client_deps
|
|
public_configs = [ ":dsoftbus_sdk_interface" ]
|
|
defines = TRANS_SDK_DEFINES
|
|
|
|
if (defined(ohos_lite)) {
|
|
configs -= [ "//build/lite/config:language_cpp" ]
|
|
cflags = [ "-fPIC" ]
|
|
cflags_cc = [
|
|
"-std=c++14",
|
|
"-fPIC",
|
|
]
|
|
ldflags = [ "-lstdc++" ]
|
|
} else {
|
|
cflags = [ "-fPIC" ]
|
|
cflags_cc = [ "-std=c++14" ]
|
|
if (is_standard_system) {
|
|
external_deps = [
|
|
"hiviewdfx_hilog_native:libhilog",
|
|
"ipc:ipc_single",
|
|
]
|
|
}
|
|
part_name = "dsoftbus_standard"
|
|
subsystem_name = "communication"
|
|
}
|
|
}
|