forked from Archive/PX4-Autopilot
uorb generate interally set required paths
This commit is contained in:
parent
2c1e999e1a
commit
e8fd711a5c
|
@ -43,6 +43,11 @@ import shutil
|
|||
import filecmp
|
||||
import argparse
|
||||
|
||||
import sys
|
||||
px4_tools_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
sys.path.append(px4_tools_dir + "/genmsg/src")
|
||||
sys.path.append(px4_tools_dir + "/gencpp/src")
|
||||
|
||||
try:
|
||||
import genmsg.template_tools
|
||||
except ImportError as e:
|
||||
|
|
|
@ -330,7 +330,6 @@ function(px4_generate_messages)
|
|||
if(NOT VERBOSE)
|
||||
set(QUIET "-q")
|
||||
endif()
|
||||
set(PYTHONPATH "${CMAKE_SOURCE_DIR}/Tools/genmsg/src:${CMAKE_SOURCE_DIR}/Tools/gencpp/src:$ENV{PYTHONPATH}")
|
||||
set(msg_out_path ${CMAKE_BINARY_DIR}/src/modules/uORB/topics)
|
||||
set(msg_list)
|
||||
foreach(msg_file ${MSG_FILES})
|
||||
|
@ -342,7 +341,7 @@ function(px4_generate_messages)
|
|||
list(APPEND msg_files_out ${msg_out_path}/${msg}.h)
|
||||
endforeach()
|
||||
add_custom_command(OUTPUT ${msg_files_out}
|
||||
COMMAND PYTHONPATH=${PYTHONPATH} ${PYTHON_EXECUTABLE}
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
Tools/px_generate_uorb_topic_headers.py
|
||||
${QUIET}
|
||||
-d msg
|
||||
|
@ -363,7 +362,7 @@ function(px4_generate_messages)
|
|||
list(APPEND msg_multi_files_out ${msg_multi_out_path}/px4_${msg}.h)
|
||||
endforeach()
|
||||
add_custom_command(OUTPUT ${msg_multi_files_out}
|
||||
COMMAND PYTHONPATH=${PYTHONPATH} ${PYTHON_EXECUTABLE}
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
Tools/px_generate_uorb_topic_headers.py
|
||||
${QUIET}
|
||||
-d msg
|
||||
|
@ -425,7 +424,7 @@ function(px4_add_upload)
|
|||
endif()
|
||||
px4_join(OUT serial_ports LIST "${serial_ports}" GLUE ",")
|
||||
add_custom_target(${OUT}
|
||||
COMMAND PYTHONPATH=${PYTHONPATH} ${PYTHON_EXECUTABLE}
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
${CMAKE_SOURCE_DIR}/Tools/px_uploader.py --port ${serial_ports} ${BUNDLE}
|
||||
DEPENDS ${BUNDLE}
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
|
|
Loading…
Reference in New Issue