diff options
author | Jacob Gilbert <mrjacobagilbert@gmail.com> | 2020-09-19 13:17:35 -0700 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2020-12-17 08:46:42 -0500 |
commit | 2e41f4eb3785a08d47329583b2c1498a6a58068e (patch) | |
tree | c610b903ed57d780b109740271dac68fc40090aa | |
parent | 1fbf9ba89c643f478024d6af797e0a0dbbdf5ba3 (diff) |
modtool: CMake template should allow building OOT modules without python if desired
The gr_modtool utility should respect the -DENABLE_PYTHON=OFF setting to allow modules to be built without python support. This also does not install any GRC files even though it is possible to use GRC to generate flowgraphs without runtime python; however, this disabling python _and_ using GRC for C++ generation is a very advanced feature so the included note should be sufficient to inform anyone using in this way.
-rw-r--r-- | gr-utils/modtool/templates/gr-newmod/CMakeLists.txt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gr-utils/modtool/templates/gr-newmod/CMakeLists.txt b/gr-utils/modtool/templates/gr-newmod/CMakeLists.txt index e71f2f8f7a..2e1daf1731 100644 --- a/gr-utils/modtool/templates/gr-newmod/CMakeLists.txt +++ b/gr-utils/modtool/templates/gr-newmod/CMakeLists.txt @@ -153,8 +153,14 @@ add_subdirectory(include/howto) add_subdirectory(lib) add_subdirectory(apps) add_subdirectory(docs) -add_subdirectory(python) -add_subdirectory(grc) +# NOTE: manually update below to use GRC to generate C++ flowgraphs w/o python +if(ENABLE_PYTHON) + message(STATUS "PYTHON and GRC components are enabled") + add_subdirectory(python) + add_subdirectory(grc) +else(ENABLE_PYTHON) + message(STATUS "PYTHON and GRC components are disabled") +endif(ENABLE_PYTHON) ######################################################################## # Install cmake search helper for this library |