diff --git a/plugins/samplesink/hackrfoutput/hackrfoutput.cpp b/plugins/samplesink/hackrfoutput/hackrfoutput.cpp
index 33241f4ba..d75a8169b 100644
--- a/plugins/samplesink/hackrfoutput/hackrfoutput.cpp
+++ b/plugins/samplesink/hackrfoutput/hackrfoutput.cpp
@@ -30,7 +30,6 @@
#include "device/devicesinkapi.h"
#include "hackrf/devicehackrfshared.h"
-#include "hackrfoutputgui.h"
#include "hackrfoutputthread.h"
MESSAGE_CLASS_DEFINITION(HackRFOutput::MsgConfigureHackRF, Message)
diff --git a/plugins/samplesink/hackrfoutput/hackrfoutputplugin.cpp b/plugins/samplesink/hackrfoutput/hackrfoutputplugin.cpp
index bd6739f91..75bf0f0aa 100644
--- a/plugins/samplesink/hackrfoutput/hackrfoutputplugin.cpp
+++ b/plugins/samplesink/hackrfoutput/hackrfoutputplugin.cpp
@@ -14,18 +14,19 @@
// along with this program. If not, see . //
///////////////////////////////////////////////////////////////////////////////////
-#include "hackrfoutputplugin.h"
-
#include
-#include
#include "libhackrf/hackrf.h"
#include "device/devicesourceapi.h"
-
#include "plugin/pluginapi.h"
#include "util/simpleserializer.h"
+#ifdef SERVER_MODE
+#include "hackrfoutput.h"
+#else
#include "hackrfoutputgui.h"
+#endif
+#include "hackrfoutputplugin.h"
const PluginDescriptor HackRFOutputPlugin::m_pluginDescriptor = {
QString("HackRF Output"),
@@ -120,6 +121,15 @@ PluginInterface::SamplingDevices HackRFOutputPlugin::enumSampleSinks()
return result;
}
+#ifdef SERVER_MODE
+PluginInstanceGUI* HackRFOutputPlugin::createSampleSinkPluginInstanceGUI(
+ const QString& sinkId __attribute__((unused)),
+ QWidget **widget __attribute__((unused)),
+ DeviceUISet *deviceUISet __attribute__((unused)))
+{
+ return 0;
+}
+#else
PluginInstanceGUI* HackRFOutputPlugin::createSampleSinkPluginInstanceGUI(
const QString& sinkId,
QWidget **widget,
@@ -136,6 +146,7 @@ PluginInstanceGUI* HackRFOutputPlugin::createSampleSinkPluginInstanceGUI(
return 0;
}
}
+#endif
DeviceSampleSink* HackRFOutputPlugin::createSampleSinkPluginInstanceOutput(const QString& sinkId, DeviceSinkAPI *deviceAPI)
{
diff --git a/plugins/samplesource/hackrfinput/hackrfinput.cpp b/plugins/samplesource/hackrfinput/hackrfinput.cpp
index e91f45461..c08437e39 100644
--- a/plugins/samplesource/hackrfinput/hackrfinput.cpp
+++ b/plugins/samplesource/hackrfinput/hackrfinput.cpp
@@ -32,7 +32,6 @@
#include "hackrf/devicehackrfvalues.h"
#include "hackrf/devicehackrfshared.h"
-#include "hackrfinputgui.h"
#include "hackrfinputthread.h"
MESSAGE_CLASS_DEFINITION(HackRFInput::MsgConfigureHackRF, Message)
diff --git a/plugins/samplesource/hackrfinput/hackrfinputplugin.cpp b/plugins/samplesource/hackrfinput/hackrfinputplugin.cpp
index 2d7d2220d..258c1719f 100644
--- a/plugins/samplesource/hackrfinput/hackrfinputplugin.cpp
+++ b/plugins/samplesource/hackrfinput/hackrfinputplugin.cpp
@@ -14,10 +14,8 @@
// along with this program. If not, see . //
///////////////////////////////////////////////////////////////////////////////////
-#include "../hackrfinput/hackrfinputplugin.h"
#include
-#include
#include "libhackrf/hackrf.h"
#include
@@ -25,7 +23,12 @@
#include "plugin/pluginapi.h"
#include "util/simpleserializer.h"
-#include "../hackrfinput/hackrfinputgui.h"
+#ifdef SERVER_MODE
+#include "hackrfinput.h"
+#else
+#include "hackrfinputgui.h"
+#endif
+#include "hackrfinputplugin.h"
const PluginDescriptor HackRFInputPlugin::m_pluginDescriptor = {
QString("HackRF Input"),
@@ -121,6 +124,15 @@ PluginInterface::SamplingDevices HackRFInputPlugin::enumSampleSources()
return result;
}
+#ifdef SERVER_MODE
+PluginInstanceGUI* HackRFInputPlugin::createSampleSourcePluginInstanceGUI(
+ const QString& sourceId __attribute__((unused)),
+ QWidget **widget __attribute__((unused)),
+ DeviceUISet *deviceUISet __attribute__((unused)))
+{
+ return 0;
+}
+#else
PluginInstanceGUI* HackRFInputPlugin::createSampleSourcePluginInstanceGUI(
const QString& sourceId,
QWidget **widget,
@@ -137,6 +149,7 @@ PluginInstanceGUI* HackRFInputPlugin::createSampleSourcePluginInstanceGUI(
return 0;
}
}
+#endif
DeviceSampleSource *HackRFInputPlugin::createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI)
{
diff --git a/pluginssrv/samplesink/CMakeLists.txt b/pluginssrv/samplesink/CMakeLists.txt
index cc9f11b17..fc12191ee 100644
--- a/pluginssrv/samplesink/CMakeLists.txt
+++ b/pluginssrv/samplesink/CMakeLists.txt
@@ -2,6 +2,11 @@ project(samplesink)
find_package(LibUSB)
+find_package(LibHACKRF)
+if(LIBUSB_FOUND AND LIBHACKRF_FOUND)
+ add_subdirectory(hackrfoutput)
+endif(LIBUSB_FOUND AND LIBHACKRF_FOUND)
+
find_package(LimeSuite)
if(LIBUSB_FOUND AND LIMESUITE_FOUND)
add_subdirectory(limesdroutput)
@@ -9,6 +14,7 @@ endif(LIBUSB_FOUND AND LIMESUITE_FOUND)
if (BUILD_DEBIAN)
add_subdirectory(limesdroutput)
+ add_subdirectory(hackrfoutput)
endif (BUILD_DEBIAN)
add_subdirectory(filesink)
diff --git a/pluginssrv/samplesink/hackrfoutput/CMakeLists.txt b/pluginssrv/samplesink/hackrfoutput/CMakeLists.txt
new file mode 100644
index 000000000..e96887267
--- /dev/null
+++ b/pluginssrv/samplesink/hackrfoutput/CMakeLists.txt
@@ -0,0 +1,68 @@
+project(hackrfoutput)
+
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+set(PLUGIN_PREFIX "../../../plugins/samplesink/hackrfoutput")
+
+set(hackrfoutput_SOURCES
+ ${PLUGIN_PREFIX}/hackrfoutput.cpp
+ ${PLUGIN_PREFIX}/hackrfoutputplugin.cpp
+ ${PLUGIN_PREFIX}/hackrfoutputsettings.cpp
+ ${PLUGIN_PREFIX}/hackrfoutputthread.cpp
+)
+
+set(hackrfoutput_HEADERS
+ ${PLUGIN_PREFIX}/hackrfoutput.h
+ ${PLUGIN_PREFIX}/hackrfoutputplugin.h
+ ${PLUGIN_PREFIX}/hackrfoutputsettings.h
+ ${PLUGIN_PREFIX}/hackrfoutputthread.h
+)
+
+if (BUILD_DEBIAN)
+include_directories(
+ .
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
+ ${CMAKE_SOURCE_DIR}/devices
+ ${LIBHACKRFSRC}
+ ${LIBHACKRFSRC}/libhackrf/src
+)
+else (BUILD_DEBIAN)
+include_directories(
+ .
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
+ ${CMAKE_SOURCE_DIR}/devices
+ ${LIBHACKRF_INCLUDE_DIR}
+)
+endif (BUILD_DEBIAN)
+
+add_definitions("${QT_DEFINITIONS} -DLIBHACKRF_DYN_RATES")
+add_definitions(-DQT_PLUGIN)
+add_definitions(-DQT_SHARED)
+
+add_library(outputhackrfsrv SHARED
+ ${hackrfoutput_SOURCES}
+ ${hackrfoutput_HEADERS_MOC}
+)
+
+if (BUILD_DEBIAN)
+target_link_libraries(outputhackrfsrv
+ ${QT_LIBRARIES}
+ hackrf
+ sdrbase
+ swagger
+ hackrfdevice
+)
+else (BUILD_DEBIAN)
+target_link_libraries(outputhackrfsrv
+ ${QT_LIBRARIES}
+ ${LIBHACKRF_LIBRARIES}
+ sdrbase
+ swagger
+ hackrfdevice
+)
+endif (BUILD_DEBIAN)
+
+qt5_use_modules(outputhackrfsrv Core)
+
+install(TARGETS outputhackrfsrv DESTINATION lib/pluginssrv/samplesink)
diff --git a/pluginssrv/samplesource/CMakeLists.txt b/pluginssrv/samplesource/CMakeLists.txt
index a77187a9c..3cc921e76 100644
--- a/pluginssrv/samplesource/CMakeLists.txt
+++ b/pluginssrv/samplesource/CMakeLists.txt
@@ -13,6 +13,11 @@ if(V4L-MSI)
# add_subdirectory(v4l-msi)
endif()
+find_package(LibHACKRF)
+if(LIBUSB_FOUND AND LIBHACKRF_FOUND)
+ add_subdirectory(hackrfinput)
+endif(LIBUSB_FOUND AND LIBHACKRF_FOUND)
+
find_package(LimeSuite)
if(LIBUSB_FOUND AND LIMESUITE_FOUND)
add_subdirectory(limesdrinput)
@@ -24,6 +29,7 @@ if(LIBUSB_FOUND AND LIBRTLSDR_FOUND)
endif(LIBUSB_FOUND AND LIBRTLSDR_FOUND)
if (BUILD_DEBIAN)
+ add_subdirectory(hackrfinput)
add_subdirectory(limesdrinput)
add_subdirectory(rtlsdr)
endif (BUILD_DEBIAN)
diff --git a/pluginssrv/samplesource/hackrfinput/CMakeLists.txt b/pluginssrv/samplesource/hackrfinput/CMakeLists.txt
new file mode 100644
index 000000000..d1c67c8c5
--- /dev/null
+++ b/pluginssrv/samplesource/hackrfinput/CMakeLists.txt
@@ -0,0 +1,68 @@
+project(hackrfinput)
+
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+set(PLUGIN_PREFIX "../../../plugins/samplesource/hackrfinput")
+
+set(hackrfinput_SOURCES
+ ${PLUGIN_PREFIX}/hackrfinput.cpp
+ ${PLUGIN_PREFIX}/hackrfinputplugin.cpp
+ ${PLUGIN_PREFIX}/hackrfinputsettings.cpp
+ ${PLUGIN_PREFIX}/hackrfinputthread.cpp
+)
+
+set(hackrfinput_HEADERS
+ ${PLUGIN_PREFIX}/hackrfinput.h
+ ${PLUGIN_PREFIX}/hackrfinputplugin.h
+ ${PLUGIN_PREFIX}/hackrfinputsettings.h
+ ${PLUGIN_PREFIX}/hackrfinputthread.h
+)
+
+if (BUILD_DEBIAN)
+include_directories(
+ .
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
+ ${CMAKE_SOURCE_DIR}/devices
+ ${LIBHACKRFSRC}
+ ${LIBHACKRFSRC}/libhackrf/src
+)
+else (BUILD_DEBIAN)
+include_directories(
+ .
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
+ ${CMAKE_SOURCE_DIR}/devices
+ ${LIBHACKRF_INCLUDE_DIR}
+)
+endif (BUILD_DEBIAN)
+
+add_definitions("${QT_DEFINITIONS} -DLIBHACKRF_DYN_RATES")
+add_definitions(-DQT_PLUGIN)
+add_definitions(-DQT_SHARED)
+
+add_library(inputhackrfsrv SHARED
+ ${hackrfinput_SOURCES}
+ ${hackrfinput_HEADERS_MOC}
+)
+
+if (BUILD_DEBIAN)
+target_link_libraries(inputhackrfsrv
+ ${QT_LIBRARIES}
+ hackrf
+ sdrbase
+ swagger
+ hackrfdevice
+)
+else (BUILD_DEBIAN)
+target_link_libraries(inputhackrfsrv
+ ${QT_LIBRARIES}
+ ${LIBHACKRF_LIBRARIES}
+ sdrbase
+ swagger
+ hackrfdevice
+)
+endif (BUILD_DEBIAN)
+
+qt5_use_modules(inputhackrfsrv Core)
+
+install(TARGETS inputhackrfsrv DESTINATION lib/pluginssrv/samplesource)