From a7b0b52da9544b29850b5adb4b0e80bc77b6cb34 Mon Sep 17 00:00:00 2001 From: AlexandreRouma Date: Wed, 26 Jan 2022 20:20:04 +0100 Subject: [PATCH] Fixed depencies --- core/CMakeLists.txt | 6 ++- docker_builds/debian_bullseye/do_build.sh | 2 +- docker_builds/debian_buster/do_build.sh | 2 +- docker_builds/debian_sid/do_build.sh | 2 +- docker_builds/raspios_bullseye/Dockerfile | 4 -- docker_builds/raspios_bullseye/do_build.sh | 48 ------------------- .../raspios_bullseye/rpi_toolchain.cmake | 12 ----- docker_builds/ubuntu_bionic/do_build.sh | 2 +- docker_builds/ubuntu_focal/do_build.sh | 2 +- docker_builds/ubuntu_hirsute/do_build.sh | 2 +- docker_builds/ubuntu_impish/do_build.sh | 2 +- .../sdrpp_server_source/CMakeLists.txt | 4 -- 12 files changed, 12 insertions(+), 76 deletions(-) delete mode 100644 docker_builds/raspios_bullseye/Dockerfile delete mode 100644 docker_builds/raspios_bullseye/do_build.sh delete mode 100644 docker_builds/raspios_bullseye/rpi_toolchain.cmake diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 9be5af2a..5a37ca1f 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -73,7 +73,7 @@ if (MSVC) # ZSTD find_package(zstd CONFIG REQUIRED) - target_link_libraries(sdrpp_core PRIVATE zstd::libzstd_shared) + target_link_libraries(sdrpp_core PUBLIC zstd::libzstd_shared) else() find_package(PkgConfig) @@ -82,12 +82,14 @@ else() pkg_check_modules(FFTW3 REQUIRED fftw3f) pkg_check_modules(VOLK REQUIRED volk) pkg_check_modules(GLFW3 REQUIRED glfw3) + pkg_check_modules(LIBZSTD REQUIRED libzstd) target_include_directories(sdrpp_core PUBLIC ${OPENGL_INCLUDE_DIRS} ${FFTW3_INCLUDE_DIRS} ${GLFW3_INCLUDE_DIRS} ${VOLK_INCLUDE_DIRS} + ${LIBZSTD_INCLUDE_DIRS} ) target_link_directories(sdrpp_core PUBLIC @@ -95,6 +97,7 @@ else() ${FFTW3_LIBRARY_DIRS} ${GLFW3_LIBRARY_DIRS} ${VOLK_LIBRARY_DIRS} + ${LIBZSTD_LIBRARY_DIRS} ) target_link_libraries(sdrpp_core PUBLIC @@ -102,6 +105,7 @@ else() ${FFTW3_LIBRARIES} ${GLFW3_LIBRARIES} ${VOLK_LIBRARIES} + ${LIBZSTD_LIBRARIES} ) if (NOT USE_INTERNAL_LIBCORRECT) diff --git a/docker_builds/debian_bullseye/do_build.sh b/docker_builds/debian_bullseye/do_build.sh index 31ab945d..f10ac046 100644 --- a/docker_builds/debian_bullseye/do_build.sh +++ b/docker_builds/debian_bullseye/do_build.sh @@ -4,7 +4,7 @@ cd /root # Install dependencies and tools apt update -apt install -y build-essential cmake git libfftw3-dev libglfw3-dev libvolk2-dev libsoapysdr-dev libairspyhf-dev libairspy-dev \ +apt install -y build-essential cmake git libfftw3-dev libglfw3-dev libvolk2-dev libzstd-dev libsoapysdr-dev libairspyhf-dev libairspy-dev \ libiio-dev libad9361-dev librtaudio-dev libhackrf-dev librtlsdr-dev libbladerf-dev liblimesuite-dev p7zip-full wget portaudio19-dev \ libcodec2-dev diff --git a/docker_builds/debian_buster/do_build.sh b/docker_builds/debian_buster/do_build.sh index 4e038a46..b750eb5b 100644 --- a/docker_builds/debian_buster/do_build.sh +++ b/docker_builds/debian_buster/do_build.sh @@ -4,7 +4,7 @@ cd /root # Install dependencies and tools apt update -apt install -y build-essential cmake git libfftw3-dev libglfw3-dev libvolk1-dev libsoapysdr-dev libairspyhf-dev libairspy-dev \ +apt install -y build-essential cmake git libfftw3-dev libglfw3-dev libvolk1-dev libzstd-dev libsoapysdr-dev libairspyhf-dev libairspy-dev \ libiio-dev libad9361-dev librtaudio-dev libhackrf-dev librtlsdr-dev libbladerf-dev liblimesuite-dev p7zip-full wget portaudio19-dev \ libcodec2-dev diff --git a/docker_builds/debian_sid/do_build.sh b/docker_builds/debian_sid/do_build.sh index 31ab945d..f10ac046 100644 --- a/docker_builds/debian_sid/do_build.sh +++ b/docker_builds/debian_sid/do_build.sh @@ -4,7 +4,7 @@ cd /root # Install dependencies and tools apt update -apt install -y build-essential cmake git libfftw3-dev libglfw3-dev libvolk2-dev libsoapysdr-dev libairspyhf-dev libairspy-dev \ +apt install -y build-essential cmake git libfftw3-dev libglfw3-dev libvolk2-dev libzstd-dev libsoapysdr-dev libairspyhf-dev libairspy-dev \ libiio-dev libad9361-dev librtaudio-dev libhackrf-dev librtlsdr-dev libbladerf-dev liblimesuite-dev p7zip-full wget portaudio19-dev \ libcodec2-dev diff --git a/docker_builds/raspios_bullseye/Dockerfile b/docker_builds/raspios_bullseye/Dockerfile deleted file mode 100644 index 46136559..00000000 --- a/docker_builds/raspios_bullseye/Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -FROM ubuntu:latest -ENV DEBIAN_FRONTEND=noninteractive -COPY do_build.sh /root -RUN chmod +x /root/do_build.sh \ No newline at end of file diff --git a/docker_builds/raspios_bullseye/do_build.sh b/docker_builds/raspios_bullseye/do_build.sh deleted file mode 100644 index 6ed599bb..00000000 --- a/docker_builds/raspios_bullseye/do_build.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -set -e -cd /root - -# Install tools -apt update -apt install -y wget p7zip-full qemu-user-static gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf build-essential cmake pkg-config - -# Download and extract raspberry pi image -wget https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2021-11-08/2021-10-30-raspios-bullseye-armhf-lite.zip -7z x 2021-10-30-raspios-bullseye-armhf-lite.zip -7z x 2021-10-30-raspios-bullseye-armhf-lite.img - -# Expand and mount rootfs image -dd if=/dev/zero bs=1G count=1 >> 1.img -e2fsck -p -f 1.img -resize2fs 1.img -mount 1.img /mnt - -# Copy qemu to the rootfs -cp /usr/bin/qemu-arm-static /mnt/bin/ - -# Inject script to install dependencies -echo 'export DEBIAN_FRONTEND=noninteractive' >> /mnt/root/prepare.sh -echo 'apt update --allow-releaseinfo-change' >> /mnt/root/prepare.sh -echo 'apt install -y build-essential cmake git libfftw3-dev libglfw3-dev libvolk2-dev libsoapysdr-dev libairspyhf-dev libairspy-dev \' >> /mnt/root/prepare.sh -echo ' libiio-dev libad9361-dev librtaudio-dev libhackrf-dev librtlsdr-dev libbladerf-dev liblimesuite-dev p7zip-full wget portaudio19-dev \' >> /mnt/root/prepare.sh -echo ' libcodec2-dev' >> /mnt/root/prepare.sh - -# Run prepare.sh script -chroot /mnt /bin/qemu-arm-static /bin/bash /root/prepare.sh - -# Setup environment variables -export PKG_CONFIG_PATH='' -export PKG_CONFIG_LIBDIR='/mnt/usr/lib/arm-linux-gnueabihf/pkgconfig:/mnt/usr/lib/pkgconfig:/mnt/usr/share/pkgconfig' -export PKG_CONFIG_SYSROOT_DIR='/mnt' - -# Build SDR++ -cd SDRPlusPlus -mkdir build -cd build -cmake .. -DCMAKE_TOOLCHAIN_FILE=../docker_builds/raspios_bullseye/rpi_toolchain.cmake -DOPT_BUILD_BLADERF_SOURCE=ON -DOPT_BUILD_LIMESDR_SOURCE=ON -DOPT_BUILD_NEW_PORTAUDIO_SINK=ON -DOPT_BUILD_M17_DECODER=ON -make VERBOSE=1 -j2 - -# Create deb -cd .. -sh make_debian_package.sh ./build 'libfftw3-dev, libglfw3-dev, libvolk2-dev, librtaudio-dev' -mv sdrpp_debian_amd64.deb sdrpp_raspios_arm32.deb \ No newline at end of file diff --git a/docker_builds/raspios_bullseye/rpi_toolchain.cmake b/docker_builds/raspios_bullseye/rpi_toolchain.cmake deleted file mode 100644 index d8b9ee35..00000000 --- a/docker_builds/raspios_bullseye/rpi_toolchain.cmake +++ /dev/null @@ -1,12 +0,0 @@ -set(CMAKE_SYSTEM_NAME Linux) -set(CMAKE_SYSTEM_PROCESSOR arm) - -set(CMAKE_SYSROOT /mnt) - -set(CMAKE_C_COMPILER /usr/bin/arm-linux-gnueabihf-gcc) -set(CMAKE_CXX_COMPILER /usr/bin/arm-linux-gnueabihf-g++) - -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) \ No newline at end of file diff --git a/docker_builds/ubuntu_bionic/do_build.sh b/docker_builds/ubuntu_bionic/do_build.sh index e2159697..062c0d7f 100644 --- a/docker_builds/ubuntu_bionic/do_build.sh +++ b/docker_builds/ubuntu_bionic/do_build.sh @@ -10,7 +10,7 @@ echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://ap apt update # Install dependencies and tools -apt install -y build-essential cmake git libfftw3-dev libglfw3-dev libvolk1-dev libsoapysdr-dev libairspy-dev \ +apt install -y build-essential cmake git libfftw3-dev libglfw3-dev libvolk1-dev libzstd-dev libsoapysdr-dev libairspy-dev \ libiio-dev libad9361-dev librtaudio-dev libhackrf-dev librtlsdr-dev libbladerf-dev liblimesuite-dev p7zip-full wget portaudio19-dev \ libcodec2-dev diff --git a/docker_builds/ubuntu_focal/do_build.sh b/docker_builds/ubuntu_focal/do_build.sh index 31ab945d..f10ac046 100644 --- a/docker_builds/ubuntu_focal/do_build.sh +++ b/docker_builds/ubuntu_focal/do_build.sh @@ -4,7 +4,7 @@ cd /root # Install dependencies and tools apt update -apt install -y build-essential cmake git libfftw3-dev libglfw3-dev libvolk2-dev libsoapysdr-dev libairspyhf-dev libairspy-dev \ +apt install -y build-essential cmake git libfftw3-dev libglfw3-dev libvolk2-dev libzstd-dev libsoapysdr-dev libairspyhf-dev libairspy-dev \ libiio-dev libad9361-dev librtaudio-dev libhackrf-dev librtlsdr-dev libbladerf-dev liblimesuite-dev p7zip-full wget portaudio19-dev \ libcodec2-dev diff --git a/docker_builds/ubuntu_hirsute/do_build.sh b/docker_builds/ubuntu_hirsute/do_build.sh index 31ab945d..f10ac046 100644 --- a/docker_builds/ubuntu_hirsute/do_build.sh +++ b/docker_builds/ubuntu_hirsute/do_build.sh @@ -4,7 +4,7 @@ cd /root # Install dependencies and tools apt update -apt install -y build-essential cmake git libfftw3-dev libglfw3-dev libvolk2-dev libsoapysdr-dev libairspyhf-dev libairspy-dev \ +apt install -y build-essential cmake git libfftw3-dev libglfw3-dev libvolk2-dev libzstd-dev libsoapysdr-dev libairspyhf-dev libairspy-dev \ libiio-dev libad9361-dev librtaudio-dev libhackrf-dev librtlsdr-dev libbladerf-dev liblimesuite-dev p7zip-full wget portaudio19-dev \ libcodec2-dev diff --git a/docker_builds/ubuntu_impish/do_build.sh b/docker_builds/ubuntu_impish/do_build.sh index 31ab945d..f10ac046 100644 --- a/docker_builds/ubuntu_impish/do_build.sh +++ b/docker_builds/ubuntu_impish/do_build.sh @@ -4,7 +4,7 @@ cd /root # Install dependencies and tools apt update -apt install -y build-essential cmake git libfftw3-dev libglfw3-dev libvolk2-dev libsoapysdr-dev libairspyhf-dev libairspy-dev \ +apt install -y build-essential cmake git libfftw3-dev libglfw3-dev libvolk2-dev libzstd-dev libsoapysdr-dev libairspyhf-dev libairspy-dev \ libiio-dev libad9361-dev librtaudio-dev libhackrf-dev librtlsdr-dev libbladerf-dev liblimesuite-dev p7zip-full wget portaudio19-dev \ libcodec2-dev diff --git a/source_modules/sdrpp_server_source/CMakeLists.txt b/source_modules/sdrpp_server_source/CMakeLists.txt index 09905371..477e6484 100644 --- a/source_modules/sdrpp_server_source/CMakeLists.txt +++ b/source_modules/sdrpp_server_source/CMakeLists.txt @@ -19,10 +19,6 @@ endif () if(WIN32) target_link_libraries(sdrpp_server_source PRIVATE wsock32 ws2_32) - - # ZSTD - find_package(zstd CONFIG REQUIRED) - target_link_libraries(sdrpp_server_source PRIVATE zstd::libzstd_shared) endif() # Install directives