aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/CMakeLists.txt
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-10-28 10:26:12 -0700
committerJosh Blum <josh@joshknows.com>2010-10-28 10:26:12 -0700
commit904332c7ba8b66877b8ca56e43ed2e5cfdbc661b (patch)
treeb35c6f7651b6e8f701bb2ed3e3d34c510e5eb6b2 /host/lib/CMakeLists.txt
parentd7c7351bb66cb4c455e77f83edd581d6afbcef9c (diff)
downloaduhd-904332c7ba8b66877b8ca56e43ed2e5cfdbc661b.tar.gz
uhd-904332c7ba8b66877b8ca56e43ed2e5cfdbc661b.tar.bz2
uhd-904332c7ba8b66877b8ca56e43ed2e5cfdbc661b.zip
uhd: added to python module check macro, move check to lib dir
Diffstat (limited to 'host/lib/CMakeLists.txt')
-rw-r--r--host/lib/CMakeLists.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt
index 81845de21..b0e610d41 100644
--- a/host/lib/CMakeLists.txt
+++ b/host/lib/CMakeLists.txt
@@ -16,6 +16,25 @@
#
########################################################################
+# Check Python Modules
+########################################################################
+PYTHON_CHECK_MODULE(
+ "Python version >= 2.6"
+ "platform" "platform.python_version() >= '2.6'"
+ HAVE_PYTHON_PLAT_MIN_VERSION
+)
+
+PYTHON_CHECK_MODULE(
+ "Cheetah templates >= 2.0.0"
+ "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)