Skip to content

Commit

Permalink
Add per board/target dds_topics.yaml file
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisTM committed Sep 30, 2024
1 parent 0e65679 commit d100827
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/modules/uxrce_dds_client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,18 @@ else()
add_dependencies(microxrceddsclient libmicroxrceddsclient_project)
target_include_directories(microxrceddsclient INTERFACE ${microxrceddsclient_build_dir}/include)


set(DDS_TOPICS_YAML ${CMAKE_CURRENT_SOURCE_DIR}/dds_topics.yaml)
if(EXISTS ${PX4_BOARD_DIR}/${PX4_BOARD_LABEL}_dds_topics.yaml)
set(DDS_TOPICS_YAML ${PX4_BOARD_DIR}/${PX4_BOARD_LABEL}_dds_topics.yaml)
elseif(EXISTS ${PX4_BOARD_DIR}/default_dds_topics.yaml)
set(DDS_TOPICS_YAML ${PX4_BOARD_DIR}/default_dds_topics.yaml)
endif()

add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dds_topics.h
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/generate_dds_topics.py
--topic-msg-dir ${PX4_SOURCE_DIR}/msg
--client-outdir ${CMAKE_CURRENT_BINARY_DIR}
--dds-topics-file ${CMAKE_CURRENT_SOURCE_DIR}/dds_topics.yaml
--dds-topics-file ${DDS_TOPICS_YAML}
--template_file ${CMAKE_CURRENT_SOURCE_DIR}/dds_topics.h.em
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/generate_dds_topics.py
Expand Down

0 comments on commit d100827

Please sign in to comment.