build: kindly ask python not to polute src/
Type: make
Change-Id: I1ec82e0f3c19dee79f942996339240c73d4e380c
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/src/vpp-api/vapi/CMakeLists.txt b/src/vpp-api/vapi/CMakeLists.txt
index 626971f..53034bd 100644
--- a/src/vpp-api/vapi/CMakeLists.txt
+++ b/src/vpp-api/vapi/CMakeLists.txt
@@ -69,7 +69,7 @@
add_custom_command(
OUTPUT fake.api.vapi.h
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/vapi_c_gen.py
+ COMMAND ${PYENV} ${CMAKE_CURRENT_SOURCE_DIR}/vapi_c_gen.py
ARGS --remove-path ${CMAKE_CURRENT_SOURCE_DIR}/fake.api.json
DEPENDS fake.api.json
COMMENT "Generating fake VAPI C header ${output_name}"
@@ -78,7 +78,7 @@
add_custom_command(
OUTPUT fake.api.vapi.hpp
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/vapi_cpp_gen.py
+ COMMAND ${PYENV} ${CMAKE_CURRENT_SOURCE_DIR}/vapi_cpp_gen.py
ARGS --remove-path ${CMAKE_CURRENT_SOURCE_DIR}/fake.api.json
DEPENDS fake.api.json
COMMENT "Generating fake VAPI C++ header ${output_name}"