How can you create dependencies between custom output targets (add_custom_command OUTPUT) and generated messages from other packages (packages in ${catkin_EXPORTED_TARGETS})
I have a command and target as in the following:
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/my_package/config/config.json
COMMAND ${CMAKE_BINARY_DIR}/../devel/env.sh ./gen_config ${CMAKE_BINARY_DIR}/my_package/config/config.json
DEPENDS ${catkin_EXPORTED_TARGETS}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/my_package/scripts
VERBATIM)
add_custom_target(my_package_generate_config ALL DEPENDS ${CMAKE_BINARY_DIR}/my_package/config/config.json)
What I want is to be able to add a new message (i.e. a new file NewMessage.msg and related CMakeLists entry in add_message_files) to an external package that this package is dependent on and have the config regenerate (as it depends on all available messages).
Is there any way to do this?