From 121504eeb3c7765fd24dc4adac888df151d2c61b Mon Sep 17 00:00:00 2001 From: Davide Gerhard Date: Fri, 19 Apr 2019 08:30:48 +0200 Subject: [PATCH 1/3] enable fcdpro/fcdproplus on macOS; remove asound dependency asound is not needed; now it uses qt audio --- plugins/samplesource/CMakeLists.txt | 4 ++-- plugins/samplesource/fcdpro/CMakeLists.txt | 1 - plugins/samplesource/fcdproplus/CMakeLists.txt | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/samplesource/CMakeLists.txt b/plugins/samplesource/CMakeLists.txt index 215a7089c..59bb80006 100644 --- a/plugins/samplesource/CMakeLists.txt +++ b/plugins/samplesource/CMakeLists.txt @@ -29,10 +29,10 @@ if(LIBUSB_FOUND AND LIBBLADERF_FOUND) add_subdirectory(bladerf2input) endif(LIBUSB_FOUND AND LIBBLADERF_FOUND) -if(LIBUSB_FOUND AND NOT APPLE) +if(LIBUSB_FOUND) add_subdirectory(fcdpro) add_subdirectory(fcdproplus) -endif(LIBUSB_FOUND AND NOT APPLE) +endif(LIBUSB_FOUND) find_package(LibHACKRF) if(LIBUSB_FOUND AND LIBHACKRF_FOUND) diff --git a/plugins/samplesource/fcdpro/CMakeLists.txt b/plugins/samplesource/fcdpro/CMakeLists.txt index a3270955f..bf6a758cc 100644 --- a/plugins/samplesource/fcdpro/CMakeLists.txt +++ b/plugins/samplesource/fcdpro/CMakeLists.txt @@ -46,7 +46,6 @@ add_library(inputfcdpro SHARED target_link_libraries(inputfcdpro ${QT_LIBRARIES} - asound fcdhid fcdlib sdrbase diff --git a/plugins/samplesource/fcdproplus/CMakeLists.txt b/plugins/samplesource/fcdproplus/CMakeLists.txt index 0b94f9658..c1a348138 100644 --- a/plugins/samplesource/fcdproplus/CMakeLists.txt +++ b/plugins/samplesource/fcdproplus/CMakeLists.txt @@ -25,7 +25,7 @@ set(fcdproplus_FORMS include_directories( . ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client + ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client ${CMAKE_SOURCE_DIR}/fcdhid ${CMAKE_SOURCE_DIR}/fcdlib ) @@ -46,7 +46,6 @@ add_library(inputfcdproplus SHARED target_link_libraries(inputfcdproplus ${QT_LIBRARIES} - asound fcdhid fcdlib sdrbase From a53755589efbb34b3f3ad690872cea40c56ebcad Mon Sep 17 00:00:00 2001 From: Davide Gerhard Date: Fri, 19 Apr 2019 08:32:44 +0200 Subject: [PATCH 2/3] perseus: fix build error descr->firmware_downloaded is private and require perseus-in.h that is not installed by libperseus-sdr; see] https://github.com/Microtelecom/libperseus-sdr/blob/e390356c86e91c7972af8a64fe23e4cf681752d7/Makefile.am line 44 /Users/rainbow/tmp/my/sdrangel/devices/perseus/deviceperseusscan.cpp:45:18: error: member access into incomplete type 'perseus_descr' (aka 'perseus_descr_ds') if (descr->firmware_downloaded) --- devices/perseus/deviceperseusscan.cpp | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/devices/perseus/deviceperseusscan.cpp b/devices/perseus/deviceperseusscan.cpp index 6ae24d97f..c74412b0e 100644 --- a/devices/perseus/deviceperseusscan.cpp +++ b/devices/perseus/deviceperseusscan.cpp @@ -29,33 +29,24 @@ bool DevicePerseusScan::scan(int nbDevices) return true; } - bool done = true; + bool done = true; perseus_descr *descr; eeprom_prodid prodid; for (int deviceIndex = 0; deviceIndex < nbDevices; deviceIndex++) { - if ((descr = perseus_open(deviceIndex)) == 0) + if ((descr = perseus_open(deviceIndex)) == 0) { - qCritical("DevicePerseusScan::scan: device #%d open error: %s", deviceIndex, perseus_errorstr()); - perseus_close(descr); - continue; - } - - if (descr->firmware_downloaded) - { - qDebug("DevicePerseusScan::scan: device #%d firmware is already downloaded", deviceIndex); - } - else - { - qDebug("DevicePerseusScan::scan: device #%d firmware is not yet downloaded", deviceIndex); - done = false; - } + qCritical("DevicePerseusScan::scan: device #%d open error: %s", deviceIndex, perseus_errorstr()); + perseus_close(descr); + continue; + } if (perseus_firmware_download(descr, 0) < 0) { qCritical("DevicePerseusScan::scan: device #%d firmware download error: %s", deviceIndex, perseus_errorstr()); perseus_close(descr); + done = false; continue; } else From ea67d2c80b1431fc9af80a7ce282bfdf726f9261 Mon Sep 17 00:00:00 2001 From: Davide Gerhard Date: Fri, 19 Apr 2019 08:50:43 +0200 Subject: [PATCH 3/3] remove CMP0043 --- CMakeLists.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b2708e400..36d486544 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,4 @@ cmake_minimum_required(VERSION 3.1.0) -cmake_policy(SET CMP0043 OLD) if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9") message(FATAL_ERROR "SDRangel requires GCC version 4.9 or higher!") @@ -425,9 +424,7 @@ target_link_libraries(sdrangel if(WIN32) set_target_properties(sdrangel PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE") - set_target_properties(sdrangel PROPERTIES COMPILE_DEFINITIONS_DEBUG "_CONSOLE") set_target_properties(sdrangel PROPERTIES LINK_FLAGS_RELWITHDEBINFO "/SUBSYSTEM:CONSOLE") - set_target_properties(sdrangel PROPERTIES COMPILE_DEFINITIONS_RELWITHDEBINFO "_CONSOLE") set_target_properties(sdrangel PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:windows /ENTRY:mainCRTStartup") set_target_properties(sdrangel PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:windows /ENTRY:mainCRTStartup") endif(WIN32)