aboutsummaryrefslogtreecommitdiffstats
path: root/host/CMakeLists.txt
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2024-02-09 14:26:02 +0100
committerAki Tomita <121511582+atomita-ni@users.noreply.github.com>2024-02-19 21:12:01 -0600
commit56c1a7c63b0d42a9aa4a254796f13388851fa077 (patch)
treec80d7414832cdd81e6b9d4212126ec7dc211cd5a /host/CMakeLists.txt
parentci: fix name for saison dutMatrix (diff)
downloaduhd-56c1a7c63b0d42a9aa4a254796f13388851fa077.tar.xz
uhd-56c1a7c63b0d42a9aa4a254796f13388851fa077.zip
cmake: Add ENABLE_PYMOD_UTILS option, fix venv
This options allows to install Python utils, including a subset of the Python API 'uhd' module, without having to compile UHD. The main reason to do this is to allow installing the RFNoC image builder without the rest of UHD. To achieve this, run cmake as such: cmake /path/to/uhd -DENABLE_LIBUHD=OFF -DENABLE_PYMOD_UTILS=ON You might also want to disable building the manual in this case. The refactoring required to enable this also fixes an issues when installing UHD from source into a venv. This updates the CMake to use pip3 to install the module, fixing some warnings and install issues.
Diffstat (limited to 'host/CMakeLists.txt')
-rw-r--r--host/CMakeLists.txt11
1 files changed, 8 insertions, 3 deletions
diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt
index 7cd8f87d4..8281a98a0 100644
--- a/host/CMakeLists.txt
+++ b/host/CMakeLists.txt
@@ -441,6 +441,11 @@ endif(WIN32)
LIBUHD_REGISTER_COMPONENT("Examples" ENABLE_EXAMPLES ON "ENABLE_LIBUHD" OFF OFF)
LIBUHD_REGISTER_COMPONENT("Utils" ENABLE_UTILS ON "ENABLE_LIBUHD" OFF OFF)
LIBUHD_REGISTER_COMPONENT("Tests" ENABLE_TESTS ON "ENABLE_LIBUHD" OFF OFF)
+LIBUHD_REGISTER_COMPONENT(
+ "Python Module (Utils only)"
+ ENABLE_PYMOD_UTILS OFF
+ "HAVE_PYTHON_MODULE_NUMPY;HAVE_PYTHON_MODULE_MAKO;HAVE_PYTHON_MODULE_YAML"
+ OFF OFF)
########################################################################
# Add the subdirectories
@@ -459,13 +464,13 @@ if(ENABLE_TESTS)
add_subdirectory(tests)
endif(ENABLE_TESTS)
-if(ENABLE_UTILS)
+if(ENABLE_UTILS OR ENABLE_PYMOD_UTILS)
add_subdirectory(utils)
-endif(ENABLE_UTILS)
+endif(ENABLE_UTILS OR ENABLE_PYMOD_UTILS)
add_subdirectory(docs)
-if(ENABLE_PYTHON_API)
+if(ENABLE_PYTHON_API OR ENABLE_PYMOD_UTILS)
add_subdirectory(python)
endif()