diff --git a/CMakeLists.txt b/CMakeLists.txt index be28d8ae2..539496aa5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,6 +30,7 @@ option(SANITIZE_MEMORY "Activate detection of leaked memory (LeakSanitizer)" OFF option(RX_SAMPLE_24BIT "Internal 24 bit Rx DSP" ON) option(BUILD_SERVER "Build Server" ON) option(BUILD_GUI "Build GUI" ON) +option(BUILD_BENCH "Build benchmark" ON) option(HIDE_CONSOLE "Hide console when running GUI on Windows" ON) option(BUNDLE "Enable distribution bundle" OFF) set(ARCH_OPT "native" CACHE STRING "Specify instruction set to use. Will be passed directly as `-march` or `/arch:` argument on supported compilers. \ @@ -37,8 +38,10 @@ set(ARCH_OPT "native" CACHE STRING "Specify instruction set to use. Will be pass option(ENABLE_QT6 "Build with Qt6 rather than Qt5" OFF) option(ENABLE_PROFILER "Enable runtime profiler" OFF) set(VKFFT_BACKEND 1 CACHE STRING "vkFFT Backend: 0 - Vulkan, 1 - CUDA") +option(BUILD_SHARED_LIBS "Build using shared libraries" ON) # Sampling devices enablers +option(ENABLE_AARONIARTSA "Enable AaroniaRTSA support" ON) option(ENABLE_AIRSPY "Enable AirSpy support" ON) option(ENABLE_AIRSPYHF "Enable AirSpyHF support" ON) option(ENABLE_BLADERF "Enable bladeRF support" ON) @@ -46,6 +49,7 @@ option(ENABLE_FUNCUBE "Enable FUNcube support" ON) option(ENABLE_HACKRF "Enable HackRF support" ON) option(ENABLE_IIO "Enable liniio support like PlutoSDR" ON) option(ENABLE_LIMESUITE "Enable limesuite support" ON) +option(ENABLE_METIS "Enable Metis support" ON) option(ENABLE_MIRISDR "Enable LibMiri for old SDRPlay" ON) option(ENABLE_PERSEUS "Enable perseus support" ON) option(ENABLE_RTLSDR "Enable rtl-sdr support" ON) @@ -182,7 +186,7 @@ if(GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git/") endif() find_program(CCACHE "ccache") -if(CCACHE) +if(CCACHE AND NOT EMSCRIPTEN) message(STATUS "Using ccache ${CCACHE}") set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE}) set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE}) @@ -190,7 +194,7 @@ if(CCACHE) set(CMAKE_OBJCXX_COMPILER_LAUNCHER ${CCACHE}) endif() set(ENV{CCACHE_SLOPPINESS} pch_defines,time_macros) -endif(CCACHE) +endif() set(sdrangel_VERSION "${sdrangel_VERSION_MAJOR}.${sdrangel_VERSION_MINOR}.${sdrangel_VERSION_PATCH}${sdrangel_VERSION_SUFFIX}" CACHE INTERNAL "") message(STATUS "${APPLICATION_NAME} Version: ${sdrangel_VERSION}") @@ -866,7 +870,9 @@ if (FFTW3F_FOUND) set(WDSP_SUPPORT ON CACHE INTERNAL "") endif() +if (BUILD_BENCH) add_subdirectory(sdrbench) +endif() if (BUILD_GUI) add_subdirectory(sdrgui) @@ -937,6 +943,7 @@ else() endif() ############ build sdrangel benchmark ################ +if (BUILD_BENCH) set(sdrangelbench_SOURCES appbench/main.cpp ) @@ -950,6 +957,7 @@ target_link_libraries(sdrangelbench sdrbench logging ) +endif() ############ build sdrangel gui ################ if (BUILD_GUI) @@ -1043,6 +1051,7 @@ if (BUILD_SERVER) endif() ############ install ################## +if (BUILD_BENCH) install(TARGETS sdrangelbench DESTINATION ${INSTALL_BIN_DIR}) if (BUILD_GUI) install(TARGETS ${CMAKE_PROJECT_NAME} DESTINATION ${INSTALL_BIN_DIR}) diff --git a/ft8/CMakeLists.txt b/ft8/CMakeLists.txt index b0060df7f..93d1da73b 100644 --- a/ft8/CMakeLists.txt +++ b/ft8/CMakeLists.txt @@ -39,10 +39,14 @@ include_directories( ${CMAKE_SOURCE_DIR}/sdrbase ) -add_library(ft8 SHARED +add_library(ft8 ${ft8_SOURCES} ) +if(DEFINED FFTW3F_DEPENDS) + add_dependencies(ft8 "${FFTW3F_DEPENDS}") +endif() + target_link_libraries(ft8 Boost::disable_autolinking ${FFTW3F_LIBRARIES} diff --git a/httpserver/CMakeLists.txt b/httpserver/CMakeLists.txt index c796c8cbb..2ee09f385 100644 --- a/httpserver/CMakeLists.txt +++ b/httpserver/CMakeLists.txt @@ -35,7 +35,7 @@ include_directories( ${CMAKE_SOURCE_DIR}/exports ) -add_library(httpserver SHARED +add_library(httpserver ${httpserver_SOURCES} ) diff --git a/logging/CMakeLists.txt b/logging/CMakeLists.txt index b40fe18bc..60ff10132 100644 --- a/logging/CMakeLists.txt +++ b/logging/CMakeLists.txt @@ -21,7 +21,7 @@ include_directories( ${CMAKE_SOURCE_DIR}/exports ) -add_library(logging SHARED +add_library(logging ${logging_SOURCES} ) diff --git a/modemm17/CMakeLists.txt b/modemm17/CMakeLists.txt index 58f12be85..8478d9d59 100644 --- a/modemm17/CMakeLists.txt +++ b/modemm17/CMakeLists.txt @@ -47,7 +47,7 @@ include_directories( ${CMAKE_SOURCE_DIR}/exports ) -add_library(modemm17 SHARED +add_library(modemm17 ${modemm17_SOURCES} ) diff --git a/plugins/channelmimo/beamsteeringcwmod/CMakeLists.txt b/plugins/channelmimo/beamsteeringcwmod/CMakeLists.txt index baa8ba5c6..3d5986960 100644 --- a/plugins/channelmimo/beamsteeringcwmod/CMakeLists.txt +++ b/plugins/channelmimo/beamsteeringcwmod/CMakeLists.txt @@ -45,11 +45,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${beamsteeringcwmod_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${beamsteeringcwmod_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME BeamSteeringCWModPlugin ${beamsteeringcwmod_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelmimo/doa2/CMakeLists.txt b/plugins/channelmimo/doa2/CMakeLists.txt index b7a0939c8..9ace352a5 100644 --- a/plugins/channelmimo/doa2/CMakeLists.txt +++ b/plugins/channelmimo/doa2/CMakeLists.txt @@ -49,11 +49,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${doa2_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${doa2_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME DOA2Plugin ${doa2_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelmimo/interferometer/CMakeLists.txt b/plugins/channelmimo/interferometer/CMakeLists.txt index e0f2f7e42..098eae7eb 100644 --- a/plugins/channelmimo/interferometer/CMakeLists.txt +++ b/plugins/channelmimo/interferometer/CMakeLists.txt @@ -47,11 +47,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${interferometer_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${interferometer_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME InterferometerPlugin ${interferometer_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/chanalyzer/CMakeLists.txt b/plugins/channelrx/chanalyzer/CMakeLists.txt index 62352c1ec..0eefe2753 100644 --- a/plugins/channelrx/chanalyzer/CMakeLists.txt +++ b/plugins/channelrx/chanalyzer/CMakeLists.txt @@ -29,11 +29,17 @@ include_directories( set(TARGET_NAME chanalyzer) set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) -add_library(${TARGET_NAME} SHARED - ${chanalyzer_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${chanalyzer_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME ChannelAnalyzerPlugin ${chanalyzer_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core Qt::Widgets sdrbase diff --git a/plugins/channelrx/channelpower/CMakeLists.txt b/plugins/channelrx/channelpower/CMakeLists.txt index d0e3297f4..29cf0268d 100644 --- a/plugins/channelrx/channelpower/CMakeLists.txt +++ b/plugins/channelrx/channelpower/CMakeLists.txt @@ -44,11 +44,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${channelpower_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${channelpower_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME ChannelPowerPlugin ${channelpower_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/demodais/CMakeLists.txt b/plugins/channelrx/demodais/CMakeLists.txt index 215165724..618c36b74 100644 --- a/plugins/channelrx/demodais/CMakeLists.txt +++ b/plugins/channelrx/demodais/CMakeLists.txt @@ -44,11 +44,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${demodais_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${demodais_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME AISDemodPlugin ${demodais_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/demodam/CMakeLists.txt b/plugins/channelrx/demodam/CMakeLists.txt index c185ce8d9..dbdd254b2 100644 --- a/plugins/channelrx/demodam/CMakeLists.txt +++ b/plugins/channelrx/demodam/CMakeLists.txt @@ -48,11 +48,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${am_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${am_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME AMDemodPlugin ${am_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/demodatv/CMakeLists.txt b/plugins/channelrx/demodatv/CMakeLists.txt index 322a55fd6..35c3bce21 100644 --- a/plugins/channelrx/demodatv/CMakeLists.txt +++ b/plugins/channelrx/demodatv/CMakeLists.txt @@ -29,11 +29,17 @@ include_directories( set(TARGET_NAME demodatv) set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) -add_library(${TARGET_NAME} SHARED - ${atv_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${atv_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME ATVDemodPlugin ${atv_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core Qt::Widgets sdrbase diff --git a/plugins/channelrx/demodbfm/CMakeLists.txt b/plugins/channelrx/demodbfm/CMakeLists.txt index 46af33186..d4f16d9a8 100644 --- a/plugins/channelrx/demodbfm/CMakeLists.txt +++ b/plugins/channelrx/demodbfm/CMakeLists.txt @@ -55,11 +55,18 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${bfm_SOURCES} -) -target_link_libraries(${TARGET_NAME} +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${bfm_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME BFMPlugin ${bfm_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/demodchirpchat/CMakeLists.txt b/plugins/channelrx/demodchirpchat/CMakeLists.txt index aafc386d1..94dce8760 100644 --- a/plugins/channelrx/demodchirpchat/CMakeLists.txt +++ b/plugins/channelrx/demodchirpchat/CMakeLists.txt @@ -59,11 +59,18 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${chirpchat_SOURCES} -) -target_link_libraries(${TARGET_NAME} +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${chirpchat_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME ChirpChatDemodPlugin ${chirpchat_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/demoddab/CMakeLists.txt b/plugins/channelrx/demoddab/CMakeLists.txt index 38311707a..afbdb2bf0 100644 --- a/plugins/channelrx/demoddab/CMakeLists.txt +++ b/plugins/channelrx/demoddab/CMakeLists.txt @@ -49,11 +49,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${demoddab_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${demoddab_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME DABDemodPlugin ${demoddab_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/demoddatv/CMakeLists.txt b/plugins/channelrx/demoddatv/CMakeLists.txt index b8f7fea5b..b35b3a6ef 100644 --- a/plugins/channelrx/demoddatv/CMakeLists.txt +++ b/plugins/channelrx/demoddatv/CMakeLists.txt @@ -71,12 +71,18 @@ include_directories( set(TARGET_NAME demoddatv) set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) -add_library(${TARGET_NAME} SHARED - ${datv_SOURCES} - ${ldpc_SOURCES} -) -target_link_libraries(${TARGET_NAME} +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${datv_SOURCES} ${ldpc_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME DATVDemodPlugin ${datv_SOURCES} ${ldpc_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core Qt::Widgets Qt::Multimedia diff --git a/plugins/channelrx/demoddsc/CMakeLists.txt b/plugins/channelrx/demoddsc/CMakeLists.txt index ed2164296..f7fdda801 100644 --- a/plugins/channelrx/demoddsc/CMakeLists.txt +++ b/plugins/channelrx/demoddsc/CMakeLists.txt @@ -44,11 +44,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${demoddsc_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${demoddsc_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME DSCDemodPlugin ${demoddsc_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/demoddsd/CMakeLists.txt b/plugins/channelrx/demoddsd/CMakeLists.txt index e4205aaec..bf48e1869 100644 --- a/plugins/channelrx/demoddsd/CMakeLists.txt +++ b/plugins/channelrx/demoddsd/CMakeLists.txt @@ -53,15 +53,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${dsddemod_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${dsddemod_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME DSDDemodPlugin ${dsddemod_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() if(LIBDSDCC_EXTERNAL) add_dependencies(${TARGET_NAME} dsdcc mbelib) endif() -target_link_libraries(${TARGET_NAME} +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/demodendoftrain/CMakeLists.txt b/plugins/channelrx/demodendoftrain/CMakeLists.txt index f3d901783..47f613a26 100644 --- a/plugins/channelrx/demodendoftrain/CMakeLists.txt +++ b/plugins/channelrx/demodendoftrain/CMakeLists.txt @@ -46,11 +46,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${demodendoftrain_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${demodendoftrain_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME EndOfTrainDemodPlugin ${demodendoftrain_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/demodfreedv/CMakeLists.txt b/plugins/channelrx/demodfreedv/CMakeLists.txt index 79a70448a..17bd7e149 100644 --- a/plugins/channelrx/demodfreedv/CMakeLists.txt +++ b/plugins/channelrx/demodfreedv/CMakeLists.txt @@ -44,15 +44,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${freedv_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${freedv_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME FreeDVDemodPlugin ${freedv_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() if(CODEC2_EXTERNAL) add_dependencies(${TARGET_NAME} codec2) endif() -target_link_libraries(${TARGET_NAME} +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/demodft8/CMakeLists.txt b/plugins/channelrx/demodft8/CMakeLists.txt index 2774169fa..ec98a4147 100644 --- a/plugins/channelrx/demodft8/CMakeLists.txt +++ b/plugins/channelrx/demodft8/CMakeLists.txt @@ -54,11 +54,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${demodft8_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${demodft8_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME FT8Plugin ${demodft8_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/demodils/CMakeLists.txt b/plugins/channelrx/demodils/CMakeLists.txt index 77b6260aa..9583bfcff 100644 --- a/plugins/channelrx/demodils/CMakeLists.txt +++ b/plugins/channelrx/demodils/CMakeLists.txt @@ -44,11 +44,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${demodils_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${demodils_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME ILSDemodPlugin ${demodils_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/demodm17/CMakeLists.txt b/plugins/channelrx/demodm17/CMakeLists.txt index 27918126f..26e219a4b 100644 --- a/plugins/channelrx/demodm17/CMakeLists.txt +++ b/plugins/channelrx/demodm17/CMakeLists.txt @@ -54,15 +54,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${m17_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${m17_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME M17DemodPlugin ${m17_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() if(CODEC2_EXTERNAL) add_dependencies(${TARGET_NAME} codec2) endif() -target_link_libraries(${TARGET_NAME} +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/demodnavtex/CMakeLists.txt b/plugins/channelrx/demodnavtex/CMakeLists.txt index fbb93f63b..b49da42b5 100644 --- a/plugins/channelrx/demodnavtex/CMakeLists.txt +++ b/plugins/channelrx/demodnavtex/CMakeLists.txt @@ -44,11 +44,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${demodnavtex_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${demodnavtex_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME NavtexDemodPlugin ${demodnavtex_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/demodnfm/CMakeLists.txt b/plugins/channelrx/demodnfm/CMakeLists.txt index 117f7ae61..18863def4 100644 --- a/plugins/channelrx/demodnfm/CMakeLists.txt +++ b/plugins/channelrx/demodnfm/CMakeLists.txt @@ -49,11 +49,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${nfm_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${nfm_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME NFMPlugin ${nfm_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/demodpacket/CMakeLists.txt b/plugins/channelrx/demodpacket/CMakeLists.txt index 1b18efcd1..2c9287415 100644 --- a/plugins/channelrx/demodpacket/CMakeLists.txt +++ b/plugins/channelrx/demodpacket/CMakeLists.txt @@ -44,11 +44,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${demodpacket_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${demodpacket_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME PacketDemodPlugin ${demodpacket_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/demodpager/CMakeLists.txt b/plugins/channelrx/demodpager/CMakeLists.txt index beb2eefdf..883d2b573 100644 --- a/plugins/channelrx/demodpager/CMakeLists.txt +++ b/plugins/channelrx/demodpager/CMakeLists.txt @@ -47,11 +47,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${demodpager_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${demodpager_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME PagerDemodPlugin ${demodpager_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/demodradiosonde/CMakeLists.txt b/plugins/channelrx/demodradiosonde/CMakeLists.txt index 74b63171a..0d11f7688 100644 --- a/plugins/channelrx/demodradiosonde/CMakeLists.txt +++ b/plugins/channelrx/demodradiosonde/CMakeLists.txt @@ -44,11 +44,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${demodradiosonde_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${demodradiosonde_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME RadiosondeDemodPlugin ${demodradiosonde_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/demodrtty/CMakeLists.txt b/plugins/channelrx/demodrtty/CMakeLists.txt index 87d5c3a7f..e9dd45902 100644 --- a/plugins/channelrx/demodrtty/CMakeLists.txt +++ b/plugins/channelrx/demodrtty/CMakeLists.txt @@ -44,11 +44,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${demodrtty_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${demodrtty_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME RttyDemodPlugin ${demodrtty_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/demodssb/CMakeLists.txt b/plugins/channelrx/demodssb/CMakeLists.txt index f617295af..85a981791 100644 --- a/plugins/channelrx/demodssb/CMakeLists.txt +++ b/plugins/channelrx/demodssb/CMakeLists.txt @@ -43,11 +43,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${ssb_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${ssb_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME SSBPlugin ${ssb_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/demodvor/CMakeLists.txt b/plugins/channelrx/demodvor/CMakeLists.txt index da0bd5eb0..17cb712f7 100644 --- a/plugins/channelrx/demodvor/CMakeLists.txt +++ b/plugins/channelrx/demodvor/CMakeLists.txt @@ -46,11 +46,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${vor_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${vor_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME VORDemodPlugin ${vor_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/demodwfm/CMakeLists.txt b/plugins/channelrx/demodwfm/CMakeLists.txt index d3e227c07..c9bbccf8e 100644 --- a/plugins/channelrx/demodwfm/CMakeLists.txt +++ b/plugins/channelrx/demodwfm/CMakeLists.txt @@ -44,11 +44,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${wfm_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${wfm_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME WFMPlugin ${wfm_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/filesink/CMakeLists.txt b/plugins/channelrx/filesink/CMakeLists.txt index c9b375c44..d54cad3a6 100644 --- a/plugins/channelrx/filesink/CMakeLists.txt +++ b/plugins/channelrx/filesink/CMakeLists.txt @@ -46,11 +46,18 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${filesink_SOURCES} -) -target_link_libraries(${TARGET_NAME} +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${filesink_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME FileSinkPlugin ${filesink_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/freqscanner/CMakeLists.txt b/plugins/channelrx/freqscanner/CMakeLists.txt index b02ad52b0..7f1939060 100644 --- a/plugins/channelrx/freqscanner/CMakeLists.txt +++ b/plugins/channelrx/freqscanner/CMakeLists.txt @@ -47,11 +47,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${freqscanner_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${freqscanner_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME FreqScannerPlugin ${freqscanner_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/freqtracker/CMakeLists.txt b/plugins/channelrx/freqtracker/CMakeLists.txt index a6eea37b0..de457f541 100644 --- a/plugins/channelrx/freqtracker/CMakeLists.txt +++ b/plugins/channelrx/freqtracker/CMakeLists.txt @@ -47,11 +47,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${freqtracker_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${freqtracker_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME FreqTrackerPlugin ${freqtracker_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/heatmap/CMakeLists.txt b/plugins/channelrx/heatmap/CMakeLists.txt index 0d86be5bb..3aeaeb6a5 100644 --- a/plugins/channelrx/heatmap/CMakeLists.txt +++ b/plugins/channelrx/heatmap/CMakeLists.txt @@ -44,11 +44,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${heatmap_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${heatmap_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME HeatMapPlugin ${heatmap_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/localsink/CMakeLists.txt b/plugins/channelrx/localsink/CMakeLists.txt index a5bfdd8bb..8017cea0a 100644 --- a/plugins/channelrx/localsink/CMakeLists.txt +++ b/plugins/channelrx/localsink/CMakeLists.txt @@ -46,11 +46,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${localsink_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${localsink_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME LocalSinkPlugin ${localsink_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/noisefigure/CMakeLists.txt b/plugins/channelrx/noisefigure/CMakeLists.txt index 4c6fbcb0c..c4dd6f240 100644 --- a/plugins/channelrx/noisefigure/CMakeLists.txt +++ b/plugins/channelrx/noisefigure/CMakeLists.txt @@ -51,11 +51,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${noisefigure_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${noisefigure_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME NoiseFigurePlugin ${noisefigure_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/radioclock/CMakeLists.txt b/plugins/channelrx/radioclock/CMakeLists.txt index 384151cdd..fea3324ad 100644 --- a/plugins/channelrx/radioclock/CMakeLists.txt +++ b/plugins/channelrx/radioclock/CMakeLists.txt @@ -44,11 +44,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${radioclock_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${radioclock_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME RadioClockPlugin ${radioclock_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/remotesink/CMakeLists.txt b/plugins/channelrx/remotesink/CMakeLists.txt index 33a2f974f..02f8ef6d6 100644 --- a/plugins/channelrx/remotesink/CMakeLists.txt +++ b/plugins/channelrx/remotesink/CMakeLists.txt @@ -50,15 +50,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${remotesink_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${remotesink_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME RemoteSinkPlugin ${remotesink_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() if(CM256CC_EXTERNAL) add_dependencies(${TARGET_NAME} cm256cc) endif() -target_link_libraries(${TARGET_NAME} +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/sigmffilesink/CMakeLists.txt b/plugins/channelrx/sigmffilesink/CMakeLists.txt index fb41a3ffb..0e07d8b06 100644 --- a/plugins/channelrx/sigmffilesink/CMakeLists.txt +++ b/plugins/channelrx/sigmffilesink/CMakeLists.txt @@ -46,11 +46,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${sigmffilesink_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${sigmffilesink_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME SigMFSinkPlugin ${sigmffilesink_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channelrx/udpsink/CMakeLists.txt b/plugins/channelrx/udpsink/CMakeLists.txt index d6bb2c174..4fe6326d5 100644 --- a/plugins/channelrx/udpsink/CMakeLists.txt +++ b/plugins/channelrx/udpsink/CMakeLists.txt @@ -45,11 +45,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${udpsink_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${udpsink_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME UDPSinkPlugin ${udpsink_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} Qt::Network diff --git a/plugins/channelrx/wdsprx/CMakeLists.txt b/plugins/channelrx/wdsprx/CMakeLists.txt index 9af100082..cdd028350 100644 --- a/plugins/channelrx/wdsprx/CMakeLists.txt +++ b/plugins/channelrx/wdsprx/CMakeLists.txt @@ -72,11 +72,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${wdsprx_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${wdsprx_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME WDSPRxPlugin ${wdsprx_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channeltx/filesource/CMakeLists.txt b/plugins/channeltx/filesource/CMakeLists.txt index 20d497ba8..119bc617d 100644 --- a/plugins/channeltx/filesource/CMakeLists.txt +++ b/plugins/channeltx/filesource/CMakeLists.txt @@ -46,11 +46,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${filesource_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${filesource_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME FileSourcePlugin ${filesource_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} Qt::Network diff --git a/plugins/channeltx/localsource/CMakeLists.txt b/plugins/channeltx/localsource/CMakeLists.txt index f75b559ab..aa12ec7ec 100644 --- a/plugins/channeltx/localsource/CMakeLists.txt +++ b/plugins/channeltx/localsource/CMakeLists.txt @@ -48,11 +48,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${localsource_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${localsource_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME LocalSourcePlugin ${localsource_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channeltx/mod802.15.4/CMakeLists.txt b/plugins/channeltx/mod802.15.4/CMakeLists.txt index 574cd4b96..38c3f42dc 100644 --- a/plugins/channeltx/mod802.15.4/CMakeLists.txt +++ b/plugins/channeltx/mod802.15.4/CMakeLists.txt @@ -51,11 +51,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${mod_ieee_802_15_4_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${mod_ieee_802_15_4_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME IEEE_802_15_4_ModPlugin ${mod_ieee_802_15_4_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channeltx/modais/CMakeLists.txt b/plugins/channeltx/modais/CMakeLists.txt index b5f71ee84..fa6b754d1 100644 --- a/plugins/channeltx/modais/CMakeLists.txt +++ b/plugins/channeltx/modais/CMakeLists.txt @@ -49,11 +49,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${modais_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${modais_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME AISModPlugin ${modais_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channeltx/modam/CMakeLists.txt b/plugins/channeltx/modam/CMakeLists.txt index cd7cb0e05..15050a0be 100644 --- a/plugins/channeltx/modam/CMakeLists.txt +++ b/plugins/channeltx/modam/CMakeLists.txt @@ -45,11 +45,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${modam_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${modam_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME AMModPlugin ${modam_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channeltx/modatv/CMakeLists.txt b/plugins/channeltx/modatv/CMakeLists.txt index 08bbb727c..617c8f595 100644 --- a/plugins/channeltx/modatv/CMakeLists.txt +++ b/plugins/channeltx/modatv/CMakeLists.txt @@ -48,11 +48,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${modatv_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${modatv_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME ATVModPlugin ${modatv_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channeltx/modchirpchat/CMakeLists.txt b/plugins/channeltx/modchirpchat/CMakeLists.txt index ee264b45b..a7fefcd5c 100644 --- a/plugins/channeltx/modchirpchat/CMakeLists.txt +++ b/plugins/channeltx/modchirpchat/CMakeLists.txt @@ -60,11 +60,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${modchirpchat_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${modchirpchat_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME ChirpChatModPlugin ${modchirpchat_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channeltx/moddatv/CMakeLists.txt b/plugins/channeltx/moddatv/CMakeLists.txt index cdb955341..6d35e20b1 100644 --- a/plugins/channeltx/moddatv/CMakeLists.txt +++ b/plugins/channeltx/moddatv/CMakeLists.txt @@ -69,11 +69,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${moddatv_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${moddatv_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME DATVModPlugin ${moddatv_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Boost::disable_autolinking Qt::Core ${TARGET_LIB} diff --git a/plugins/channeltx/modfreedv/CMakeLists.txt b/plugins/channeltx/modfreedv/CMakeLists.txt index d231d0505..d4115db96 100644 --- a/plugins/channeltx/modfreedv/CMakeLists.txt +++ b/plugins/channeltx/modfreedv/CMakeLists.txt @@ -44,15 +44,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${modfreedv_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${modfreedv_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME FreeDVModPlugin ${modfreedv_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() if(CODEC2_EXTERNAL) add_dependencies(${TARGET_NAME} codec2) endif() -target_link_libraries(${TARGET_NAME} +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channeltx/modm17/CMakeLists.txt b/plugins/channeltx/modm17/CMakeLists.txt index 090d13c77..116e9ddfa 100644 --- a/plugins/channeltx/modm17/CMakeLists.txt +++ b/plugins/channeltx/modm17/CMakeLists.txt @@ -54,15 +54,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${modm17_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${modm17_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME M17ModPlugin ${modm17_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() if(CODEC2_EXTERNAL) add_dependencies(${TARGET_NAME} codec2) endif() -target_link_libraries(${TARGET_NAME} +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channeltx/modnfm/CMakeLists.txt b/plugins/channeltx/modnfm/CMakeLists.txt index 5bd9d0f1b..91a7b89b8 100644 --- a/plugins/channeltx/modnfm/CMakeLists.txt +++ b/plugins/channeltx/modnfm/CMakeLists.txt @@ -47,11 +47,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${modnfm_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${modnfm_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME NFMModPlugin ${modnfm_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channeltx/modpacket/CMakeLists.txt b/plugins/channeltx/modpacket/CMakeLists.txt index 8acf95911..71ef46bd2 100644 --- a/plugins/channeltx/modpacket/CMakeLists.txt +++ b/plugins/channeltx/modpacket/CMakeLists.txt @@ -52,11 +52,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${modpacket_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${modpacket_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME PacketModPlugin ${modpacket_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channeltx/modpsk31/CMakeLists.txt b/plugins/channeltx/modpsk31/CMakeLists.txt index eb5256800..d1465b285 100644 --- a/plugins/channeltx/modpsk31/CMakeLists.txt +++ b/plugins/channeltx/modpsk31/CMakeLists.txt @@ -49,11 +49,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${modpsk31_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${modpsk31_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME PSK31Plugin ${modpsk31_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channeltx/modrtty/CMakeLists.txt b/plugins/channeltx/modrtty/CMakeLists.txt index 32ee10bd1..e50d29635 100644 --- a/plugins/channeltx/modrtty/CMakeLists.txt +++ b/plugins/channeltx/modrtty/CMakeLists.txt @@ -49,11 +49,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${modrtty_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${modrtty_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME RttyModPlugin ${modrtty_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channeltx/modssb/CMakeLists.txt b/plugins/channeltx/modssb/CMakeLists.txt index 5156b2e36..0bb007a3b 100644 --- a/plugins/channeltx/modssb/CMakeLists.txt +++ b/plugins/channeltx/modssb/CMakeLists.txt @@ -45,11 +45,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${modssb_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${modssb_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME SSBModPlugin ${modssb_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channeltx/modwfm/CMakeLists.txt b/plugins/channeltx/modwfm/CMakeLists.txt index d2cc22fc0..a2ef967e2 100644 --- a/plugins/channeltx/modwfm/CMakeLists.txt +++ b/plugins/channeltx/modwfm/CMakeLists.txt @@ -45,11 +45,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${modwfm_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${modwfm_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME WFMModPlugin ${modwfm_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/channeltx/remotesource/CMakeLists.txt b/plugins/channeltx/remotesource/CMakeLists.txt index 1a5ac0b76..c40099b7b 100644 --- a/plugins/channeltx/remotesource/CMakeLists.txt +++ b/plugins/channeltx/remotesource/CMakeLists.txt @@ -49,15 +49,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${remotesource_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${remotesource_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME RemoteSourcePlugin ${remotesource_SOURCES}) +endif() if(CM256CC_EXTERNAL) add_dependencies(${TARGET_NAME} cm256cc) endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} Qt::Network diff --git a/plugins/channeltx/udpsource/CMakeLists.txt b/plugins/channeltx/udpsource/CMakeLists.txt index deb682aed..d2572dc90 100644 --- a/plugins/channeltx/udpsource/CMakeLists.txt +++ b/plugins/channeltx/udpsource/CMakeLists.txt @@ -49,11 +49,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${udpsource_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${udpsource_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME UDPSourcePlugin ${udpsource_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} Qt::Network diff --git a/plugins/feature/afc/CMakeLists.txt b/plugins/feature/afc/CMakeLists.txt index fd64256c2..e676d277b 100644 --- a/plugins/feature/afc/CMakeLists.txt +++ b/plugins/feature/afc/CMakeLists.txt @@ -44,11 +44,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${afc_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${afc_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME AFCPlugin ${afc_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/feature/ais/CMakeLists.txt b/plugins/feature/ais/CMakeLists.txt index afdec0c05..a7e6b9709 100644 --- a/plugins/feature/ais/CMakeLists.txt +++ b/plugins/feature/ais/CMakeLists.txt @@ -41,11 +41,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${ais_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${ais_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME AISPlugin ${ais_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/feature/ambe/CMakeLists.txt b/plugins/feature/ambe/CMakeLists.txt index 82704fb2c..9d83de4f3 100644 --- a/plugins/feature/ambe/CMakeLists.txt +++ b/plugins/feature/ambe/CMakeLists.txt @@ -45,11 +45,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${ambe_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${ambe_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME AMBEPlugin ${ambe_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/feature/aprs/CMakeLists.txt b/plugins/feature/aprs/CMakeLists.txt index 0f67590dd..8451af586 100644 --- a/plugins/feature/aprs/CMakeLists.txt +++ b/plugins/feature/aprs/CMakeLists.txt @@ -47,11 +47,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${aprs_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${aprs_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME APRSPlugin ${aprs_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/feature/demodanalyzer/CMakeLists.txt b/plugins/feature/demodanalyzer/CMakeLists.txt index c6998f852..7ad5d4376 100644 --- a/plugins/feature/demodanalyzer/CMakeLists.txt +++ b/plugins/feature/demodanalyzer/CMakeLists.txt @@ -42,11 +42,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${demodanalyzer_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${demodanalyzer_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME DemodAnalyzerPlugin ${demodanalyzer_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/feature/gs232controller/CMakeLists.txt b/plugins/feature/gs232controller/CMakeLists.txt index c35195adb..4995ac5e3 100644 --- a/plugins/feature/gs232controller/CMakeLists.txt +++ b/plugins/feature/gs232controller/CMakeLists.txt @@ -74,11 +74,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${gs232controller_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${gs232controller_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME GS232ControllerPlugin ${gs232controller_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core Qt::SerialPort ${TARGET_LIB} diff --git a/plugins/feature/jogdialcontroller/CMakeLists.txt b/plugins/feature/jogdialcontroller/CMakeLists.txt index 685849487..92ebfa9b5 100644 --- a/plugins/feature/jogdialcontroller/CMakeLists.txt +++ b/plugins/feature/jogdialcontroller/CMakeLists.txt @@ -40,11 +40,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${jogdialcontroller_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${jogdialcontroller_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME JogDialControllerPlugin ${jogdialcontroller_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/feature/limerfe/CMakeLists.txt b/plugins/feature/limerfe/CMakeLists.txt index 4cfc776a6..f3d86f4f9 100644 --- a/plugins/feature/limerfe/CMakeLists.txt +++ b/plugins/feature/limerfe/CMakeLists.txt @@ -43,11 +43,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${limerfe_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${limerfe_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME LimeRFEPlugin ${limerfe_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/feature/morsedecoder/CMakeLists.txt b/plugins/feature/morsedecoder/CMakeLists.txt index 4b8e4a94e..9f2211e0c 100644 --- a/plugins/feature/morsedecoder/CMakeLists.txt +++ b/plugins/feature/morsedecoder/CMakeLists.txt @@ -43,11 +43,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${morsedecoder_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${morsedecoder_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME MorseDecoderPlugin ${morsedecoder_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/feature/pertester/CMakeLists.txt b/plugins/feature/pertester/CMakeLists.txt index 33c2b0116..98a7d51ae 100644 --- a/plugins/feature/pertester/CMakeLists.txt +++ b/plugins/feature/pertester/CMakeLists.txt @@ -43,11 +43,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${pertester_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${pertester_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME PERTesterPlugin ${pertester_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/feature/radiosonde/CMakeLists.txt b/plugins/feature/radiosonde/CMakeLists.txt index c8315a826..cd56ee4a6 100644 --- a/plugins/feature/radiosonde/CMakeLists.txt +++ b/plugins/feature/radiosonde/CMakeLists.txt @@ -44,11 +44,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${radiosonde_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${radiosonde_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME RadiosondePlugin ${radiosonde_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/feature/remotecontrol/CMakeLists.txt b/plugins/feature/remotecontrol/CMakeLists.txt index 12f0fb2cf..c11dcfc0e 100644 --- a/plugins/feature/remotecontrol/CMakeLists.txt +++ b/plugins/feature/remotecontrol/CMakeLists.txt @@ -52,11 +52,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${remotecontrol_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${remotecontrol_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME RemoteControlPlugin ${remotecontrol_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/feature/rigctlserver/CMakeLists.txt b/plugins/feature/rigctlserver/CMakeLists.txt index 25737fa14..064b30e70 100644 --- a/plugins/feature/rigctlserver/CMakeLists.txt +++ b/plugins/feature/rigctlserver/CMakeLists.txt @@ -42,11 +42,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${rigctlserver_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${rigctlserver_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME RigCtlServerPlugin ${rigctlserver_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/feature/satellitetracker/CMakeLists.txt b/plugins/feature/satellitetracker/CMakeLists.txt index f6324c8e4..724e97f63 100644 --- a/plugins/feature/satellitetracker/CMakeLists.txt +++ b/plugins/feature/satellitetracker/CMakeLists.txt @@ -49,6 +49,9 @@ if(NOT SERVER_MODE) set(TARGET_NAME featuresatellitetracker) set(TARGET_LIB Qt::Widgets Qt::Positioning Qt::Charts Qt::TextToSpeech) + if(Qt${QT_DEFAULT_MAJOR_VERSION}TextToSpeech_FOUND) + list(APPEND TARGET_LIB Qt::TextToSpeech) + endif() set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -58,15 +61,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${satellitetracker_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${satellitetracker_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME SatelliteTrackerPlugin ${satellitetracker_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() if(SGP4_EXTERNAL) add_dependencies(${TARGET_NAME} sgp4) endif() -target_link_libraries(${TARGET_NAME} +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase @@ -74,9 +83,7 @@ target_link_libraries(${TARGET_NAME} ${SGP4_LIBRARIES} ) if (Qt6_FOUND) - target_link_libraries(${TARGET_NAME} - Qt::Core5Compat - ) + target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core5Compat) endif() install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/feature/simpleptt/CMakeLists.txt b/plugins/feature/simpleptt/CMakeLists.txt index a4caa3c57..d38a1ed2c 100644 --- a/plugins/feature/simpleptt/CMakeLists.txt +++ b/plugins/feature/simpleptt/CMakeLists.txt @@ -51,11 +51,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${simpleptt_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${simpleptt_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME SimplePTTPlugin ${simpleptt_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/feature/skymap/CMakeLists.txt b/plugins/feature/skymap/CMakeLists.txt index 2466ff69a..312a7aefc 100644 --- a/plugins/feature/skymap/CMakeLists.txt +++ b/plugins/feature/skymap/CMakeLists.txt @@ -67,11 +67,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${skymap_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${skymap_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME SkyMapPlugin ${skymap_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/feature/startracker/CMakeLists.txt b/plugins/feature/startracker/CMakeLists.txt index 3d44af827..d017f3887 100644 --- a/plugins/feature/startracker/CMakeLists.txt +++ b/plugins/feature/startracker/CMakeLists.txt @@ -54,11 +54,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${startracker_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${startracker_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME StarTrackerPlugin ${startracker_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplemimo/CMakeLists.txt b/plugins/samplemimo/CMakeLists.txt index c4fb3f6c7..b9cd58c7b 100644 --- a/plugins/samplemimo/CMakeLists.txt +++ b/plugins/samplemimo/CMakeLists.txt @@ -31,6 +31,11 @@ else() message(STATUS "Not building audiocatsiso (hamlib_FOUND=${hamlib_FOUND})") endif() -add_subdirectory(metismiso) +if(ENABLE_METIS) + add_subdirectory(metismiso) +else() + message(STATUS "Not building metis (ENABLE_METIS=${ENABLE_METIS}") +endif() + add_subdirectory(testmi) add_subdirectory(testmosync) diff --git a/plugins/samplemimo/audiocatsiso/CMakeLists.txt b/plugins/samplemimo/audiocatsiso/CMakeLists.txt index c777f93aa..f8909e04a 100644 --- a/plugins/samplemimo/audiocatsiso/CMakeLists.txt +++ b/plugins/samplemimo/audiocatsiso/CMakeLists.txt @@ -52,11 +52,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${audiocatsiso_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${audiocatsiso_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME AudioCATSISOPlugin ${audiocatsiso_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplemimo/bladerf2mimo/CMakeLists.txt b/plugins/samplemimo/bladerf2mimo/CMakeLists.txt index 5e6a086b3..38de25993 100644 --- a/plugins/samplemimo/bladerf2mimo/CMakeLists.txt +++ b/plugins/samplemimo/bladerf2mimo/CMakeLists.txt @@ -45,15 +45,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${bladerf2mimo_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${bladerf2mimo_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME BladeRF2MIMOPlugin ${bladerf2mimo_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() if(LIBBLADERF_EXTERNAL) add_dependencies(${TARGET_NAME} bladerf) endif() -target_link_libraries(${TARGET_NAME} +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplemimo/limesdrmimo/CMakeLists.txt b/plugins/samplemimo/limesdrmimo/CMakeLists.txt index 1d73578cc..95e932eb9 100644 --- a/plugins/samplemimo/limesdrmimo/CMakeLists.txt +++ b/plugins/samplemimo/limesdrmimo/CMakeLists.txt @@ -45,15 +45,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${limesdrmimo_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${limesdrmimo_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME LimeSDRMIMOPlugin ${limesdrmimo_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() if(LIMESUITE_EXTERNAL) add_dependencies(${TARGET_NAME} limesuite) endif() -target_link_libraries(${TARGET_NAME} +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplemimo/metismiso/CMakeLists.txt b/plugins/samplemimo/metismiso/CMakeLists.txt index b84fcc9c9..eea23c1ce 100644 --- a/plugins/samplemimo/metismiso/CMakeLists.txt +++ b/plugins/samplemimo/metismiso/CMakeLists.txt @@ -44,11 +44,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${metismiso_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${metismiso_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME MetisMISOPlugin ${metismiso_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplemimo/plutosdrmimo/CMakeLists.txt b/plugins/samplemimo/plutosdrmimo/CMakeLists.txt index 63e84b199..c6400711c 100644 --- a/plugins/samplemimo/plutosdrmimo/CMakeLists.txt +++ b/plugins/samplemimo/plutosdrmimo/CMakeLists.txt @@ -45,15 +45,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${plutosdrmimo_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${plutosdrmimo_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME PlutoSDRMIMOPlugin ${plutosdrmimo_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() if(LIBIIO_EXTERNAL) add_dependencies(${TARGET_NAME} libiio) endif() -target_link_libraries(${TARGET_NAME} +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplemimo/testmi/CMakeLists.txt b/plugins/samplemimo/testmi/CMakeLists.txt index dddfe84b9..cc44fb41c 100644 --- a/plugins/samplemimo/testmi/CMakeLists.txt +++ b/plugins/samplemimo/testmi/CMakeLists.txt @@ -41,11 +41,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${testmi_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${testmi_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME TestMIPlugin ${testmi_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplemimo/testmosync/CMakeLists.txt b/plugins/samplemimo/testmosync/CMakeLists.txt index 45b9e16ab..5dc9fa6b9 100644 --- a/plugins/samplemimo/testmosync/CMakeLists.txt +++ b/plugins/samplemimo/testmosync/CMakeLists.txt @@ -40,11 +40,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${testmosync_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${testmosync_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME TestMOSyncPlugin ${testmosync_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesink/CMakeLists.txt b/plugins/samplesink/CMakeLists.txt index b895810b7..e70043f14 100644 --- a/plugins/samplesink/CMakeLists.txt +++ b/plugins/samplesink/CMakeLists.txt @@ -4,7 +4,12 @@ add_subdirectory(testsink) add_subdirectory(fileoutput) add_subdirectory(localoutput) add_subdirectory(audiooutput) -add_subdirectory(aaroniartsaoutput) + +if(ENABLE_AARONIARTSA) + add_subdirectory(aaroniartsaoutput) +else() + message(STATUS "Not building aaroniartsaoutput (ENABLE_AARONIARTSA=${ENABLE_AARONIARTSA})") +endif() if (CM256CC_FOUND AND (HAS_SSE3 OR HAS_NEON)) add_subdirectory(remoteoutput) diff --git a/plugins/samplesink/aaroniartsaoutput/CMakeLists.txt b/plugins/samplesink/aaroniartsaoutput/CMakeLists.txt index 23e2f3e66..6c260677c 100644 --- a/plugins/samplesink/aaroniartsaoutput/CMakeLists.txt +++ b/plugins/samplesink/aaroniartsaoutput/CMakeLists.txt @@ -42,11 +42,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${aaroniartsaoutput_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${aaroniartsaoutput_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME AaroniaRTSAOutputPlugin ${aaroniartsaoutput_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesink/audiooutput/CMakeLists.txt b/plugins/samplesink/audiooutput/CMakeLists.txt index a11ca707d..1d848ab8e 100644 --- a/plugins/samplesink/audiooutput/CMakeLists.txt +++ b/plugins/samplesink/audiooutput/CMakeLists.txt @@ -42,11 +42,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${audiooutput_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${audiooutput_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME AudioOutputPlugin ${audiooutput_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +if (EMSCRIPTEN AND BUILD_SHARED_LIBS) + target_link_options(${TARGET_NAME} PUBLIC -sEXPORT_NAME=${TARGET_NAME} -sSIDE_MODULE) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesink/bladerf1output/CMakeLists.txt b/plugins/samplesink/bladerf1output/CMakeLists.txt index 22a71583a..1bd827416 100644 --- a/plugins/samplesink/bladerf1output/CMakeLists.txt +++ b/plugins/samplesink/bladerf1output/CMakeLists.txt @@ -45,15 +45,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${bladerf1output_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${bladerf1output_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME Bladerf1OutputPlugin ${bladerf1output_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() if(LIBBLADERF_EXTERNAL) add_dependencies(${TARGET_NAME} bladerf) endif() -target_link_libraries(${TARGET_NAME} +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesink/bladerf2output/CMakeLists.txt b/plugins/samplesink/bladerf2output/CMakeLists.txt index 39fc937eb..ab1583395 100644 --- a/plugins/samplesink/bladerf2output/CMakeLists.txt +++ b/plugins/samplesink/bladerf2output/CMakeLists.txt @@ -45,15 +45,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${bladerf2output_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${bladerf2output_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME BladeRF2OutputPlugin ${bladerf2output_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() if(LIBBLADERF_EXTERNAL) add_dependencies(${TARGET_NAME} bladerf) endif() -target_link_libraries(${TARGET_NAME} +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesink/fileoutput/CMakeLists.txt b/plugins/samplesink/fileoutput/CMakeLists.txt index 030d2b2f0..35d960793 100644 --- a/plugins/samplesink/fileoutput/CMakeLists.txt +++ b/plugins/samplesink/fileoutput/CMakeLists.txt @@ -42,11 +42,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${fileoutput_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${fileoutput_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME FileOutputPlugin ${fileoutput_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesink/hackrfoutput/CMakeLists.txt b/plugins/samplesink/hackrfoutput/CMakeLists.txt index 000be2a97..d9db22ca2 100644 --- a/plugins/samplesink/hackrfoutput/CMakeLists.txt +++ b/plugins/samplesink/hackrfoutput/CMakeLists.txt @@ -45,11 +45,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${hackrfoutput_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${hackrfoutput_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME HackRFOutputPlugin ${hackrfoutput_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesink/limesdroutput/CMakeLists.txt b/plugins/samplesink/limesdroutput/CMakeLists.txt index 321b704ea..9b82a65ee 100644 --- a/plugins/samplesink/limesdroutput/CMakeLists.txt +++ b/plugins/samplesink/limesdroutput/CMakeLists.txt @@ -45,15 +45,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${limesdroutput_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${limesdroutput_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME LimeSDROutputPlugin ${limesdroutput_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() if(LIMESUITE_EXTERNAL) add_dependencies(${TARGET_NAME} limesuite) endif() -target_link_libraries(${TARGET_NAME} +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesink/localoutput/CMakeLists.txt b/plugins/samplesink/localoutput/CMakeLists.txt index 3d16f2f3d..cbca9c96e 100644 --- a/plugins/samplesink/localoutput/CMakeLists.txt +++ b/plugins/samplesink/localoutput/CMakeLists.txt @@ -41,11 +41,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${localoutput_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${localoutput_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME LocalOutputPlugin ${localoutput_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesink/plutosdroutput/CMakeLists.txt b/plugins/samplesink/plutosdroutput/CMakeLists.txt index 4e0e26389..ded465ea4 100644 --- a/plugins/samplesink/plutosdroutput/CMakeLists.txt +++ b/plugins/samplesink/plutosdroutput/CMakeLists.txt @@ -45,15 +45,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${plutosdroutput_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${plutosdroutput_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME PlutoSDROutputPlugin ${plutosdroutput_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() if(LIBIIO_EXTERNAL) add_dependencies(${TARGET_NAME} libiio) endif() -target_link_libraries(${TARGET_NAME} +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesink/remoteoutput/CMakeLists.txt b/plugins/samplesink/remoteoutput/CMakeLists.txt index 778a1b5f0..cd575b912 100644 --- a/plugins/samplesink/remoteoutput/CMakeLists.txt +++ b/plugins/samplesink/remoteoutput/CMakeLists.txt @@ -50,15 +50,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${remoteoutput_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${remoteoutput_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME RemoteOutputPlugin ${remoteoutput_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() if(CM256CC_EXTERNAL) add_dependencies(${TARGET_NAME} cm256cc) endif() -target_link_libraries(${TARGET_NAME} +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesink/soapysdroutput/CMakeLists.txt b/plugins/samplesink/soapysdroutput/CMakeLists.txt index 030adfee4..7436516b1 100644 --- a/plugins/samplesink/soapysdroutput/CMakeLists.txt +++ b/plugins/samplesink/soapysdroutput/CMakeLists.txt @@ -45,11 +45,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${soapysdroutput_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${soapysdroutput_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME SoapySDROutputPlugin ${soapysdroutput_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesink/testsink/CMakeLists.txt b/plugins/samplesink/testsink/CMakeLists.txt index d2637127c..59e43034e 100644 --- a/plugins/samplesink/testsink/CMakeLists.txt +++ b/plugins/samplesink/testsink/CMakeLists.txt @@ -40,11 +40,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${testsink_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${testsink_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME TestSinkPlugin ${testsink_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesink/usrpoutput/CMakeLists.txt b/plugins/samplesink/usrpoutput/CMakeLists.txt index d679c5c06..c6909baf8 100644 --- a/plugins/samplesink/usrpoutput/CMakeLists.txt +++ b/plugins/samplesink/usrpoutput/CMakeLists.txt @@ -45,15 +45,20 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${usrpoutput_SOURCES} -) - if(UHD_EXTERNAL) add_dependencies(${TARGET_NAME} uhd) endif() +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${usrpoutput_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME USRPOutputPlugin ${usrpoutput_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesink/xtrxoutput/CMakeLists.txt b/plugins/samplesink/xtrxoutput/CMakeLists.txt index f25f7bfb8..c797abf65 100644 --- a/plugins/samplesink/xtrxoutput/CMakeLists.txt +++ b/plugins/samplesink/xtrxoutput/CMakeLists.txt @@ -44,11 +44,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${xtrxoutput_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${xtrxoutput_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME XTRXOutputPlugin ${xtrxoutput_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesource/CMakeLists.txt b/plugins/samplesource/CMakeLists.txt index f25e1ebdc..7f22bfca8 100644 --- a/plugins/samplesource/CMakeLists.txt +++ b/plugins/samplesource/CMakeLists.txt @@ -105,7 +105,13 @@ endif() add_subdirectory(audioinput) add_subdirectory(kiwisdr) add_subdirectory(remotetcpinput) -add_subdirectory(aaroniartsainput) + +if(ENABLE_AARONIARTSA) + add_subdirectory(aaroniartsainput) +else() + message(STATUS "Not building aaroniartsainput (ENABLE_AARONIARTSA=${ENABLE_AARONIARTSA})") +endif() + if(ANDROID) add_subdirectory(androidsdrdriverinput) endif() diff --git a/plugins/samplesource/aaroniartsainput/CMakeLists.txt b/plugins/samplesource/aaroniartsainput/CMakeLists.txt index 8336c83fa..15c10340b 100644 --- a/plugins/samplesource/aaroniartsainput/CMakeLists.txt +++ b/plugins/samplesource/aaroniartsainput/CMakeLists.txt @@ -43,11 +43,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${aaroniartsainput_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${aaroniartsainput_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME AaroniaRTSAInputPlugin ${aaroniartsainput_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core Qt::WebSockets ${TARGET_LIB} diff --git a/plugins/samplesource/airspy/CMakeLists.txt b/plugins/samplesource/airspy/CMakeLists.txt index d72931690..90c6b2ae7 100644 --- a/plugins/samplesource/airspy/CMakeLists.txt +++ b/plugins/samplesource/airspy/CMakeLists.txt @@ -43,15 +43,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${airspy_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${airspy_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME AirspyPlugin ${airspy_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() if(LIBAIRSPY_EXTERNAL AND NOT LINUX) add_dependencies(${TARGET_NAME} airspy) endif() -target_link_libraries(${TARGET_NAME} +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesource/airspyhf/CMakeLists.txt b/plugins/samplesource/airspyhf/CMakeLists.txt index b90183c33..501625abf 100644 --- a/plugins/samplesource/airspyhf/CMakeLists.txt +++ b/plugins/samplesource/airspyhf/CMakeLists.txt @@ -44,15 +44,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${airspyhf_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${airspyhf_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME AirspyHFPlugin ${airspyhf_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() if(LIBAIRSPYHF_EXTERNAL) add_dependencies(${TARGET_NAME} airspyhf) endif() -target_link_libraries(${TARGET_NAME} +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesource/androidsdrdriverinput/CMakeLists.txt b/plugins/samplesource/androidsdrdriverinput/CMakeLists.txt index 9fa4683d1..18a7971b3 100644 --- a/plugins/samplesource/androidsdrdriverinput/CMakeLists.txt +++ b/plugins/samplesource/androidsdrdriverinput/CMakeLists.txt @@ -42,11 +42,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${androidsdrdriverinput_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${androidsdrdriverinput_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME AndroidSDRDriverInputPlugin ${androidsdrdriverinput_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesource/audioinput/CMakeLists.txt b/plugins/samplesource/audioinput/CMakeLists.txt index d1c754f1b..111af2702 100644 --- a/plugins/samplesource/audioinput/CMakeLists.txt +++ b/plugins/samplesource/audioinput/CMakeLists.txt @@ -42,11 +42,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${audioinput_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${audioinput_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME AudioInputPlugin ${audioinput_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +if (EMSCRIPTEN AND BUILD_SHARED_LIBS) + target_link_options(${TARGET_NAME} PUBLIC -sEXPORT_NAME=${TARGET_NAME} -sSIDE_MODULE) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesource/bladerf1input/CMakeLists.txt b/plugins/samplesource/bladerf1input/CMakeLists.txt index 0c41e1944..4d3b34e5b 100644 --- a/plugins/samplesource/bladerf1input/CMakeLists.txt +++ b/plugins/samplesource/bladerf1input/CMakeLists.txt @@ -44,15 +44,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${bladerf1input_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${bladerf1input_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME Blderf1InputPlugin ${bladerf1input_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() if(LIBBLADERF_EXTERNAL) add_dependencies(${TARGET_NAME} bladerf) endif() -target_link_libraries(${TARGET_NAME} +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesource/bladerf2input/CMakeLists.txt b/plugins/samplesource/bladerf2input/CMakeLists.txt index 4827ac76b..bfe19ec3d 100644 --- a/plugins/samplesource/bladerf2input/CMakeLists.txt +++ b/plugins/samplesource/bladerf2input/CMakeLists.txt @@ -45,15 +45,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${bladerf2input_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${bladerf2input_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME Blderf2InputPlugin ${bladerf2input_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() if(LIBBLADERF_EXTERNAL) add_dependencies(${TARGET_NAME} bladerf) endif() -target_link_libraries(${TARGET_NAME} +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesource/fcdpro/CMakeLists.txt b/plugins/samplesource/fcdpro/CMakeLists.txt index 4b65abe0d..9b0ce3833 100644 --- a/plugins/samplesource/fcdpro/CMakeLists.txt +++ b/plugins/samplesource/fcdpro/CMakeLists.txt @@ -45,11 +45,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${fcdpro_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${fcdpro_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME FCDProPlugin ${fcdpro_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE ${HIDAPI_LIBRARIES} Qt::Core ${TARGET_LIB} diff --git a/plugins/samplesource/fcdproplus/CMakeLists.txt b/plugins/samplesource/fcdproplus/CMakeLists.txt index 83bd24f8a..7d3be6611 100644 --- a/plugins/samplesource/fcdproplus/CMakeLists.txt +++ b/plugins/samplesource/fcdproplus/CMakeLists.txt @@ -45,11 +45,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${fcdproplus_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${fcdproplus_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME FCDProPlusPlugin ${fcdproplus_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE ${HIDAPI_LIBRARIES} Qt::Core ${TARGET_LIB} diff --git a/plugins/samplesource/fileinput/CMakeLists.txt b/plugins/samplesource/fileinput/CMakeLists.txt index 5042b499a..5af34a45b 100644 --- a/plugins/samplesource/fileinput/CMakeLists.txt +++ b/plugins/samplesource/fileinput/CMakeLists.txt @@ -41,11 +41,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${fileinput_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${fileinput_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME FileInputPlugin ${fileinput_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +if (EMSCRIPTEN AND BUILD_SHARED_LIBS) + target_link_options(${TARGET_NAME} PUBLIC -sEXPORT_NAME=${TARGET_NAME} -sSIDE_MODULE) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesource/hackrfinput/CMakeLists.txt b/plugins/samplesource/hackrfinput/CMakeLists.txt index e17a3710d..230bee68c 100644 --- a/plugins/samplesource/hackrfinput/CMakeLists.txt +++ b/plugins/samplesource/hackrfinput/CMakeLists.txt @@ -45,11 +45,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${hackrfinput_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${hackrfinput_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME HackRFInputPlugin ${hackrfinput_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesource/kiwisdr/CMakeLists.txt b/plugins/samplesource/kiwisdr/CMakeLists.txt index f6714b79e..548ad199e 100644 --- a/plugins/samplesource/kiwisdr/CMakeLists.txt +++ b/plugins/samplesource/kiwisdr/CMakeLists.txt @@ -43,11 +43,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${kiwisdr_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${kiwisdr_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME KiwiSDRPlugin ${kiwisdr_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +if (EMSCRIPTEN AND BUILD_SHARED_LIBS) + target_link_options(${TARGET_NAME} PUBLIC -sEXPORT_NAME=${TARGET_NAME} -sSIDE_MODULE) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core Qt::WebSockets ${TARGET_LIB} diff --git a/plugins/samplesource/limesdrinput/CMakeLists.txt b/plugins/samplesource/limesdrinput/CMakeLists.txt index fcc50b4af..559954793 100644 --- a/plugins/samplesource/limesdrinput/CMakeLists.txt +++ b/plugins/samplesource/limesdrinput/CMakeLists.txt @@ -45,15 +45,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${limesdrinput_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${limesdrinput_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME LimeSDRInputPlugin ${limesdrinput_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() if(LIMESUITE_EXTERNAL) add_dependencies(${TARGET_NAME} limesuite) endif() -target_link_libraries(${TARGET_NAME} +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesource/localinput/CMakeLists.txt b/plugins/samplesource/localinput/CMakeLists.txt index a7bd05457..134c86219 100644 --- a/plugins/samplesource/localinput/CMakeLists.txt +++ b/plugins/samplesource/localinput/CMakeLists.txt @@ -42,11 +42,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${localinput_SOURCES} - ) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${localinput_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME LocalInputPlugin ${localinput_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +if (EMSCRIPTEN AND BUILD_SHARED_LIBS) + target_link_options(${TARGET_NAME} PUBLIC -sEXPORT_NAME=${TARGET_NAME} -sSIDE_MODULE) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesource/perseus/CMakeLists.txt b/plugins/samplesource/perseus/CMakeLists.txt index d20662f0a..694c12015 100644 --- a/plugins/samplesource/perseus/CMakeLists.txt +++ b/plugins/samplesource/perseus/CMakeLists.txt @@ -46,15 +46,20 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${perseus_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${perseus_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME PerseusPlugin ${perseus_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() if(LIBPERSEUS_EXTERNAL) add_dependencies(${TARGET_NAME} perseus) endif() - -target_link_libraries(${TARGET_NAME} +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesource/plutosdrinput/CMakeLists.txt b/plugins/samplesource/plutosdrinput/CMakeLists.txt index 98ed3045b..72dcbb612 100644 --- a/plugins/samplesource/plutosdrinput/CMakeLists.txt +++ b/plugins/samplesource/plutosdrinput/CMakeLists.txt @@ -45,15 +45,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${plutosdrinput_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${plutosdrinput_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME PlutoSDRInputPlugin ${plutosdrinput_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() if(LIBIIO_EXTERNAL) add_dependencies(${TARGET_NAME} libiio) endif() -target_link_libraries(${TARGET_NAME} +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesource/remoteinput/CMakeLists.txt b/plugins/samplesource/remoteinput/CMakeLists.txt index b6f50261c..2265fd7ff 100644 --- a/plugins/samplesource/remoteinput/CMakeLists.txt +++ b/plugins/samplesource/remoteinput/CMakeLists.txt @@ -46,15 +46,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${remoteinput_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${remoteinput_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME RemoteInputPlugin ${remoteinput_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() if(CM256CC_EXTERNAL) add_dependencies(${TARGET_NAME} cm256cc) endif() -target_link_libraries(${TARGET_NAME} +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesource/remotetcpinput/CMakeLists.txt b/plugins/samplesource/remotetcpinput/CMakeLists.txt index 9603cb95a..bebe34454 100644 --- a/plugins/samplesource/remotetcpinput/CMakeLists.txt +++ b/plugins/samplesource/remotetcpinput/CMakeLists.txt @@ -19,6 +19,8 @@ set(remotetcpinput_HEADERS include_directories( ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client + ${FLAC_INCLUDE_DIR} + ${ZLIB_INCLUDE_DIRS} ) if(NOT SERVER_MODE) @@ -43,16 +45,24 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${remotetcpinput_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${remotetcpinput_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME RemoteTCPInputPlugin ${remotetcpinput_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} swagger + ${FLAC_LIBRARIES} + ${ZLIB_LIBRARIES} ) install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/samplesource/rtlsdr/CMakeLists.txt b/plugins/samplesource/rtlsdr/CMakeLists.txt index b2949ffb1..fba09d830 100644 --- a/plugins/samplesource/rtlsdr/CMakeLists.txt +++ b/plugins/samplesource/rtlsdr/CMakeLists.txt @@ -43,11 +43,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${rtlsdr_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${rtlsdr_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME RTLSDRPlugin ${rtlsdr_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +if(LIBUSB_DEPENDS) + add_dependencies(${TARGET_NAME} ${LIBUSB_DEPENDS}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesource/sdrplay/CMakeLists.txt b/plugins/samplesource/sdrplay/CMakeLists.txt index 203d42d71..a7abcf828 100644 --- a/plugins/samplesource/sdrplay/CMakeLists.txt +++ b/plugins/samplesource/sdrplay/CMakeLists.txt @@ -44,15 +44,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${sdrplay_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${sdrplay_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME SDRPlayPlugin ${sdrplay_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() if(LIBMIRISDR_EXTERNAL) add_dependencies(${TARGET_NAME} libmirisdr) endif(LIBMIRISDR_EXTERNAL) -target_link_libraries(${TARGET_NAME} +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesource/sdrplayv3/CMakeLists.txt b/plugins/samplesource/sdrplayv3/CMakeLists.txt index 420f368a3..36f749bff 100644 --- a/plugins/samplesource/sdrplayv3/CMakeLists.txt +++ b/plugins/samplesource/sdrplayv3/CMakeLists.txt @@ -43,11 +43,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${sdrplayv3_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${sdrplayv3_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME SDRPlayV3Plugin ${sdrplayv3_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesource/sigmffileinput/CMakeLists.txt b/plugins/samplesource/sigmffileinput/CMakeLists.txt index 737bd858d..3638734e4 100644 --- a/plugins/samplesource/sigmffileinput/CMakeLists.txt +++ b/plugins/samplesource/sigmffileinput/CMakeLists.txt @@ -46,15 +46,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${sigmffileinput_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${sigmffileinput_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME SigMFFileInputPlugin ${sigmffileinput_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() if (NOT WIN32) link_directories(${Boost_LIBRARY_DIRS}) endif() -target_link_libraries(${TARGET_NAME} +target_link_libraries(${TARGET_NAME} PRIVATE Boost::disable_autolinking Qt::Core ${TARGET_LIB} diff --git a/plugins/samplesource/soapysdrinput/CMakeLists.txt b/plugins/samplesource/soapysdrinput/CMakeLists.txt index adbe5262d..39f540194 100644 --- a/plugins/samplesource/soapysdrinput/CMakeLists.txt +++ b/plugins/samplesource/soapysdrinput/CMakeLists.txt @@ -45,11 +45,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${soapysdrinput_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${soapysdrinput_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME SoapySDRInputPlugin ${soapysdrinput_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesource/testsource/CMakeLists.txt b/plugins/samplesource/testsource/CMakeLists.txt index a82fb4562..0965bcaeb 100644 --- a/plugins/samplesource/testsource/CMakeLists.txt +++ b/plugins/samplesource/testsource/CMakeLists.txt @@ -43,11 +43,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${testsource_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${testsource_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME TestSourcePlugin ${testsource_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesource/usrpinput/CMakeLists.txt b/plugins/samplesource/usrpinput/CMakeLists.txt index 4a5868b41..d17d46d7e 100644 --- a/plugins/samplesource/usrpinput/CMakeLists.txt +++ b/plugins/samplesource/usrpinput/CMakeLists.txt @@ -45,15 +45,21 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${usrpinput_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${usrpinput_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME USRPInputPlugin ${usrpinput_SOURCES}) +endif() + +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() if(UHD_EXTERNAL) add_dependencies(${TARGET_NAME} uhd) endif() -target_link_libraries(${TARGET_NAME} +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/plugins/samplesource/xtrxinput/CMakeLists.txt b/plugins/samplesource/xtrxinput/CMakeLists.txt index 93019d83b..a43c4efc8 100644 --- a/plugins/samplesource/xtrxinput/CMakeLists.txt +++ b/plugins/samplesource/xtrxinput/CMakeLists.txt @@ -45,11 +45,17 @@ else() set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() -add_library(${TARGET_NAME} SHARED - ${xtrxinput_SOURCES} -) +if(NOT Qt6_FOUND) + add_library(${TARGET_NAME} ${xtrxinput_SOURCES}) +else() + qt_add_plugin(${TARGET_NAME} CLASS_NAME XTRXInputPlugin ${xtrxinput_SOURCES}) +endif() -target_link_libraries(${TARGET_NAME} +if(NOT BUILD_SHARED_LIBS) + set_property(GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${TARGET_NAME}) +endif() + +target_link_libraries(${TARGET_NAME} PRIVATE Qt::Core ${TARGET_LIB} sdrbase diff --git a/qrtplib/CMakeLists.txt b/qrtplib/CMakeLists.txt index 97d44826a..71c0d3cad 100644 --- a/qrtplib/CMakeLists.txt +++ b/qrtplib/CMakeLists.txt @@ -76,7 +76,7 @@ include_directories( ${CMAKE_SOURCE_DIR}/exports ) -add_library(qrtplib SHARED +add_library(qrtplib ${qrtplib_SOURCES} ) diff --git a/sdrbase/CMakeLists.txt b/sdrbase/CMakeLists.txt index 049b827be..c419e04b2 100644 --- a/sdrbase/CMakeLists.txt +++ b/sdrbase/CMakeLists.txt @@ -572,7 +572,7 @@ include_directories( ${Qt${QT_DEFAULT_MAJOR_VERSION}Gui_PRIVATE_INCLUDE_DIRS} ) -add_library(sdrbase SHARED +add_library(sdrbase ${sdrbase_SOURCES} ) diff --git a/sdrbench/CMakeLists.txt b/sdrbench/CMakeLists.txt index 6aefbe4b8..9eee7766c 100644 --- a/sdrbench/CMakeLists.txt +++ b/sdrbench/CMakeLists.txt @@ -31,8 +31,12 @@ include_directories( ${CMAKE_SOURCE_DIR} ) +if(DEFINED FFTW3F_DEPENDS) + add_dependencies(sdrbench "${FFTW3F_DEPENDS}") +endif() + target_link_libraries(sdrbench - Boost::disable_autolinking + Boost::disable_autolinking ${FFTW3F_LIBRARIES} Qt::Core Qt::Gui diff --git a/sdrgui/CMakeLists.txt b/sdrgui/CMakeLists.txt index ac0ca1514..c91149014 100644 --- a/sdrgui/CMakeLists.txt +++ b/sdrgui/CMakeLists.txt @@ -320,7 +320,7 @@ if(NOT ANDROID) include_directories(${OPENGL_INCLUDE_DIR}) endif() -add_library(sdrgui SHARED +add_library(sdrgui ${sdrgui_SOURCES} ${sdrgui_FORMS_HEADERS} ) diff --git a/swagger/CMakeLists.txt b/swagger/CMakeLists.txt index ef643ed01..3df2b8bbe 100644 --- a/swagger/CMakeLists.txt +++ b/swagger/CMakeLists.txt @@ -8,7 +8,7 @@ file(GLOB swagger_HEADERS ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client/*.h ) -add_library(swagger SHARED +add_library(swagger ${swagger_SOURCES} ) diff --git a/wdsp/CMakeLists.txt b/wdsp/CMakeLists.txt index 3a277b7fc..30ba11af0 100644 --- a/wdsp/CMakeLists.txt +++ b/wdsp/CMakeLists.txt @@ -143,7 +143,7 @@ include_directories( ${FFTW3F_INCLUDE_DIRS} ) -add_library(wdsp SHARED +add_library(wdsp ${wdsp_SOURCES} )