diff options
author | Alex Williams <alex.williams@ni.com> | 2018-04-17 10:36:59 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-04-18 15:34:51 -0700 |
commit | 7dcd16f5a6980cb1183bf1a10812c952d92c4ddb (patch) | |
tree | d1eaa9bdca563fe1f17886d771e16ff65ed153c7 /mpm/CMakeLists.txt | |
parent | e733e590c4b5aa3053af0681bef199d27e4b2d7a (diff) | |
download | uhd-7dcd16f5a6980cb1183bf1a10812c952d92c4ddb.tar.gz uhd-7dcd16f5a6980cb1183bf1a10812c952d92c4ddb.tar.bz2 uhd-7dcd16f5a6980cb1183bf1a10812c952d92c4ddb.zip |
mpm: Use configurable components for build system
For a minimal build, default to off for components unless the MPM_DEVICE
or the user requests it specifically.
Diffstat (limited to 'mpm/CMakeLists.txt')
-rw-r--r-- | mpm/CMakeLists.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mpm/CMakeLists.txt b/mpm/CMakeLists.txt index b9afd70be..1270aa719 100644 --- a/mpm/CMakeLists.txt +++ b/mpm/CMakeLists.txt @@ -36,6 +36,8 @@ INCLUDE(MPMVersion) ######################################################################## # useful macros ######################################################################## +INCLUDE(MPMComponent) # enable components + MACRO(USRP_PERIPHS_APPEND_SOURCES) SET(usrp_periphs_sources ${usrp_periphs_sources} PARENT_SCOPE) LIST(APPEND usrp_periphs_sources ${ARGV}) @@ -134,6 +136,16 @@ if(mpm_device_check EQUAL -1) Specify -DMPM_DEVICE=<device> on the command line or set MPM_DEVICE using a CMake GUI.") endif() +# Request required components for MPM_DEVICE +IF(MPM_DEVICE STREQUAL "n3xx") + SET(ENABLE_MYKONOS ON) + SET(ENABLE_MAGNESIUM ON) +ENDIF() + +MPM_REGISTER_COMPONENT("LibMPM" ENABLE_LIBMPM ON "Boost_FOUND" OFF ON) +MPM_REGISTER_COMPONENT("Mykonos" ENABLE_MYKONOS ON "ENABLE_LIBMPM" OFF OFF) +MPM_REGISTER_COMPONENT("Magnesium" ENABLE_MAGNESIUM ON "ENABLE_MYKONOS" OFF OFF) + ADD_SUBDIRECTORY(include) INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/include |