summaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
Diffstat (limited to 'host')
-rw-r--r--host/CMakeLists.txt21
-rw-r--r--host/Modules/UHDComponent.cmake9
-rw-r--r--host/lib/CMakeLists.txt22
-rw-r--r--host/lib/convert/CMakeLists.txt1
4 files changed, 26 insertions, 27 deletions
diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt
index d7e6a6a50..32a3f0a62 100644
--- a/host/CMakeLists.txt
+++ b/host/CMakeLists.txt
@@ -90,7 +90,7 @@ IF(UNIX AND EXISTS "/usr/lib64")
ENDIF(UNIX AND EXISTS "/usr/lib64")
SET(Boost_ADDITIONAL_VERSIONS "1.42.0" "1.42" "1.43.0" "1.43" "1.44.0" "1.44")
-FIND_PACKAGE(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS
+FIND_PACKAGE(Boost ${BOOST_MIN_VERSION} COMPONENTS
date_time
filesystem
program_options
@@ -104,6 +104,23 @@ INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
########################################################################
+# Check Python Modules
+########################################################################
+INCLUDE(UHDPython)
+
+PYTHON_CHECK_MODULE(
+ "Python version 2.6 or greater"
+ "platform" "platform.python_version() >= '2.6'"
+ HAVE_PYTHON_PLAT_MIN_VERSION
+)
+
+PYTHON_CHECK_MODULE(
+ "Cheetah templates 2.0.0 or greater"
+ "Cheetah" "Cheetah.Version >= '2.0.0'"
+ HAVE_PYTHON_MODULE_CHEETAH
+)
+
+########################################################################
# Create Uninstall Target
########################################################################
CONFIGURE_FILE(
@@ -141,7 +158,7 @@ INSTALL(FILES
########################################################################
# Register top level components
########################################################################
-SET(ENABLE_LIBUHD ON) #always enabled
+LIBUHD_REGISTER_COMPONENT("LibUHD" ENABLE_LIBUHD ON "Boost_FOUND;HAVE_PYTHON_PLAT_MIN_VERSION;HAVE_PYTHON_MODULE_CHEETAH" OFF)
LIBUHD_REGISTER_COMPONENT("Examples" ENABLE_EXAMPLES ON "ENABLE_LIBUHD" OFF)
LIBUHD_REGISTER_COMPONENT("Utils" ENABLE_UTILS ON "ENABLE_LIBUHD" OFF)
LIBUHD_REGISTER_COMPONENT("Tests" ENABLE_TESTS ON "ENABLE_LIBUHD" OFF)
diff --git a/host/Modules/UHDComponent.cmake b/host/Modules/UHDComponent.cmake
index 63b32eadf..4ea55bbb9 100644
--- a/host/Modules/UHDComponent.cmake
+++ b/host/Modules/UHDComponent.cmake
@@ -30,7 +30,9 @@ SET(_uhd_disabled_components "" CACHE INTERNAL "" FORCE)
MACRO(LIBUHD_REGISTER_COMPONENT name var enb deps dis)
MESSAGE(STATUS "")
MESSAGE(STATUS "Configuring ${name} support...")
- MESSAGE(STATUS "Manually override with -D${var}=ON/OFF")
+ FOREACH(dep ${deps})
+ MESSAGE(STATUS " Dependency ${dep} = ${${dep}}")
+ ENDFOREACH(dep)
#setup the dependent option for this component
INCLUDE(CMakeDependentOption)
@@ -44,6 +46,7 @@ MACRO(LIBUHD_REGISTER_COMPONENT name var enb deps dis)
MESSAGE(STATUS " Disabling ${name} support.")
LIST(APPEND _uhd_disabled_components ${name})
ENDIF(${var})
+ MESSAGE(STATUS " Override with -D${var}=ON/OFF")
#make components lists into global variables
SET(_uhd_enabled_components ${_uhd_enabled_components} CACHE INTERNAL "" FORCE)
@@ -56,7 +59,7 @@ ENDMACRO(LIBUHD_REGISTER_COMPONENT)
FUNCTION(UHD_PRINT_COMPONENT_SUMMARY)
MESSAGE(STATUS "")
MESSAGE(STATUS "######################################################")
- MESSAGE(STATUS "# LibUHD enabled components ")
+ MESSAGE(STATUS "# UHD enabled components ")
MESSAGE(STATUS "######################################################")
FOREACH(comp ${_uhd_enabled_components})
MESSAGE(STATUS " * ${comp}")
@@ -64,7 +67,7 @@ FUNCTION(UHD_PRINT_COMPONENT_SUMMARY)
MESSAGE(STATUS "")
MESSAGE(STATUS "######################################################")
- MESSAGE(STATUS "# LibUHD disabled components ")
+ MESSAGE(STATUS "# UHD disabled components ")
MESSAGE(STATUS "######################################################")
FOREACH(comp ${_uhd_disabled_components})
MESSAGE(STATUS " * ${comp}")
diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt
index 0fe137432..d2845ffda 100644
--- a/host/lib/CMakeLists.txt
+++ b/host/lib/CMakeLists.txt
@@ -16,27 +16,6 @@
#
########################################################################
-# Check Python Modules
-########################################################################
-INCLUDE(UHDPython)
-
-PYTHON_CHECK_MODULE(
- "Python version 2.6 or greater"
- "platform" "platform.python_version() >= '2.6'"
- HAVE_PYTHON_PLAT_MIN_VERSION
-)
-
-PYTHON_CHECK_MODULE(
- "Cheetah templates 2.0.0 or greater"
- "Cheetah" "Cheetah.Version >= '2.0.0'"
- HAVE_PYTHON_MODULE_CHEETAH
-)
-
-IF(NOT HAVE_PYTHON_PLAT_MIN_VERSION OR NOT HAVE_PYTHON_MODULE_CHEETAH)
- MESSAGE(FATAL_ERROR "Error: python requirements not met for the build system.")
-ENDIF(NOT HAVE_PYTHON_PLAT_MIN_VERSION OR NOT HAVE_PYTHON_MODULE_CHEETAH)
-
-########################################################################
# Helpful Macros
########################################################################
MACRO(LIBUHD_APPEND_SOURCES)
@@ -128,6 +107,7 @@ LIBUHD_APPEND_SOURCES(
ADD_LIBRARY(uhd SHARED ${libuhd_sources})
TARGET_LINK_LIBRARIES(uhd ${Boost_LIBRARIES} ${libuhd_libs})
SET_TARGET_PROPERTIES(uhd PROPERTIES DEFINE_SYMBOL "UHD_DLL_EXPORTS")
+SET_TARGET_PROPERTIES(uhd PROPERTIES SOVERSION ${UHD_VERSION_MAJOR})
INSTALL(TARGETS uhd
LIBRARY DESTINATION ${LIBRARY_DIR} # .so file
diff --git a/host/lib/convert/CMakeLists.txt b/host/lib/convert/CMakeLists.txt
index 06f7ba12a..a9f977cdc 100644
--- a/host/lib/convert/CMakeLists.txt
+++ b/host/lib/convert/CMakeLists.txt
@@ -62,5 +62,4 @@ LIBUHD_PYTHON_GEN_SOURCE(
LIBUHD_APPEND_SOURCES(
${CMAKE_CURRENT_SOURCE_DIR}/convert_impl.cpp
- ${CMAKE_CURRENT_BINARY_DIR}/convert_general.cpp
)