1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-17 23:28:50 -05:00

Windows: MSVC2017: BladeRF support

This commit is contained in:
f4exb 2018-11-16 13:44:58 +01:00
parent 1da6f64a25
commit bc50bf9afa
10 changed files with 94 additions and 24 deletions

View File

@ -14,13 +14,13 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#include "../bladerf1/devicebladerf1.h"
#include <QtGlobal>
#include <cstdio>
#include <cstring>
#include "devicebladerf1.h"
bool DeviceBladeRF1::open_bladerf(struct bladerf **dev, const char *serial)
{
int fpga_loaded;

View File

@ -31,7 +31,7 @@ class BladeRF2Output;
class DEVICES_API DeviceBladeRF2Shared
{
public:
class MsgReportBuddyChange : public Message {
class DEVICES_API MsgReportBuddyChange : public Message {
MESSAGE_CLASS_DECLARATION
public:

View File

@ -136,6 +136,13 @@ macx {
}
MSVC {
SOURCES += bladerf1/devicebladerf1.cpp\
bladerf1/devicebladerf1values.cpp\
bladerf1/devicebladerf1shared.cpp
SOURCES += bladerf2/devicebladerf2.cpp\
bladerf2/devicebladerf2shared.cpp
SOURCES += hackrf/devicehackrf.cpp\
hackrf/devicehackrfvalues.cpp\
hackrf/devicehackrfshared.cpp
@ -149,6 +156,14 @@ MSVC {
soapysdr/devicesoapysdrscan.cpp\
soapysdr/devicesoapysdrshared.cpp
HEADERS += bladerf1/devicebladerf1.h\
bladerf1/devicebladerf1param.h\
bladerf1/devicebladerf1values.h\
bladerf1/devicebladerf1shared.h
HEADERS += bladerf2/devicebladerf2.h\
bladerf2/devicebladerf2shared.h
HEADERS += hackrf/devicehackrf.h\
hackrf/devicehackrfparam.h\
hackrf/devicehackrfvalues.h\
@ -181,6 +196,7 @@ macx {
MSVC {
LIBS += -L../libhackrf/$${build_subdir} -llibhackrf
LIBS += -L"C:\Program Files\PothosSDR\bin" -L"C:\Program Files\PothosSDR\lib" -lbladeRF
LIBS += -L"C:\Program Files\PothosSDR\bin" -L"C:\Program Files\PothosSDR\lib" -lLimeSuite
LIBS += -L"C:\Program Files\PothosSDR\bin" -L"C:\Program Files\PothosSDR\lib" -lSoapySDR
}

View File

@ -321,7 +321,7 @@ bool Bladerf1Output::applySettings(const BladeRF1OutputSettings& settings, bool
}
else
{
fifoSize = std::max(
fifoSize = (std::max)(
(int) ((settings.m_devSampleRate/(1<<settings.m_log2Interp)) * DeviceBladeRF1Shared::m_sampleFifoLengthInSeconds),
DeviceBladeRF1Shared::m_sampleFifoMinSize);
}

View File

@ -25,7 +25,15 @@ INCLUDEPATH += ../../../sdrbase
INCLUDEPATH += ../../../sdrgui
INCLUDEPATH += ../../../swagger/sdrangel/code/qt5/client
INCLUDEPATH += ../../../devices
INCLUDEPATH += $$LIBBLADERF/include
MINGW32 || MINGW64 {
LIBBLADERF = "C:\Programs\bladeRF"
INCLUDEPATH += $$LIBBLADERF/include
}
MSVC {
INCLUDEPATH += "C:\Program Files\PothosSDR\include"
}
CONFIG(Release):build_subdir = release
CONFIG(Debug):build_subdir = debug
@ -47,7 +55,14 @@ FORMS += bladerf1outputgui.ui
LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase
LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui
LIBS += -L../../../swagger/$${build_subdir} -lswagger
LIBS += -L$$LIBBLADERF/lib -lbladeRF
LIBS += -L../../../devices/$${build_subdir} -ldevices
MINGW32 || MINGW64 {
LIBS += -L$$LIBBLADERF/lib -lbladeRF
}
MSVC {
LIBS += -L"C:\Program Files\PothosSDR\lib" -L"C:\Program Files\PothosSDR\bin" -lbladeRF
}
RESOURCES = ../../../sdrgui/resources/res.qrc

View File

@ -707,7 +707,7 @@ bool BladeRF2Output::applySettings(const BladeRF2OutputSettings& settings, bool
}
else
{
fifoSize = std::max(
fifoSize = (std::max)(
(int) ((settings.m_devSampleRate/(1<<settings.m_log2Interp)) * DeviceBladeRF2Shared::m_sampleFifoLengthInSeconds),
DeviceBladeRF2Shared::m_sampleFifoMinSize);
}

View File

@ -17,15 +17,21 @@ DEFINES += USE_SSE4_1=1
QMAKE_CXXFLAGS += -msse4.1
QMAKE_CXXFLAGS += -std=c++11
CONFIG(MINGW32):LIBBLADERF = "C:\Programs\bladeRF"
CONFIG(MINGW64):LIBBLADERF = "C:\Programs\bladeRF"
INCLUDEPATH += $$PWD
INCLUDEPATH += ../../../exports
INCLUDEPATH += ../../../sdrbase
INCLUDEPATH += ../../../sdrgui
INCLUDEPATH += ../../../swagger/sdrangel/code/qt5/client
INCLUDEPATH += ../../../devices
INCLUDEPATH += $$LIBBLADERF/include
MINGW32 || MINGW64 {
LIBBLADERF = "C:\Programs\bladeRF"
INCLUDEPATH += $$LIBBLADERF/include
}
MSVC {
INCLUDEPATH += "C:\Program Files\PothosSDR\include"
}
CONFIG(Release):build_subdir = release
CONFIG(Debug):build_subdir = debug
@ -47,7 +53,14 @@ FORMS += bladerf2outputgui.ui
LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase
LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui
LIBS += -L../../../swagger/$${build_subdir} -lswagger
LIBS += -L$$LIBBLADERF/lib -lbladeRF
LIBS += -L../../../devices/$${build_subdir} -ldevices
MINGW32 || MINGW64 {
LIBS += -L$$LIBBLADERF/lib -lbladeRF
}
MSVC {
LIBS += -L"C:\Program Files\PothosSDR\lib" -L"C:\Program Files\PothosSDR\bin" -lbladeRF
}
RESOURCES = ../../../sdrgui/resources/res.qrc

View File

@ -17,15 +17,21 @@ DEFINES += USE_SSE4_1=1
QMAKE_CXXFLAGS += -msse4.1
QMAKE_CXXFLAGS += -std=c++11
CONFIG(MINGW32):LIBBLADERF = "C:\Programs\bladeRF"
CONFIG(MINGW64):LIBBLADERF = "C:\Programs\bladeRF"
INCLUDEPATH += $$PWD
INCLUDEPATH += ../../../exports
INCLUDEPATH += ../../../sdrbase
INCLUDEPATH += ../../../sdrgui
INCLUDEPATH += ../../../swagger/sdrangel/code/qt5/client
INCLUDEPATH += ../../../devices
INCLUDEPATH += $$LIBBLADERF/include
MINGW32 || MINGW64 {
LIBBLADERF = "C:\Programs\bladeRF"
INCLUDEPATH += $$LIBBLADERF/include
}
MSVC {
INCLUDEPATH += "C:\Program Files\PothosSDR\include"
}
CONFIG(Release):build_subdir = release
CONFIG(Debug):build_subdir = debug
@ -47,7 +53,14 @@ FORMS += bladerf1inputgui.ui
LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase
LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui
LIBS += -L../../../swagger/$${build_subdir} -lswagger
LIBS += -L$$LIBBLADERF/lib -lbladeRF
LIBS += -L../../../devices/$${build_subdir} -ldevices
MINGW32 || MINGW64 {
LIBS += -L$$LIBBLADERF/lib -lbladeRF
}
MSVC {
LIBS += -L"C:\Program Files\PothosSDR\lib" -L"C:\Program Files\PothosSDR\bin" -lbladeRF
}
RESOURCES = ../../../sdrgui/resources/res.qrc

View File

@ -17,15 +17,21 @@ DEFINES += USE_SSE4_1=1
QMAKE_CXXFLAGS += -msse4.1
QMAKE_CXXFLAGS += -std=c++11
CONFIG(MINGW32):LIBBLADERF = "C:\Programs\bladeRF"
CONFIG(MINGW64):LIBBLADERF = "C:\Programs\bladeRF"
INCLUDEPATH += $$PWD
INCLUDEPATH += ../../../exports
INCLUDEPATH += ../../../sdrbase
INCLUDEPATH += ../../../sdrgui
INCLUDEPATH += ../../../swagger/sdrangel/code/qt5/client
INCLUDEPATH += ../../../devices
INCLUDEPATH += $$LIBBLADERF/include
MINGW32 || MINGW64 {
LIBBLADERF = "C:\Programs\bladeRF"
INCLUDEPATH += $$LIBBLADERF/include
}
MSVC {
INCLUDEPATH += "C:\Program Files\PothosSDR\include"
}
CONFIG(Release):build_subdir = release
CONFIG(Debug):build_subdir = debug
@ -47,7 +53,14 @@ FORMS += bladerf2inputgui.ui
LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase
LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui
LIBS += -L../../../swagger/$${build_subdir} -lswagger
LIBS += -L$$LIBBLADERF/lib -lbladeRF
LIBS += -L../../../devices/$${build_subdir} -ldevices
MINGW32 || MINGW64 {
LIBS += -L$$LIBBLADERF/lib -lbladeRF
}
MSVC {
LIBS += -L"C:\Program Files\PothosSDR\lib" -L"C:\Program Files\PothosSDR\bin" -lbladeRF
}
RESOURCES = ../../../sdrgui/resources/res.qrc

View File

@ -24,7 +24,7 @@ copy libhackrf\%1\libhackrf.dll %2
copy librtlsdr\%1\librtlsdr.dll %2
copy libairspy\%1\libairspy.dll %2
copy libairspyhf\%1\libairspyhf.dll %2
REM copy libbladerf\%1\libbladerf.dll %2
copy %pothosdir%\bin\bladeRF.dll %2
REM copy libiio\%1\libiio.dll %2
copy %pothosdir%\bin\LimeSuite.dll %2
copy %pothosdir%\bin\SoapySDR.dll %2
@ -70,16 +70,16 @@ copy plugins\samplesource\rtlsdr\%1\inputrtlsdr.dll %2\plugins\samplesource
copy plugins\samplesource\hackrfinput\%1\inputhackrf.dll %2\plugins\samplesource
copy plugins\samplesource\airspy\%1\inputairspy.dll %2\plugins\samplesource
copy plugins\samplesource\airspyhf\%1\inputairspyhf.dll %2\plugins\samplesource
REM copy plugins\samplesource\bladerf1input\%1\inputbladerf1.dll %2\plugins\samplesource
REM copy plugins\samplesource\bladerf2input\%1\inputbladerf2.dll %2\plugins\samplesource
copy plugins\samplesource\bladerf1input\%1\inputbladerf1.dll %2\plugins\samplesource
copy plugins\samplesource\bladerf2input\%1\inputbladerf2.dll %2\plugins\samplesource
copy plugins\samplesource\limesdrinput\%1\inputlimesdr.dll %2\plugins\samplesource
REM copy plugins\samplesource\plutosdrinput\%1\inputplutosdr.dll %2\plugins\samplesource
copy plugins\samplesource\sdrdaemonsource\%1\inputsdrdaemonsource.dll %2\plugins\samplesource
copy plugins\samplesource\soapysdrinput\%1\inputsoapysdr.dll %2\plugins\samplesource
copy plugins\samplesink\filesink\%1\outputfilesink.dll %2\plugins\samplesink
REM copy plugins\samplesink\bladerf1output\%1\outputbladerf1.dll %2\plugins\samplesink
REM copy plugins\samplesink\bladerf2output\%1\outputbladerf2.dll %2\plugins\samplesink
copy plugins\samplesink\bladerf1output\%1\outputbladerf1.dll %2\plugins\samplesink
copy plugins\samplesink\bladerf2output\%1\outputbladerf2.dll %2\plugins\samplesink
copy plugins\samplesink\hackrfoutput\%1\outputhackrf.dll %2\plugins\samplesink
copy plugins\samplesink\limesdroutput\%1\outputlimesdr.dll %2\plugins\samplesink
REM copy plugins\samplesink\plutosdroutput\%1\outputplutosdr.dll %2\plugins\samplesink