Skip to content

Commit

Permalink
Merge pull request #1786 from srcejon/fix_zlib_url
Browse files Browse the repository at this point in the history
Fix Mac compilation
  • Loading branch information
f4exb authored Aug 24, 2023
2 parents 028a44c + 36d1608 commit 2565a38
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 10 deletions.
27 changes: 19 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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(FFTW3F)
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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 <SOURCE_DIR>/configure --prefix=<INSTALL_DIR>
TEST_COMMAND ""
Expand Down
4 changes: 3 additions & 1 deletion plugins/feature/gs232controller/inputcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////

#include <cmath>

#ifdef QT_GAMEPAD_FOUND
#include <QGamepadManager>
#include "gamepadinputcontroller.h"
Expand All @@ -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
Expand Down

0 comments on commit 2565a38

Please sign in to comment.