From 21bfd71331c513bef004d3b15952d4eb397c151c Mon Sep 17 00:00:00 2001 From: f4exb Date: Sat, 29 Sep 2018 03:03:43 +0200 Subject: [PATCH] BladeRF2 input: added server plugin --- pluginssrv/samplesource/CMakeLists.txt | 2 + .../samplesource/bladerf2input/CMakeLists.txt | 68 +++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 pluginssrv/samplesource/bladerf2input/CMakeLists.txt diff --git a/pluginssrv/samplesource/CMakeLists.txt b/pluginssrv/samplesource/CMakeLists.txt index 231856323..8e23ea759 100644 --- a/pluginssrv/samplesource/CMakeLists.txt +++ b/pluginssrv/samplesource/CMakeLists.txt @@ -26,6 +26,7 @@ endif(LIBUSB_FOUND AND LIBAIRSPYHF_FOUND) find_package(LibBLADERF) if(LIBUSB_FOUND AND LIBBLADERF_FOUND) add_subdirectory(bladerf1input) + add_subdirectory(bladerf2input) endif(LIBUSB_FOUND AND LIBBLADERF_FOUND) if(LIBUSB_FOUND AND UNIX) @@ -80,6 +81,7 @@ if (BUILD_DEBIAN) add_subdirectory(airspy) add_subdirectory(airspyhf) add_subdirectory(bladerf1input) + add_subdirectory(bladerf2input) add_subdirectory(hackrfinput) add_subdirectory(limesdrinput) add_subdirectory(perseus) diff --git a/pluginssrv/samplesource/bladerf2input/CMakeLists.txt b/pluginssrv/samplesource/bladerf2input/CMakeLists.txt new file mode 100644 index 000000000..8341b6008 --- /dev/null +++ b/pluginssrv/samplesource/bladerf2input/CMakeLists.txt @@ -0,0 +1,68 @@ +project(bladerf2input) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") +set(PLUGIN_PREFIX "../../../plugins/samplesource/bladerf2input") + +set(bladerf2input_SOURCES + ${PLUGIN_PREFIX}/bladerf2input.cpp + ${PLUGIN_PREFIX}/bladerf2inputplugin.cpp + ${PLUGIN_PREFIX}/bladerf2inputsettings.cpp + ${PLUGIN_PREFIX}/bladerf2inputthread.cpp +) + +set(bladerf2input_HEADERS + ${PLUGIN_PREFIX}/bladerf2input.h + ${PLUGIN_PREFIX}/bladerf2inputplugin.h + ${PLUGIN_PREFIX}/bladerf2inputsettings.h + ${PLUGIN_PREFIX}/bladerf2inputthread.h +) + +if (BUILD_DEBIAN) +include_directories( + . + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client + ${CMAKE_SOURCE_DIR}/devices + ${LIBBLADERFLIBSRC}/include + ${LIBBLADERFLIBSRC}/src +) +else (BUILD_DEBIAN) +include_directories( + . + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client + ${CMAKE_SOURCE_DIR}/devices + ${LIBBLADERF_INCLUDE_DIR} +) +endif (BUILD_DEBIAN) + +add_definitions(${QT_DEFINITIONS}) +add_definitions(-DQT_PLUGIN) +add_definitions(-DQT_SHARED) + +add_library(inputbladerf2srv SHARED + ${bladerf2input_SOURCES} + ${bladerf2input_HEADERS_MOC} +) + +if (BUILD_DEBIAN) +target_link_libraries(inputbladerf2srv + ${QT_LIBRARIES} + bladerf + sdrbase + swagger + bladerf2device +) +else (BUILD_DEBIAN) +target_link_libraries(inputbladerf2srv + ${QT_LIBRARIES} + ${LIBBLADERF_LIBRARIES} + sdrbase + swagger + bladerf2device +) +endif (BUILD_DEBIAN) + +target_link_libraries(inputbladerf2srv Qt5::Core) + +install(TARGETS inputbladerf2srv DESTINATION lib/pluginssrv/samplesource)