diff --git a/pluginssrv/samplesink/CMakeLists.txt b/pluginssrv/samplesink/CMakeLists.txt index ec27eee6c..97d32a801 100644 --- a/pluginssrv/samplesink/CMakeLists.txt +++ b/pluginssrv/samplesink/CMakeLists.txt @@ -28,6 +28,11 @@ if(CM256CC_FOUND) add_subdirectory(sdrdaemonsink) endif(CM256CC_FOUND) +find_package(SoapySDR) +if(LIBUSB_FOUND AND SOAPYSDR_FOUND) + add_subdirectory(soapysdroutput) +endif() + if (BUILD_DEBIAN) add_subdirectory(bladerf1output) add_subdirectory(bladerf2output) @@ -35,6 +40,7 @@ if (BUILD_DEBIAN) add_subdirectory(limesdroutput) add_subdirectory(plutosdroutput) add_subdirectory(sdrdaemonsink) + add_subdirectory(soapysdroutput) endif (BUILD_DEBIAN) add_subdirectory(filesink) diff --git a/pluginssrv/samplesink/soapysdroutput/CMakeLists.txt b/pluginssrv/samplesink/soapysdroutput/CMakeLists.txt new file mode 100644 index 000000000..0f99beee2 --- /dev/null +++ b/pluginssrv/samplesink/soapysdroutput/CMakeLists.txt @@ -0,0 +1,68 @@ +project(soapysdroutput) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") +set(PLUGIN_PREFIX "../../../plugins/samplesink/soapysdroutput") + +set(soapysdroutput_SOURCES + ${PLUGIN_PREFIX}/soapysdroutput.cpp + ${PLUGIN_PREFIX}/soapysdroutputplugin.cpp + ${PLUGIN_PREFIX}/soapysdroutputsettings.cpp + ${PLUGIN_PREFIX}/soapysdroutputthread.cpp +) + +set(soapysdroutput_HEADERS + ${PLUGIN_PREFIX}/soapysdroutput.h + ${PLUGIN_PREFIX}/soapysdroutputplugin.h + ${PLUGIN_PREFIX}/soapysdroutputsettings.h + ${PLUGIN_PREFIX}/soapysdroutputthread.h +) + +if (BUILD_DEBIAN) +include_directories( + . + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client + ${CMAKE_SOURCE_DIR}/devices + ${LIBSOAPYSDRSRC}/include + ${LIBSOAPYSDRSRC}/src +) +else (BUILD_DEBIAN) +include_directories( + . + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client + ${CMAKE_SOURCE_DIR}/devices + ${SOAPYSDR_INCLUDE_DIR} +) +endif (BUILD_DEBIAN) + +add_definitions(${QT_DEFINITIONS}) +add_definitions(-DQT_PLUGIN) +add_definitions(-DQT_SHARED) + +add_library(outputsoapysdrsrv SHARED + ${soapysdroutput_SOURCES} + ${soapysdroutput_HEADERS_MOC} +) + +if (BUILD_DEBIAN) +target_link_libraries(outputsoapysdrsrv + ${QT_LIBRARIES} + soapysdr + sdrbase + swagger + soapysdrdevice +) +else (BUILD_DEBIAN) +target_link_libraries(outputsoapysdrsrv + ${QT_LIBRARIES} + ${SOAPYSDR_LIBRARY} + sdrbase + swagger + soapysdrdevice +) +endif (BUILD_DEBIAN) + +target_link_libraries(outputsoapysdrsrv Qt5::Core) + +install(TARGETS outputsoapysdrsrv DESTINATION lib/plugins/samplesink) diff --git a/pluginssrv/samplesource/CMakeLists.txt b/pluginssrv/samplesource/CMakeLists.txt index 8e23ea759..3f2883a66 100644 --- a/pluginssrv/samplesource/CMakeLists.txt +++ b/pluginssrv/samplesource/CMakeLists.txt @@ -77,6 +77,14 @@ else(LIBUSB_FOUND AND LIBMIRISDR_FOUND) message(STATUS "LibMiriSDR NOT found") endif(LIBUSB_FOUND AND LIBMIRISDR_FOUND) +find_package(SoapySDR) +if(LIBUSB_FOUND AND SOAPYSDR_FOUND) + add_subdirectory(soapysdrinput) + message(STATUS "SoapySDR found") +else() + message(STATUS "SoapySDR not found") +endif() + if (BUILD_DEBIAN) add_subdirectory(airspy) add_subdirectory(airspyhf) @@ -89,6 +97,7 @@ if (BUILD_DEBIAN) add_subdirectory(rtlsdr) add_subdirectory(sdrdaemonsource) add_subdirectory(sdrplay) + add_subdirectory(soapysdrinput) endif (BUILD_DEBIAN) add_subdirectory(filesource) diff --git a/pluginssrv/samplesource/soapysdrinput/CMakeLists.txt b/pluginssrv/samplesource/soapysdrinput/CMakeLists.txt new file mode 100644 index 000000000..331082b11 --- /dev/null +++ b/pluginssrv/samplesource/soapysdrinput/CMakeLists.txt @@ -0,0 +1,68 @@ +project(soapysdrinput) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") +set(PLUGIN_PREFIX "../../../plugins/samplesource/soapysdrinput") + +set(soapysdrinput_SOURCES + ${PLUGIN_PREFIX}/soapysdrinput.cpp + ${PLUGIN_PREFIX}/soapysdrinputplugin.cpp + ${PLUGIN_PREFIX}/soapysdrinputsettings.cpp + ${PLUGIN_PREFIX}/soapysdrinputthread.cpp +) + +set(soapysdrinput_HEADERS + ${PLUGIN_PREFIX}/soapysdrinput.h + ${PLUGIN_PREFIX}/soapysdrinputplugin.h + ${PLUGIN_PREFIX}/soapysdrinputsettings.h + ${PLUGIN_PREFIX}/soapysdrinputthread.h +) + +if (BUILD_DEBIAN) +include_directories( + . + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client + ${CMAKE_SOURCE_DIR}/devices + ${LIBSOAPYSDRSRC}/include + ${LIBSOAPYSDRSRC}/src +) +else (BUILD_DEBIAN) +include_directories( + . + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client + ${CMAKE_SOURCE_DIR}/devices + ${SOAPYSDR_INCLUDE_DIR} +) +endif (BUILD_DEBIAN) + +add_definitions(${QT_DEFINITIONS}) +add_definitions(-DQT_PLUGIN) +add_definitions(-DQT_SHARED) + +add_library(inputsoapysdrsrv SHARED + ${soapysdrinput_SOURCES} + ${soapysdrinput_HEADERS_MOC} +) + +if (BUILD_DEBIAN) +target_link_libraries(inputsoapysdrsrv + ${QT_LIBRARIES} + soapysdr + sdrbase + swagger + soapysdrdevice +) +else (BUILD_DEBIAN) +target_link_libraries(inputsoapysdrsrv + ${QT_LIBRARIES} + ${SOAPYSDR_LIBRARY} + sdrbase + swagger + soapysdrdevice +) +endif (BUILD_DEBIAN) + +target_link_libraries(inputsoapysdrsrv Qt5::Core) + +install(TARGETS inputsoapysdrsrv DESTINATION lib/plugins/samplesource)