first commit
This commit is contained in:
@@ -20,8 +20,8 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
|
||||
set(EDGE_AGENT_SOURCES
|
||||
src/main.cpp
|
||||
src/fake_driver.cpp
|
||||
src/fake_driver.hpp
|
||||
src/pipeline/EdgeStreamPipeline.cpp
|
||||
src/pipeline/EdgeStreamPipeline.h
|
||||
src/device_bus/monitor/DeviceEvent.h
|
||||
src/device_bus/monitor/IDeviceMonitor.h
|
||||
src/device_bus/monitor/UdevDeviceMonitor.cpp
|
||||
@@ -62,18 +62,42 @@ endif()
|
||||
|
||||
qt_add_executable(softbus_edge_agent ${EDGE_AGENT_SOURCES})
|
||||
|
||||
set(SOFTBUS_DAEMON_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/../softbus_daemon")
|
||||
target_sources(softbus_edge_agent PRIVATE
|
||||
${SOFTBUS_DAEMON_ROOT}/src/core/plugin_system/PluginHost.cpp
|
||||
${SOFTBUS_DAEMON_ROOT}/src/core/plugin_system/PluginManager.cpp
|
||||
${SOFTBUS_DAEMON_ROOT}/src/message_bus/pipeline/stages/1_framers/PassthroughFramer.cpp
|
||||
)
|
||||
|
||||
target_include_directories(softbus_edge_agent
|
||||
PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${SOFTBUS_DAEMON_ROOT}/src
|
||||
${SOFTBUS_DAEMON_ROOT}
|
||||
)
|
||||
|
||||
target_link_libraries(softbus_edge_agent PRIVATE Qt6::Core Qt6::Network Qt6::SerialPort)
|
||||
if(UNIX AND NOT APPLE)
|
||||
target_link_libraries(softbus_edge_agent PRIVATE dl)
|
||||
endif()
|
||||
if(SOFTBUS_HAVE_CAN)
|
||||
target_link_libraries(softbus_edge_agent PRIVATE Qt6::SerialBus)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(softbus_edge_agent PRIVATE SOFTBUS_HAVE_CAN=${SOFTBUS_HAVE_CAN})
|
||||
|
||||
# 与 daemon 侧 ASan 编译的协议 .so 对齐:Debug/RelWithDebInfo 下主程序也链 ASan,否则 dlopen 会报
|
||||
# "ASan runtime does not come first" 并退出。Release 不受影响。可用 -DSOFTBUS_EDGE_AGENT_DEBUG_ASAN=OFF 关闭。
|
||||
option(SOFTBUS_EDGE_AGENT_DEBUG_ASAN "Link AddressSanitizer in Debug/RelWithDebInfo (non-Apple Unix)" ON)
|
||||
if(SOFTBUS_EDGE_AGENT_DEBUG_ASAN AND UNIX AND NOT APPLE)
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
||||
target_compile_options(softbus_edge_agent PRIVATE
|
||||
$<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:-fsanitize=address>)
|
||||
target_link_options(softbus_edge_agent PRIVATE
|
||||
$<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:-fsanitize=address>)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
find_package(PkgConfig QUIET)
|
||||
if(PkgConfig_FOUND)
|
||||
|
||||
Reference in New Issue
Block a user