Use pkgconfig to build against the system libusb and fftw (#188)

* Use pkgconfig to build against the system libusb and fftw

* Remove FFTW build from make_appimage

Building it is failing silently in Travis, but the libfftw3-dev package
installs what we need anyway.
This commit is contained in:
turboencabulator 2021-11-03 20:47:28 -05:00 committed by GitHub
parent 556edb3245
commit 2cb3d45867
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 1480 deletions

View File

@ -127,14 +127,11 @@ win32{
unix:!android:!macx{ unix:!android:!macx{
INCLUDEPATH += $$PWD/build_linux INCLUDEPATH += $$PWD/build_linux
LIBS += -lfftw3 CONFIG += link_pkgconfig
PKGCONFIG += libusb-1.0 ##make sure you have the libusb-1.0-0-dev package!
PKGCONFIG += fftw3 ##make sure you have the libfftw3-dev package!
contains(QT_ARCH, arm) { contains(QT_ARCH, arm) {
message("Building for Raspberry Pi") message("Building for Raspberry Pi")
#libusb include
unix:!android:!macx:LIBS += -lusb-1.0 ##make sure you have the libusb-1.0-0-dev package!
unix:!android:!macx:INCLUDEPATH += build_linux/libusb
unix:!android:!macx:DEPENDPATH += build_linux/libusb
#libdfuprog include #libdfuprog include
unix:!android:!macx:LIBS += -L$$PWD/build_linux/libdfuprog/lib/arm -ldfuprog-0.9 unix:!android:!macx:LIBS += -L$$PWD/build_linux/libdfuprog/lib/arm -ldfuprog-0.9
unix:!android:!macx:INCLUDEPATH += $$PWD/build_linux/libdfuprog/include unix:!android:!macx:INCLUDEPATH += $$PWD/build_linux/libdfuprog/include
@ -149,10 +146,6 @@ unix:!android:!macx{
} else { } else {
contains(QT_ARCH, i386) { contains(QT_ARCH, i386) {
message("Building for Linux (x86)") message("Building for Linux (x86)")
unix:!android:!macx:LIBS += -lusb-1.0 ##make sure you have the libusb-1.0-0-dev package!
unix:!android:!macx:INCLUDEPATH += build_linux/libusb
unix:!android:!macx:DEPENDPATH += build_linux/libusb
#libdfuprog include #libdfuprog include
unix:!android:!macx:LIBS += -L$$PWD/build_linux/libdfuprog/lib/x86 -ldfuprog-0.9 unix:!android:!macx:LIBS += -L$$PWD/build_linux/libdfuprog/lib/x86 -ldfuprog-0.9
unix:!android:!macx:INCLUDEPATH += $$PWD/build_linux/libdfuprog/include unix:!android:!macx:INCLUDEPATH += $$PWD/build_linux/libdfuprog/include
@ -162,11 +155,6 @@ unix:!android:!macx{
} else { } else {
message("Building for Linux (x64)") message("Building for Linux (x64)")
#libusb include
unix:!android:!macx:LIBS += -Lbuild_linux/libusb -lusb-1.0 ##I suspect the -L here does nothing!
unix:!android:!macx:INCLUDEPATH += build_linux/libusb
unix:!android:!macx:DEPENDPATH += build_linux/libusb
#libdfuprog include #libdfuprog include
unix:!android:!macx:LIBS += -L$$PWD/build_linux/libdfuprog/lib/x64 -ldfuprog-0.9 unix:!android:!macx:LIBS += -L$$PWD/build_linux/libdfuprog/lib/x64 -ldfuprog-0.9
unix:!android:!macx:INCLUDEPATH += $$PWD/build_linux/libdfuprog/include unix:!android:!macx:INCLUDEPATH += $$PWD/build_linux/libdfuprog/include

File diff suppressed because it is too large Load Diff

View File

@ -1,27 +1,5 @@
#!/bin/bash #!/bin/bash
FFTW=fftw-3.3.9
if [ ! -d $FFTW ]
then
wget "http://fftw.org/$FFTW.tar.gz"
tar xvf "$FFTW.tar.gz"
rm "$FFTW.tar.gz"
fi
cd $FFTW
./configure \
F77=gfortran \
--with-gcc \
--prefix=/usr \
--infodir=/usr/share/info \
--enable-type-prefix \
--enable-shared \
--enable-threads \
--enable-openmp \
--enable-mpi
make -j8
sudo make install
cd ..
set -e set -e
qmake APPIMAGE=1 CONFIG+=release PREFIX=/usr DEFINES+=GIT_HASH_SHORT=$(git rev-parse --short HEAD) qmake APPIMAGE=1 CONFIG+=release PREFIX=/usr DEFINES+=GIT_HASH_SHORT=$(git rev-parse --short HEAD)