From aef3c474e20693142531d39a9bb3217b7bbee375 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Fri, 19 Mar 2021 19:39:24 -0400 Subject: [PATCH] cmake: add install_python_requirements helper - this is useful because it installs the python requirements using the python interpreter found and used by cmake --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d0a54d987a..b945b2947e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -454,3 +454,10 @@ add_custom_target(size WORKING_DIRECTORY ${PX4_BINARY_DIR} USES_TERMINAL ) + +# install python requirements using configured python +add_custom_target(install_python_requirements + COMMAND ${PYTHON_EXECUTABLE} -m pip install --requirement ${PX4_SOURCE_DIR}/Tools/setup/requirements.txt + DEPENDS ${PX4_SOURCE_DIR}/Tools/setup/requirements.txt + USES_TERMINAL +)