aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/CMakeLists.txt
diff options
context:
space:
mode:
authorMatt Ettus <matt@ettus.com>2010-03-08 16:13:49 -0800
committerMatt Ettus <matt@ettus.com>2010-03-08 16:13:49 -0800
commitf6582b27c129aac9ea6991a6a5c7e1f5a17cd7a6 (patch)
tree3b5efb8a42f3898a3773c798befd812b015d84d9 /host/lib/CMakeLists.txt
parente273ea92d83d46ca350ac07e3d836a4d99b106c2 (diff)
parent1b965831ae7588c7879d84de4e5fbd78ca614761 (diff)
downloaduhd-f6582b27c129aac9ea6991a6a5c7e1f5a17cd7a6.tar.gz
uhd-f6582b27c129aac9ea6991a6a5c7e1f5a17cd7a6.tar.bz2
uhd-f6582b27c129aac9ea6991a6a5c7e1f5a17cd7a6.zip
Merge branch 'u1e_uhd' of ettus.sourcerepo.com:ettus/uhd into u1e_uhd
Diffstat (limited to 'host/lib/CMakeLists.txt')
-rw-r--r--host/lib/CMakeLists.txt35
1 files changed, 33 insertions, 2 deletions
diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt
index 5cf334678..33314e729 100644
--- a/host/lib/CMakeLists.txt
+++ b/host/lib/CMakeLists.txt
@@ -15,12 +15,13 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-
+########################################################################
+# Create a list of libuhd sources
+########################################################################
SET(libuhd_sources
device.cpp
device_addr.cpp
gain_handler.cpp
- shared_iovec.cpp
uhd.cpp
wax.cpp
transport/udp.cpp
@@ -32,10 +33,40 @@ SET(libuhd_sources
usrp/usrp2/dboard_impl.cpp
usrp/usrp2/dboard_interface.cpp
usrp/usrp2/dsp_impl.cpp
+ usrp/usrp2/io_impl.cpp
usrp/usrp2/mboard_impl.cpp
usrp/usrp2/usrp2_impl.cpp
)
+########################################################################
+# Conditionally add the usrp1e sources
+########################################################################
+INCLUDE(CheckIncludeFiles)
+SET(usrp1e_required_headers
+ linux/ioctl.h
+ linux/spi/spidev.h
+)
+CHECK_INCLUDE_FILES(
+ "${usrp1e_required_headers}"
+ HAS_USRP1E_REQUIRED_HEADERS
+)
+
+IF(HAS_USRP1E_REQUIRED_HEADERS)
+ MESSAGE(STATUS "Building usrp1e support...")
+ LIST(APPEND libuhd_sources
+ usrp/usrp1e/fpga-downloader.cc
+ usrp/usrp1e/usrp1e_impl.cpp
+ )
+ELSE(HAS_USRP1E_REQUIRED_HEADERS)
+ MESSAGE(STATUS "Skipping usrp1e support...")
+ LIST(APPEND libuhd_sources
+ usrp/usrp1e/usrp1e_none.cpp
+ )
+ENDIF(HAS_USRP1E_REQUIRED_HEADERS)
+
+########################################################################
+# Setup libuhd library
+########################################################################
ADD_LIBRARY(uhd SHARED ${libuhd_sources})
TARGET_LINK_LIBRARIES(uhd ${Boost_LIBRARIES})