diff --git a/CMakeLists.txt b/CMakeLists.txt index f6664d492..a63e489d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,6 +54,13 @@ endif() set(QT_USE_QTOPENGL TRUE) set(CMAKE_AUTOMOC ON) +if(APPLE AND EXISTS /usr/local/opt/qt5) + # Homebrew installs Qt5 (up to at least 5.9.1) in + # /usr/local/qt5, ensure it can be found by CMake since + # it is not in the default /usr/local prefix. + list(APPEND CMAKE_PREFIX_PATH "/usr/local/opt/qt5") +endif() + #find_package(Qt4 REQUIRED) find_package(Qt5Core 5.0 REQUIRED) find_package(Qt5Widgets 5.0 REQUIRED) diff --git a/libfreedv/CMakeLists.txt b/libfreedv/CMakeLists.txt index b37d83158..d3bc10ad1 100644 --- a/libfreedv/CMakeLists.txt +++ b/libfreedv/CMakeLists.txt @@ -1,5 +1,7 @@ project(freedv) +set(CMAKE_CXX_STANDARD 11) + set(freedv_SOURCES codec2_fft.cpp cohpsk.cpp @@ -80,4 +82,4 @@ target_link_libraries(freedv ${CODEC2_LIBRARIES} ) -install(TARGETS freedv DESTINATION lib) \ No newline at end of file +install(TARGETS freedv DESTINATION lib) diff --git a/libfreedv/freedv_filter.cpp b/libfreedv/freedv_filter.cpp index 8f10b13a3..0070b497b 100644 --- a/libfreedv/freedv_filter.cpp +++ b/libfreedv/freedv_filter.cpp @@ -25,7 +25,7 @@ #include "fdv_arm_math.h" -#define cmplx(value) (std::complex{cosf(value), sinf(value)}) +#define cmplx(value) (COSF(value) + SINF(value) * std::complex(0.0f, 1.0f)) namespace FreeDV { diff --git a/libfreedv/freedv_vhf_framing.h b/libfreedv/freedv_vhf_framing.h index 6f7dc3604..3f08cbb2e 100644 --- a/libfreedv/freedv_vhf_framing.h +++ b/libfreedv/freedv_vhf_framing.h @@ -36,6 +36,7 @@ #ifndef _FREEDV_VHF_FRAMING_H #define _FREEDV_VHF_FRAMING_H +#include #include "freedv_data_channel.h" /* Standard frame type */ diff --git a/libfreedv/ofdm_internal.h b/libfreedv/ofdm_internal.h index e9775f379..50963d1ad 100644 --- a/libfreedv/ofdm_internal.h +++ b/libfreedv/ofdm_internal.h @@ -41,7 +41,7 @@ #endif #define TAU (2.0f * M_PI) -#define ROT45 (M_PI / 4.0f) +#define ROT45 float(M_PI / 4.0f) #define cmplx(value) (std::complex{cosf(value), sinf(value)}) #define cmplxconj(value) (std::complex{cosf(value), -sinf(value)})