File tree Expand file tree Collapse file tree
examples/cpp/flow_control Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,3 +50,19 @@ target_compile_definitions(flow_control PRIVATE
5050target_link_libraries (flow_control fastdds fastcdr foonathan_memory )
5151install (TARGETS flow_control
5252 RUNTIME DESTINATION ${DATA_INSTALL_DIR} /fastdds/examples/cpp/flow_control/${BIN_INSTALL_DIR} )
53+
54+
55+ # Copy the XML files over to the build directory
56+ file (GLOB_RECURSE XML_FILES ${CMAKE_CURRENT_SOURCE_DIR } /*.xml )
57+ # for each xml file detected
58+ foreach (XML_FILE_COMPLETE_PATH ${XML_FILES} )
59+ # obtain the file name
60+ get_filename_component (XML_FILE ${XML_FILE_COMPLETE_PATH} NAME_WE )
61+ # copy the file from src to build folders
62+ configure_file (
63+ ${XML_FILE_COMPLETE_PATH} # from full src path
64+ ${CMAKE_CURRENT_BINARY_DIR } /${XML_FILE}.xml # to relative build path
65+ COPYONLY )
66+ install (FILES ${XML_FILE_COMPLETE_PATH}
67+ DESTINATION ${DATA_INSTALL_DIR} /fastdds/examples/cpp/flow_control/${BIN_INSTALL_DIR} )
68+ endforeach ()
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ services:
2525 LD_LIBRARY_PATH : @PROJECT_BINARY_DIR@/src/cpp:@fastcdr_LIB_DIR@@TINYXML2_LIB_DIR_COMPOSE_LD_LIBRARY_PATH@
2626 EXAMPLE_DIR : @PROJECT_BINARY_DIR@/examples/cpp/flow_control@FILE_EXTENSION@
2727 FASTDDS_DEFAULT_PROFILES_FILE : @PROJECT_BINARY_DIR@/examples/cpp/flow_control/flow_control_profile.xml
28- command : @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/flow_control@FILE_EXTENSION@ subscriber --samples 10"
28+ command : @SHELL_EXECUTABLE@ -c "$${EXAMPLE_DIR}/flow_control@FILE_EXTENSION@ subscriber --samples 10"
2929
3030 publisher :
3131 image : @DOCKER_IMAGE_NAME@
You can’t perform that action at this time.
0 commit comments