From d8108e93e18c51a6a978ef5c9c853f9a66454a55 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Tue, 22 Aug 2023 16:53:34 +0100 Subject: [PATCH 1/4] Use current version of zlib, as old tar balls get removed --- external/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 72092ac64..99bcd7f4a 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -269,7 +269,7 @@ endif (NOT OPUS_FOUND AND NOT USE_PRECOMPILED_LIBS) if (NOT ZLIB_FOUND AND NOT USE_PRECOMPILED_LIBS) ExternalProject_Add(zlib - URL https://zlib.net/zlib-1.2.13.tar.gz + URL https://zlib.net/current/zlib.tar.gz PREFIX "${EXTERNAL_BUILD_LIBRARIES}/zlib" CONFIGURE_COMMAND /configure --prefix= TEST_COMMAND "" From 47359f3c12a89d07910a99bb0531ff9cee7b5302 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Wed, 23 Aug 2023 09:56:08 +0100 Subject: [PATCH 2/4] Fix SDRplay on Mac. Fix ENABLE_EXTERNAL_LIBRARIES=AUTO build on Mac. --- CMakeLists.txt | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2039e8062..cfa85b267 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -719,12 +719,21 @@ endif() # When ENABLE_EXTERNAL_LIBRARIES is AUTO, we only build 3rd party libraries that aren't already available # When ENABLE_EXTERNAL_LIBRARIES is OFF, we only use prebuilt libraries -if (NOT ENABLE_EXTERNAL_LIBRARIES OR (ENABLE_EXTERNAL_LIBRARIES STREQUAL "AUTO")) +if (NOT ENABLE_EXTERNAL_LIBRARIES) find_package(Boost REQUIRED) find_package(FFTW3F REQUIRED) if(NOT ANDROID) - find_package(LibUSB REQUIRED) # used by so many packages + find_package(LibUSB REQUIRED) endif() +elseif(ENABLE_EXTERNAL_LIBRARIES STREQUAL "AUTO") + find_package(Boost) + find_package(FFTW3T) + if(NOT ANDROID) + find_package(LibUSB) + endif() +endif() + +if (NOT ENABLE_EXTERNAL_LIBRARIES OR (ENABLE_EXTERNAL_LIBRARIES STREQUAL "AUTO")) find_package(OpenCV OPTIONAL_COMPONENTS core highgui imgproc imgcodecs videoio) # channeltx/modatv find_package(LibSigMF) # SigMF recording files support find_package(ZLIB) # For DAB @@ -770,20 +779,22 @@ if (NOT ENABLE_EXTERNAL_LIBRARIES OR (ENABLE_EXTERNAL_LIBRARIES STREQUAL "AUTO") if(ENABLE_RTLSDR) find_package(LibRTLSDR) endif() - if(ENABLE_SDRPLAY) - find_package(SDRplay) - endif() if(ENABLE_SOAPYSDR) find_package(SoapySDR) endif() - if(ENABLE_XTRX) - find_package(LibXTRX) - endif() if(ENABLE_USRP) find_package(UHD) endif() endif() +# The following devices can't yet be built by external/CMakeLists.txt, so always call find_package +if(ENABLE_SDRPLAY) + find_package(SDRplay) +endif() +if(ENABLE_XTRX) + find_package(LibXTRX) +endif() + if(ENABLE_EXTERNAL_LIBRARIES) add_subdirectory(external) find_package(Boost REQUIRED) From fa33270c55d728ae28044350ffaff9f549ba7cf2 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Wed, 23 Aug 2023 10:14:45 +0100 Subject: [PATCH 3/4] Fix Mac compilation --- plugins/feature/gs232controller/inputcontroller.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/feature/gs232controller/inputcontroller.cpp b/plugins/feature/gs232controller/inputcontroller.cpp index d9b8cf891..4e60d6014 100644 --- a/plugins/feature/gs232controller/inputcontroller.cpp +++ b/plugins/feature/gs232controller/inputcontroller.cpp @@ -15,6 +15,8 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// +#include + #ifdef QT_GAMEPAD_FOUND #include #include "gamepadinputcontroller.h" @@ -25,7 +27,7 @@ double InputController::getAxisCalibratedValue(int axis, InputControllerSettings *settings, bool highSensitvity) { double value = getAxisValue(axis); - double absValue = abs(value); + double absValue = std::abs(value); double l = settings->m_deadzone[axis] / 100.0; if (absValue < l) { // Set to 0 if in deadzone From 36d16085b555df4ab5a4e7cd6135b4372d9cd688 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Wed, 23 Aug 2023 11:53:22 +0100 Subject: [PATCH 4/4] Fix typo --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cfa85b267..457247ed0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -727,7 +727,7 @@ if (NOT ENABLE_EXTERNAL_LIBRARIES) endif() elseif(ENABLE_EXTERNAL_LIBRARIES STREQUAL "AUTO") find_package(Boost) - find_package(FFTW3T) + find_package(FFTW3F) if(NOT ANDROID) find_package(LibUSB) endif()