From 752774dc700bac6b2d2f4a6db53269b15b82b195 Mon Sep 17 00:00:00 2001 From: Aaron Rossetto Date: Tue, 15 Jun 2021 08:27:25 -0500 Subject: uhd: x400: Honor ENABLE_X400 component flag Don't add X400-related sources to libuhd if they are not requested. --- host/lib/usrp/x400/CMakeLists.txt | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/host/lib/usrp/x400/CMakeLists.txt b/host/lib/usrp/x400/CMakeLists.txt index b3efe3b60..3586d3a35 100644 --- a/host/lib/usrp/x400/CMakeLists.txt +++ b/host/lib/usrp/x400/CMakeLists.txt @@ -8,13 +8,18 @@ # This file included, use CMake directory variables ######################################################################## -LIBUHD_APPEND_SOURCES( - ${CMAKE_CURRENT_SOURCE_DIR}/adc_self_calibration.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/x400_radio_control.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/x400_rfdc_control.cpp -) +######################################################################## +# Conditionally configure the X400 support +######################################################################## +if(ENABLE_X400) + LIBUHD_APPEND_SOURCES( + ${CMAKE_CURRENT_SOURCE_DIR}/adc_self_calibration.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/x400_radio_control.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/x400_rfdc_control.cpp + ) -if(ENABLE_DPDK) - include_directories(${DPDK_INCLUDE_DIRS}) - add_definitions(-DHAVE_DPDK) -endif(ENABLE_DPDK) + if(ENABLE_DPDK) + include_directories(${DPDK_INCLUDE_DIRS}) + add_definitions(-DHAVE_DPDK) + endif(ENABLE_DPDK) +endif(ENABLE_X400) -- cgit v1.2.3