diff options
author | Martin Braun <martin.braun@ettus.com> | 2015-11-16 15:21:42 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2015-11-16 15:21:44 -0800 |
commit | 3f1d0fb1bd597ea41d52828a9380fccdc06314bf (patch) | |
tree | 900cc1400470c3b4f2fc51d3af9de4c4dddd2d99 /host/lib/CMakeLists.txt | |
parent | 88b0baeaf6dfa5f62f99ad53680108183ccc8721 (diff) | |
download | uhd-3f1d0fb1bd597ea41d52828a9380fccdc06314bf.tar.gz uhd-3f1d0fb1bd597ea41d52828a9380fccdc06314bf.tar.bz2 uhd-3f1d0fb1bd597ea41d52828a9380fccdc06314bf.zip |
cmake: Register components earlier
All device-specific CMake components are now registered in one place,
before the host/lib/ subdirs are sourced. This way, there are no
cyclic dependencies.
This solves the issue where ENABLE_X300=Off could disable USB, but
preserves the fix where ENABLE_X300=Off would still build some X300
codes.
Diffstat (limited to 'host/lib/CMakeLists.txt')
-rw-r--r-- | host/lib/CMakeLists.txt | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt index 0822d8704..07775895d 100644 --- a/host/lib/CMakeLists.txt +++ b/host/lib/CMakeLists.txt @@ -65,15 +65,34 @@ MACRO(INCLUDE_SUBDIRECTORY subdir) ENDMACRO(INCLUDE_SUBDIRECTORY) ######################################################################## +# Register lower level components +######################################################################## +MESSAGE(STATUS "") +# Dependencies +FIND_PACKAGE(USB1) +FIND_PACKAGE(GPSD) +LIBUHD_REGISTER_COMPONENT("USB" ENABLE_USB ON "ENABLE_LIBUHD;LIBUSB_FOUND" OFF OFF) +LIBUHD_REGISTER_COMPONENT("GPSD" ENABLE_GPSD OFF "ENABLE_LIBUHD;ENABLE_GPSD;LIBGPS_FOUND" OFF OFF) +# Devices +LIBUHD_REGISTER_COMPONENT("B100" ENABLE_B100 ON "ENABLE_LIBUHD;ENABLE_USB" OFF OFF) +LIBUHD_REGISTER_COMPONENT("B200" ENABLE_B200 ON "ENABLE_LIBUHD;ENABLE_USB" OFF OFF) +LIBUHD_REGISTER_COMPONENT("E100" ENABLE_E100 OFF "ENABLE_LIBUHD;LINUX" OFF OFF) +LIBUHD_REGISTER_COMPONENT("E300" ENABLE_E300 OFF "ENABLE_LIBUHD" OFF OFF) +LIBUHD_REGISTER_COMPONENT("USRP1" ENABLE_USRP1 ON "ENABLE_LIBUHD;ENABLE_USB" OFF OFF) +LIBUHD_REGISTER_COMPONENT("USRP2" ENABLE_USRP2 ON "ENABLE_LIBUHD" OFF OFF) +LIBUHD_REGISTER_COMPONENT("X300" ENABLE_X300 ON "ENABLE_LIBUHD" OFF OFF) +LIBUHD_REGISTER_COMPONENT("OctoClock" ENABLE_OCTOCLOCK ON "ENABLE_LIBUHD" OFF OFF) + +######################################################################## # Include subdirectories (different than add) ######################################################################## INCLUDE_SUBDIRECTORY(ic_reg_maps) INCLUDE_SUBDIRECTORY(types) INCLUDE_SUBDIRECTORY(convert) +INCLUDE_SUBDIRECTORY(transport) INCLUDE_SUBDIRECTORY(usrp) INCLUDE_SUBDIRECTORY(usrp_clock) INCLUDE_SUBDIRECTORY(utils) -INCLUDE_SUBDIRECTORY(transport) ######################################################################## # Setup UHD_VERSION_STRING for version.cpp |