diff --git a/plugins/channelrx/demoddsd/dsddemodplugin.cpp b/plugins/channelrx/demoddsd/dsddemodplugin.cpp index 577846410..afeed48da 100644 --- a/plugins/channelrx/demoddsd/dsddemodplugin.cpp +++ b/plugins/channelrx/demoddsd/dsddemodplugin.cpp @@ -20,7 +20,9 @@ #include #include #include "plugin/pluginapi.h" +#ifndef SERVER_MODE #include "dsddemodgui.h" +#endif #include "dsddemod.h" const PluginDescriptor DSDDemodPlugin::m_pluginDescriptor = { @@ -51,10 +53,19 @@ void DSDDemodPlugin::initPlugin(PluginAPI* pluginAPI) m_pluginAPI->registerRxChannel(DSDDemod::m_channelIdURI, DSDDemod::m_channelId, this); } +#ifdef SERVER_MODE +PluginInstanceGUI* DSDDemodPlugin::createRxChannelGUI( + DeviceUISet *deviceUISet __attribute__((unused)), + BasebandSampleSink *rxChannel __attribute__((unused))) +{ + return 0; +} +#else PluginInstanceGUI* DSDDemodPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) { return DSDDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel); } +#endif BasebandSampleSink* DSDDemodPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI) { diff --git a/pluginssrv/channelrx/CMakeLists.txt b/pluginssrv/channelrx/CMakeLists.txt index 25438c882..38a342c1f 100644 --- a/pluginssrv/channelrx/CMakeLists.txt +++ b/pluginssrv/channelrx/CMakeLists.txt @@ -2,4 +2,5 @@ project(demod) add_subdirectory(demodam) add_subdirectory(demodbfm) +add_subdirectory(demoddsd) add_subdirectory(demodnfm) diff --git a/pluginssrv/channelrx/demoddsd/CMakeLists.txt b/pluginssrv/channelrx/demoddsd/CMakeLists.txt new file mode 100644 index 000000000..79c481a00 --- /dev/null +++ b/pluginssrv/channelrx/demoddsd/CMakeLists.txt @@ -0,0 +1,68 @@ +project(dsddemod) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") +set(PLUGIN_PREFIX "../../../plugins/channelrx/demoddsd") + +set(dsddemod_SOURCES + ${PLUGIN_PREFIX}/dsddemod.cpp + ${PLUGIN_PREFIX}/dsddemodplugin.cpp + ${PLUGIN_PREFIX}/dsddemodbaudrates.cpp + ${PLUGIN_PREFIX}/dsddemodsettings.cpp + ${PLUGIN_PREFIX}/dsddecoder.cpp +) + +set(dsddemod_HEADERS + ${PLUGIN_PREFIX}/dsddemod.h + ${PLUGIN_PREFIX}/dsddemodplugin.h + ${PLUGIN_PREFIX}/dsddemodbaudrates.h + ${PLUGIN_PREFIX}/dsddemodsettings.h + ${PLUGIN_PREFIX}/dsddecoder.h +) + +if (BUILD_DEBIAN) +include_directories( + . + ${CMAKE_CURRENT_BINARY_DIR} + ${LIBDSDCCSRC} + ${LIBMBELIBSRC} +) +else (BUILD_DEBIAN) +include_directories( + . + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client + ${LIBDSDCC_INCLUDE_DIR} + ${LIBMBE_INCLUDE_DIR} +) +endif (BUILD_DEBIAN) + +#include(${QT_USE_FILE}) +add_definitions(${QT_DEFINITIONS}) +add_definitions(-DQT_PLUGIN) +add_definitions(-DQT_SHARED) + +add_library(demoddsdsrv SHARED + ${dsddemod_SOURCES} + ${dsddemod_HEADERS_MOC} +) + +if (BUILD_DEBIAN) +target_link_libraries(demoddsdsrv + ${QT_LIBRARIES} + sdrbase + dsdcc + mbelib +) +else (BUILD_DEBIAN) +target_link_libraries(demoddsdsrv + ${QT_LIBRARIES} + sdrbase + ${LIBDSDCC_LIBRARIES} + ${LIBMBE_LIBRARY} +) +endif (BUILD_DEBIAN) + + +qt5_use_modules(demoddsdsrv Core) + +install(TARGETS demoddsdsrv DESTINATION lib/pluginssrv/channelrx)