Creating a .so library that depends on message headers
Hi,
I am trying to create a library that depends on header files generated by a call to generate_messages()
. The message list is:
project(ros_otp22)
add_message_files(
FILES
hydraulic_arm.msg
valve_command.msg
valve_command_info.msg
angular_rate_info.msg
slope_info.msg
accel_info.msg
)
The library call is add_library(o22pac src/o22pac/o22pac.cpp)
. This sometimes works and sometimes doesn't depending on the exact order in which the message header files are generated.
What I need is a list variable that does into the add_library()
call that lists the files. Using ${PROJECT_NAME}_generate_message_cpp
(such as for add_dependencies()
) does NOT work as it does not generate a list of header file names.
I could create my own list of headers, but that seems like a monumental waste of time an effort, source of bugs and misconfiguration and violation of the 'DRY' (don't repeat yourself) principle since catkin_make
and cmake
should already be aware of what headers the .msg
files generate.
Is there a variable generated by catkin
that represents a list of the header files by name? My searches of the documentation have found nothing promising.
Thanks, Bart
http://answers.ros.org/question/52744/how-to-specify-dependencies-with-foo_msgs-catkin-packages/?answer=54418#post-id-54418
I did see this answer, but it is talking about adding executables, not adding libraries.