asked 2011-09-08 02:39:39 -0500tom
I've got a package defining messages for rosserial. After changing a message, I need to deploy (copy) the changes to a folder containing generated messages for an Arduino board. Is there a (clean) way to add custom actions to the rosbuild system? For now I'm assuming I could modify Makefile in my message-defining-package adding the actions I need after the call:
include $(shell rospack find mk)/cmake.mk
but won't it get overwritten in some case and is it the right way to do it? I've got a deploy script and would like to call it from somewhere.
I'm not sure that it's the correct answer, but I think you should rather edit the CMakeLists.txt than the Makefile.
You can add a custom command to your CMakeLists.txt using this line:
Hope this helps.
answered 2011-09-08 14:27:48 -0500Brian Gerkey
You can use
# Declare a custom target that will do the copy when the 'all' target fires add_custom_target(deploy ALL COMMAND cp $(CMAKE_SOURCE_DIR)/undeployed /tmp/deployed) # Declare a dependency on the 'rosbuild_precompile' target, to ensure # that message generation happens before we copy. add_dependencies(deploy rosbuild_precompile)
Asked: 2011-09-08 02:39:39 -0500
Seen: 155 times
Last updated: Sep 08 '11