diff options
author | Andrej Rode <mail@andrejro.de> | 2019-05-14 17:36:40 +0200 |
---|---|---|
committer | Andrej Rode <mail@andrejro.de> | 2019-06-26 20:27:55 +0200 |
commit | b0e16be2f98d4d8f34df0b927195df6e4367e48f (patch) | |
tree | f9608f9611f84bf49c383571ee725424cd3cc461 /gr-utils/python/modtool | |
parent | 469954226349be36f1b056163f543fca2eadd0fd (diff) |
cmake: check for python module click as dependency of modtool
Previously cmake did not check if click is installed as it is a runtime
requirement. If CMAKE_CROSSCOMPILING is set the module checking is
skipped.
Closes #2292
Diffstat (limited to 'gr-utils/python/modtool')
-rw-r--r-- | gr-utils/python/modtool/CMakeLists.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gr-utils/python/modtool/CMakeLists.txt b/gr-utils/python/modtool/CMakeLists.txt index 2cb7c21487..70fdabedac 100644 --- a/gr-utils/python/modtool/CMakeLists.txt +++ b/gr-utils/python/modtool/CMakeLists.txt @@ -19,6 +19,18 @@ include(GrPython) +GR_PYTHON_CHECK_MODULE_RAW( + "click" + "import click; import click_plugins" + CLICK_FOUND + ) + +if(NOT CMAKE_CROSSCOMPILING) + if(NOT CLICK_FOUND) + message(FATAL_ERROR "Python module click is required for gr-modtool") + endif() +endif() + GR_PYTHON_INSTALL(FILES __init__.py DESTINATION ${GR_PYTHON_DIR}/gnuradio/modtool |