diff --git a/src/algorithms/signal_source/adapters/CMakeLists.txt b/src/algorithms/signal_source/adapters/CMakeLists.txt index c279601dd..de887cf10 100644 --- a/src/algorithms/signal_source/adapters/CMakeLists.txt +++ b/src/algorithms/signal_source/adapters/CMakeLists.txt @@ -189,6 +189,16 @@ if(ENABLE_AD9361 AND LIBIIO_FOUND) ) endif() +if(ENABLE_AD9361 OR ENABLE_FMCOMMS2 OR ENABLE_PLUTOSDR) + if(LIBAD9361_VERSION) + if(LIBAD9361_VERSION VERSION_GREATER 0.1) + target_compile_definitions(signal_source_adapters + PUBLIC -DLIBAD9361_VERSION_GREATER_THAN_01=1 + ) + endif() + endif() +endif() + if(ENABLE_FLEXIBAND AND TELEORBIT_FOUND) target_link_libraries(signal_source_adapters PRIVATE diff --git a/src/algorithms/signal_source/adapters/fmcomms2_signal_source.cc b/src/algorithms/signal_source/adapters/fmcomms2_signal_source.cc index 1d7a3f579..e251d5a26 100644 --- a/src/algorithms/signal_source/adapters/fmcomms2_signal_source.cc +++ b/src/algorithms/signal_source/adapters/fmcomms2_signal_source.cc @@ -133,7 +133,9 @@ Fmcomms2SignalSource::Fmcomms2SignalSource(ConfigurationInterface* configuration std::cout << " Off: Disable filter" << std::endl; std::cout << " Auto: Use auto-generated filters" << std::endl; std::cout << " File: User-provided filter in filter_filename parameter" << std::endl; +#if LIBAD9361_VERSION_GREATER_THAN_01 std::cout << " Design: Create filter from Fpass, Fstop, sampling_frequency and bandwidth parameters" << std::endl; +#endif std::cout << "Error: provided value filter_source=" << filter_source_ << " is not among valid values" << std::endl; std::cout << " This parameter has been set to its default value filter_source=Off" << std::endl; filter_source_ = std::string("Off"); diff --git a/src/algorithms/signal_source/adapters/plutosdr_signal_source.cc b/src/algorithms/signal_source/adapters/plutosdr_signal_source.cc index 6d30aac99..679481146 100644 --- a/src/algorithms/signal_source/adapters/plutosdr_signal_source.cc +++ b/src/algorithms/signal_source/adapters/plutosdr_signal_source.cc @@ -107,7 +107,9 @@ PlutosdrSignalSource::PlutosdrSignalSource(ConfigurationInterface* configuration std::cout << " Off: Disable filter" << std::endl; std::cout << " Auto: Use auto-generated filters" << std::endl; std::cout << " File: User-provided filter in filter_filename parameter" << std::endl; +#if LIBAD9361_VERSION_GREATER_THAN_01 std::cout << " Design: Create filter from Fpass, Fstop, sampling_frequency and bandwidth parameters" << std::endl; +#endif std::cout << "Error: provided value filter_source=" << filter_source_ << " is not among valid values" << std::endl; std::cout << " This parameter has been set to its default value filter_source=Off" << std::endl; filter_source_ = std::string("Off");