edge split

This commit is contained in:
flower_linux
2026-05-13 16:45:31 +08:00
parent df5eb5529c
commit 238b814057
31 changed files with 1934 additions and 52 deletions

View File

@@ -31,6 +31,13 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOMOC ON)
# Qt6daemon 使用 Core/DBus/Network/SerialPort/Sqlorchestrator 已迁至 Python
find_package(Qt6 6.5 REQUIRED COMPONENTS Core SerialPort Network Sql DBus)
find_package(Qt6 QUIET COMPONENTS SerialBus)
if(TARGET Qt6::SerialBus)
set(SOFTBUS_DAEMON_HAVE_CAN 1)
else()
set(SOFTBUS_DAEMON_HAVE_CAN 0)
message(STATUS "Qt6 SerialBus not found: building softbus_daemon without local SocketCAN devices")
endif()
include(CheckIncludeFileCXX)
@@ -182,6 +189,10 @@ qt_add_executable(softbus_daemon
src/message_bus/ingress/IIngressPort.h
src/message_bus/ingress/DriverIngressAdapter.h
src/message_bus/ingress/DriverIngressAdapter.cpp
src/message_bus/ingress/EdgeUplinkWire.h
src/message_bus/ingress/EdgeUplinkWire.cpp
src/message_bus/ingress/EdgeTcpIngressService.h
src/message_bus/ingress/EdgeTcpIngressService.cpp
src/message_bus/egress/IEgressPort.h
src/message_bus/egress/EgressRouter.h
src/message_bus/egress/EgressRouter.cpp
@@ -201,6 +212,29 @@ target_link_libraries(softbus_daemon
Qt6::Network
)
if(SOFTBUS_DAEMON_HAVE_CAN)
target_sources(softbus_daemon PRIVATE
src/device_bus/manager/CanDeviceManager.cpp
src/device_bus/manager/CanDeviceManager.h
src/devices/physical/CanDevice.cpp
src/devices/physical/CanDevice.h
)
target_link_libraries(softbus_daemon PRIVATE Qt6::SerialBus)
endif()
target_compile_definitions(softbus_daemon PRIVATE SOFTBUS_DAEMON_HAVE_CAN=${SOFTBUS_DAEMON_HAVE_CAN})
qt_add_executable(edge_uplink_wire_test
tests/edge_uplink_wire_test.cpp
src/message_bus/ingress/EdgeUplinkWire.cpp
)
target_include_directories(edge_uplink_wire_test
PRIVATE
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src
)
target_link_libraries(edge_uplink_wire_test PRIVATE Qt6::Core)
# Export daemon symbols so runtime-loaded protocol plugins can resolve
# shared singleton APIs (e.g. DiscoveryPool/MappingRegistry) from host process.
# if(UNIX AND NOT APPLE)