From b396a190deeec12b82fa139c6da6e57cf30f1263 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sat, 21 Nov 2020 12:16:49 +0100 Subject: [PATCH] Implement SigMF support only when compiled with GCC (libsigmf dependency). Implements #712 --- CMakeLists.txt | 4 ++-- plugins/channelrx/CMakeLists.txt | 4 ++-- plugins/samplesource/CMakeLists.txt | 2 +- sdrbase/CMakeLists.txt | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9169ff403..f9dffafc5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -323,9 +323,9 @@ find_package(LibUSB REQUIRED) # used by so many packages find_package(OpenCV OPTIONAL_COMPONENTS core highgui imgproc imgcodecs videoio) # channeltx/modatv find_package(LibSigMF) # SigMF recording files support -if (LIBSIGMF_FOUND) +if (LIBSIGMF_FOUND AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") add_definitions(-DHAS_LIBSIGMF) -endif (LIBSIGMF_FOUND) +endif() # macOS compatibility if(APPLE) diff --git a/plugins/channelrx/CMakeLists.txt b/plugins/channelrx/CMakeLists.txt index 9a87b3031..4094cc374 100644 --- a/plugins/channelrx/CMakeLists.txt +++ b/plugins/channelrx/CMakeLists.txt @@ -26,9 +26,9 @@ if (CODEC2_FOUND) add_subdirectory(demodfreedv) endif(CODEC2_FOUND) -if (LIBSIGMF_FOUND) +if (LIBSIGMF_FOUND AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") add_subdirectory(sigmffilesink) -endif(LIBSIGMF_FOUND) +endif() if(NOT SERVER_MODE) add_subdirectory(chanalyzer) diff --git a/plugins/samplesource/CMakeLists.txt b/plugins/samplesource/CMakeLists.txt index 6c506f97f..8d7bf3cf6 100644 --- a/plugins/samplesource/CMakeLists.txt +++ b/plugins/samplesource/CMakeLists.txt @@ -58,7 +58,7 @@ if(ENABLE_SOAPYSDR AND SOAPYSDR_FOUND) add_subdirectory(soapysdrinput) endif() -if(LIBSIGMF_FOUND) +if(LIBSIGMF_FOUND AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") add_subdirectory(sigmffileinput) endif() diff --git a/sdrbase/CMakeLists.txt b/sdrbase/CMakeLists.txt index 93fe2a50a..8837ef993 100644 --- a/sdrbase/CMakeLists.txt +++ b/sdrbase/CMakeLists.txt @@ -44,7 +44,7 @@ if (LIMESUITE_FOUND) set(sdrbase_LIMERFE_LIB ${LIMESUITE_LIBRARY}) endif (LIMESUITE_FOUND) -if (LIBSIGMF_FOUND) +if (LIBSIGMF_FOUND AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set(sdrbase_SOURCES ${sdrbase_SOURCES} dsp/sigmffilerecord.cpp @@ -56,7 +56,7 @@ if (LIBSIGMF_FOUND) ) include_directories(${LIBSIGMF_INCLUDE_DIR}) set(sdrbase_LIBSIGMF_LIB ${LIBSIGMF_LIBRARIES}) -endif (LIBSIGMF_FOUND) +endif() # serialdv now required add_definitions(-DDSD_USE_SERIALDV)