aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-01-14 10:07:31 -0800
committerJosh Blum <josh@joshknows.com>2011-01-14 10:07:31 -0800
commit4818bd27f07acea1e663086d59fbb7d44bd5af81 (patch)
treea9cc80e503273c51edd4a374732aa7692a243edc
parent350c606585a45af79b8c6bf6b0e6753afa1d95d8 (diff)
downloaduhd-4818bd27f07acea1e663086d59fbb7d44bd5af81.tar.gz
uhd-4818bd27f07acea1e663086d59fbb7d44bd5af81.tar.bz2
uhd-4818bd27f07acea1e663086d59fbb7d44bd5af81.zip
uhd: more useful prints for component macro
made libuhd a component so we can just build the docs do the python tests in the top level cmakelists misc other tweaks
-rw-r--r--.gitignore3
-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
5 files changed, 26 insertions, 30 deletions
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index b275f0e49..000000000
--- a/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-*~
-\#*\#
-a.out
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
)