From fda32422f39bce8d0e9d351cec5026584e3e6b83 Mon Sep 17 00:00:00 2001 From: Josh Bailey Date: Tue, 2 Apr 2024 21:14:25 +0000 Subject: [PATCH] Add SigMF as a dependency. --- bin/build.sh | 22 ++++++++++++++++++++-- bin/install-deps.sh | 4 +++- lib/CMakeLists.txt | 2 ++ lib/uhd_sample_recorder.cpp | 3 +-- 4 files changed, 26 insertions(+), 5 deletions(-) diff --git a/bin/build.sh b/bin/build.sh index 72d4324..a6c3dd3 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -1,4 +1,22 @@ #!/bin/bash set -e -cd VkFFT && mkdir build && cd build && CMAKE_BUILD_TYPE=Release cmake -DGLSLANG_GIT_TAG=13.0.0 .. && make -j $(nproc) && cd ../.. && \ - mkdir build && cd build && cmake ../lib && make -j $(nproc) && cd .. +cd VkFFT && mkdir build && cd build && CMAKE_BUILD_TYPE=Release cmake -DGLSLANG_GIT_TAG=13.0.0 .. && make -j $(nproc) && cd ../.. +mkdir -p flatbuffers/build +cd flatbuffers/build +cmake .. +make -j $(nproc) +sudo make install +cd ../.. +mkdir -p json/build +cd json/build +cmake .. +make -j $(nproc) +sudo make install +cd ../.. +mkdir -p libsigmf/build +cd libsigmf/build +cmake -DUSE_SYSTEM_JSON=ON -DUSE_SYSTEM_FLATBUFFERS=ON .. +make -j $(nproc) +sudo make install +cd ../.. +mkdir build && cd build && cmake ../lib && make -j $(nproc) && cd .. diff --git a/bin/install-deps.sh b/bin/install-deps.sh index 866cf26..e06d8f7 100755 --- a/bin/install-deps.sh +++ b/bin/install-deps.sh @@ -13,5 +13,7 @@ sudo apt-get update && sudo apt-get install -qy \ wget \ && \ wget https://sourceforge.net/projects/sigpack/files/sigpack-1.2.7.zip -O sigpack.zip && unzip sigpack.zip && ln -s sigpack-*/sigpack . && \ - wget https://github.com/nlohmann/json/releases/download/v3.11.2/json.hpp && \ + git clone https://github.com/google/flatbuffers -b v23.5.26 && \ + git clone https://github.com/nlohmann/json -b v3.11.2 && \ + git clone https://github.com/deepsig/libsigmf -b v1.0.2 && \ git clone https://github.com/DTolm/VkFFT -b v1.3.4 diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 9208e30..f76adc2 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -10,6 +10,8 @@ include(CTest) find_package(Vulkan REQUIRED) find_package(Armadillo REQUIRED) find_package(UHD 3.15.0 REQUIRED) +find_package(nlohmann_json 3.11.2 REQUIRED) + find_package( Boost ${Boost_Version} COMPONENTS filesystem iostreams thread unit_test_framework program_options diff --git a/lib/uhd_sample_recorder.cpp b/lib/uhd_sample_recorder.cpp index 09caa52..ed420e5 100644 --- a/lib/uhd_sample_recorder.cpp +++ b/lib/uhd_sample_recorder.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -12,8 +13,6 @@ #include #include -#include "json.hpp" - #include "sample_pipeline.h" #include "sample_writer.h"