mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
CMakeLists.txt: add custom target uorb_graph to generate the graph JSON files
Use like this: make px4fmu-v2_default uorb_graph
This commit is contained in:
@@ -413,6 +413,27 @@ if (all_posix_cmake_targets)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# uORB graph generation: add a custom target 'uorb_graph'
|
||||||
|
#
|
||||||
|
set(uorb_graph_config ${BOARD})
|
||||||
|
|
||||||
|
set(graph_module_list "")
|
||||||
|
foreach(module ${config_module_list})
|
||||||
|
set(graph_module_list "${graph_module_list}" "--src-path" "src/${module}")
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
add_custom_command(OUTPUT ${uorb_graph_config}
|
||||||
|
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/uorb_graph/create.py
|
||||||
|
${module_list}
|
||||||
|
--exclude-path src/examples
|
||||||
|
--file ${PX4_SOURCE_DIR}/Tools/uorb_graph/graph_${uorb_graph_config}
|
||||||
|
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
||||||
|
COMMENT "Generating uORB graph"
|
||||||
|
)
|
||||||
|
add_custom_target(uorb_graph DEPENDS ${uorb_graph_config})
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# packaging
|
# packaging
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user