aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/CMakeLists.txt')
-rw-r--r--host/lib/CMakeLists.txt30
1 files changed, 28 insertions, 2 deletions
diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt
index a5345cae4..3dfd54312 100644
--- a/host/lib/CMakeLists.txt
+++ b/host/lib/CMakeLists.txt
@@ -51,9 +51,35 @@ LIST(APPEND libuhd_sources
########################################################################
# Conditionally add the usrp1e sources
########################################################################
-LIST(APPEND libuhd_sources
- usrp/usrp1e/usrp1e_none.cpp
+MESSAGE(STATUS "Configuring usrp-e support...")
+
+INCLUDE(CheckIncludeFiles)
+SET(usrp_e_required_headers
+ linux/ioctl.h
+ linux/spi/spidev.h
+ linux/usrp_e.h
)
+CHECK_INCLUDE_FILES(
+ "${usrp_e_required_headers}"
+ HAVE_USRP_E_REQUIRED_HEADERS
+)
+
+IF(HAVE_USRP_E_REQUIRED_HEADERS)
+ MESSAGE(STATUS " Building usrp-e support.")
+ LIST(APPEND libuhd_sources
+ usrp/usrp_e/dboard_impl.cpp
+ usrp/usrp_e/dboard_interface.cpp
+ usrp/usrp_e/dsp_impl.cpp
+ usrp/usrp_e/fpga-downloader.cc
+ usrp/usrp_e/mboard_impl.cpp
+ usrp/usrp_e/usrp_e_impl.cpp
+ )
+ELSE(HAVE_USRP_E_REQUIRED_HEADERS)
+ MESSAGE(STATUS " Skipping usrp-e support.")
+ LIST(APPEND libuhd_sources
+ usrp/usrp_e/usrp_e_none.cpp
+ )
+ENDIF(HAVE_USRP_E_REQUIRED_HEADERS)
########################################################################
# Setup defines for module loading