Skip to content

Commit

Permalink
filter: cmake: Warn if scipy or pyqtgraph are unavailable
Browse files Browse the repository at this point in the history
Both are dependencies for the filter design tool, but are otherwise not
build dependencies. We thus warn during CMake.

Signed-off-by: Martin Braun <[email protected]>
  • Loading branch information
dl1ksv authored and mbr0wn committed Feb 9, 2021
1 parent ee04cf7 commit 209b164
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion gr-filter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 209b164

Please sign in to comment.