27 lines
904 B
CMake
27 lines
904 B
CMake
|
|
# Transport / DLL
|
||
|
|
add_library(TransportPlugin SHARED
|
||
|
|
TransportPlugin.h
|
||
|
|
TransportPlugin.cpp
|
||
|
|
)
|
||
|
|
|
||
|
|
target_include_directories(TransportPlugin PRIVATE
|
||
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||
|
|
${CMAKE_SOURCE_DIR}/Plugins
|
||
|
|
${CMAKE_SOURCE_DIR}/PluginSDK
|
||
|
|
)
|
||
|
|
|
||
|
|
target_link_libraries(TransportPlugin PUBLIC
|
||
|
|
PluginSDK
|
||
|
|
Qt${QT_VERSION_MAJOR}::Core
|
||
|
|
Qt${QT_VERSION_MAJOR}::Widgets
|
||
|
|
Qt${QT_VERSION_MAJOR}::SerialPort
|
||
|
|
Qt${QT_VERSION_MAJOR}::Network
|
||
|
|
)
|
||
|
|
set_target_properties(TransportPlugin PROPERTIES PREFIX "" SUFFIX ".dll" RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/plugins/Transport")
|
||
|
|
|
||
|
|
add_custom_command(TARGET TransportPlugin POST_BUILD
|
||
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/plugin.json"
|
||
|
|
"${CMAKE_BINARY_DIR}/bin/plugins/Transport/plugin.json"
|
||
|
|
)
|