summaryrefslogtreecommitdiff
path: root/gr-filter
diff options
context:
space:
mode:
authorVolker Schroer <3470424+dl1ksv@users.noreply.github.com>2020-12-08 10:16:46 +0100
committerMartin Braun <martin@gnuradio.org>2021-02-09 09:04:34 -0800
commit209b164af1eb1e5b6faefe12d8dc1d36294ee52b (patch)
treee270af4e2ce54d15399e37dd8255540b2a88288a /gr-filter
parentee04cf725d9109f014ed84485cdd8818590f9cf4 (diff)
filter: cmake: Warn if scipy or pyqtgraph are unavailable
Both are dependencies for the filter design tool, but are otherwise not build dependencies. We thus warn during CMake. Signed-off-by: Martin Braun <martin@gnuradio.org>
Diffstat (limited to 'gr-filter')
-rw-r--r--gr-filter/CMakeLists.txt22
1 files changed, 21 insertions, 1 deletions
diff --git a/gr-filter/CMakeLists.txt b/gr-filter/CMakeLists.txt
index 92d94deb1b..dcf4b785ca 100644
--- a/gr-filter/CMakeLists.txt
+++ b/gr-filter/CMakeLists.txt
@@ -28,12 +28,32 @@ SET(GR_PKG_FILTER_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/filter)
# Begin conditional configuration
########################################################################
if(ENABLE_GR_FILTER)
-
########################################################################
# Add subdirectories
########################################################################
add_subdirectory(include/gnuradio/filter)
add_subdirectory(lib)
+
+# Check for scipy and pyqtgraph, but don't fail if they don't exist.
+GR_PYTHON_CHECK_MODULE_RAW(
+ "pyqtgraph"
+ "import pyqtgraph"
+ PYQTGRAPH_FOUND
+)
+GR_PYTHON_CHECK_MODULE_RAW(
+ "scipy"
+ "import scipy"
+ SCIPY_FOUND
+)
+
+if(NOT PYQTGRAPH_FOUND OR NOT SCIPY_FOUND)
+ message(WARNING
+ "PyQtGraph and Scipy are required to run the filter design tool, "
+ "but are not detected! Please make sure they are installed on "
+ "the target system."
+ )
+endif(NOT PYQTGRAPH_FOUND OR NOT SCIPY_FOUND)
+
if(ENABLE_PYTHON)
add_subdirectory(python/filter)
add_subdirectory(python/filter/design)