25 lines
747 B
CMake
25 lines
747 B
CMake
|
|
# dlink — 数据链通讯层(共享库 / DLL)
|
||
|
|
add_library(Dlink SHARED
|
||
|
|
src/dlink.cpp
|
||
|
|
SerialPortDetector.cpp
|
||
|
|
inc/dlink.h
|
||
|
|
)
|
||
|
|
|
||
|
|
target_include_directories(Dlink PUBLIC
|
||
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||
|
|
${CMAKE_CURRENT_SOURCE_DIR}/inc
|
||
|
|
${CMAKE_SOURCE_DIR}/Plugins
|
||
|
|
${CMAKE_SOURCE_DIR}/Plugins/MavLinkNode
|
||
|
|
${CMAKE_SOURCE_DIR}/Plugins/MavLinkNode/inc
|
||
|
|
)
|
||
|
|
|
||
|
|
target_link_libraries(Dlink PUBLIC
|
||
|
|
Qt${QT_VERSION_MAJOR}::Core
|
||
|
|
Qt${QT_VERSION_MAJOR}::SerialPort
|
||
|
|
Qt${QT_VERSION_MAJOR}::Network
|
||
|
|
MavLinkNode
|
||
|
|
mavlink_headers
|
||
|
|
)
|
||
|
|
target_compile_definitions(Dlink PRIVATE QtDlink DLINK_LIBRARY)
|
||
|
|
set_target_properties(Dlink PROPERTIES PREFIX "" SUFFIX ".dll" RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/plugins/Dlink")
|