From 9567e95e33f440003adac86200bbf1e458f6e13f Mon Sep 17 00:00:00 2001 From: Marc Majoral Date: Fri, 19 Jul 2024 10:11:44 +0200 Subject: [PATCH] Adjust cross-compilation flags to properly support FPGA signal sources --- CMakeLists.txt | 6 ++++++ src/algorithms/signal_source/adapters/CMakeLists.txt | 2 +- src/algorithms/signal_source/libs/CMakeLists.txt | 2 +- src/core/libs/CMakeLists.txt | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dc0d2b2f4..38dda0390 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3348,6 +3348,12 @@ if(ENABLE_AD9361 OR ENABLE_FMCOMMS2) endif() endif() +############################################## +# Check FPGA-related signal sources +############################################## +if((ENABLE_AD9361 OR ENABLE_FPGA_MAX2771_EVKIT) AND NOT ENABLE_FPGA) + message(FATAL_ERROR "ENABLE_AD9361 and ENABLE_FPGA_MAX2771_EVKIT can only be set when ENABLE_FPGA is also set.") +endif() ############################################## diff --git a/src/algorithms/signal_source/adapters/CMakeLists.txt b/src/algorithms/signal_source/adapters/CMakeLists.txt index ce9629ea0..4b246c7b1 100644 --- a/src/algorithms/signal_source/adapters/CMakeLists.txt +++ b/src/algorithms/signal_source/adapters/CMakeLists.txt @@ -167,7 +167,7 @@ target_include_directories(signal_source_adapters ${GNSSSDR_SOURCE_DIR}/src/core/interfaces ) -if(ENABLE_FPGA OR ENABLE_AD9361 OR ENABLE_FPGA_MAX2771_EVKIT) +if(ENABLE_FPGA) target_link_libraries(signal_source_adapters PUBLIC signal_source_libs diff --git a/src/algorithms/signal_source/libs/CMakeLists.txt b/src/algorithms/signal_source/libs/CMakeLists.txt index 2d28981a4..0e02ec084 100644 --- a/src/algorithms/signal_source/libs/CMakeLists.txt +++ b/src/algorithms/signal_source/libs/CMakeLists.txt @@ -120,7 +120,7 @@ if(ENABLE_FMCOMMS2 OR ENABLE_AD9361 OR ENABLE_PLUTOSDR) endif() endif() -if(ENABLE_FPGA OR ENABLE_AD9361) +if(ENABLE_FPGA) target_link_libraries(signal_source_libs PUBLIC algorithms_libs diff --git a/src/core/libs/CMakeLists.txt b/src/core/libs/CMakeLists.txt index 7b4f4f703..fb8230fdc 100644 --- a/src/core/libs/CMakeLists.txt +++ b/src/core/libs/CMakeLists.txt @@ -52,7 +52,7 @@ if(ENABLE_FPGA) ) endif() -if(ENABLE_FPGA OR ENABLE_AD9361) +if(ENABLE_FPGA) set(CORE_LIBS_SOURCES ${CORE_LIBS_SOURCES} uio_fpga.cc