Skip to content

Commit 6c1b346

Browse files
committed
cmake: msg generation fix
1 parent 61fd2f2 commit 6c1b346

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ add_subdirectory(visualizers/rviz_interface)
2222
message(STATUS "Generating ROS2 messages from IDL files...")
2323
set (DLS2_ROS2_INTERFACE_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/dls2_ros2_interface/ros2_ws/src)
2424
set (DLS2_ROS2_INTERFACE_DIR ${DLS2_ROS2_INTERFACE_SRC_DIR}/dls2_interface)
25+
26+
27+
# remove .msg files from the ROS2 interface src directory to avoid conflicts with the newly generated ones
28+
file(GLOB DLS_MSG_FILES CONFIGURE_DEPENDS "${DLS2_ROS2_INTERFACE_DIR}/msg/*.msg")
29+
foreach(msg_file IN LISTS DLS_MSG_FILES)
30+
file(REMOVE ${msg_file})
31+
endforeach()
32+
2533
file(GLOB DLS_IDL_FILES CONFIGURE_DEPENDS "${DLS_MESSAGE_FOLDER}/idls/*.idl")
2634
foreach(idl_file IN LISTS DLS_IDL_FILES)
2735
execute_process(

0 commit comments

Comments
 (0)