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.txt40
1 files changed, 40 insertions, 0 deletions
diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt
index e4de7bcc7..3a6860b93 100644
--- a/host/lib/CMakeLists.txt
+++ b/host/lib/CMakeLists.txt
@@ -61,6 +61,25 @@ MACRO(LIBUHD_PYTHON_GEN_SOURCE pyfile outfile)
LIBUHD_APPEND_SOURCES(${outfile})
ENDMACRO(LIBUHD_PYTHON_GEN_SOURCE)
+MACRO(LIBUHD_REGISTER_COMPONENT name var auto)
+ MESSAGE(STATUS "")
+ MESSAGE(STATUS "Configuring ${name} support...")
+ IF(DEFINED ${var})
+ MESSAGE(STATUS "${name} support configured ${var}=${${var}}")
+ ELSE(DEFINED ${var}) #not defined: automatic enabling of component
+ SET(${var} ${auto})
+ MESSAGE(STATUS "${name} support configured automatically")
+ ENDIF(DEFINED ${var})
+ SET(${var} ${${var}} CACHE BOOL "enable ${name} support")
+ IF(${var})
+ MESSAGE(STATUS " Enabling ${name} support.")
+ LIST(APPEND _libuhd_enabled_components ${name})
+ ELSE(${var})
+ MESSAGE(STATUS " Disabling ${name} support.")
+ LIST(APPEND _libuhd_disabled_components ${name})
+ ENDIF(${var})
+ENDMACRO(LIBUHD_REGISTER_COMPONENT)
+
########################################################################
# Include CMakeLists.txt from subdirectories
########################################################################
@@ -109,3 +128,24 @@ INSTALL(TARGETS uhd
ARCHIVE DESTINATION ${LIBRARY_DIR} # .lib file
RUNTIME DESTINATION ${LIBRARY_DIR} # .dll file
)
+
+########################################################################
+# Print configuration summary
+########################################################################
+MESSAGE(STATUS "")
+MESSAGE(STATUS "######################################################")
+MESSAGE(STATUS "# LibUHD enabled components ")
+MESSAGE(STATUS "######################################################")
+FOREACH(comp ${_libuhd_enabled_components})
+ MESSAGE(STATUS " * ${comp}")
+ENDFOREACH(comp)
+
+MESSAGE(STATUS "")
+MESSAGE(STATUS "######################################################")
+MESSAGE(STATUS "# LibUHD disabled components ")
+MESSAGE(STATUS "######################################################")
+FOREACH(comp ${_libuhd_disabled_components})
+ MESSAGE(STATUS " * ${comp}")
+ENDFOREACH(comp)
+
+MESSAGE(STATUS "")