catkin: generate_messages before building library?
How do I specify in the CMakeList.txt the generation of messages and building of a library. I know how to generate messages only. But when I added a library that used these message the library was compiled before the messages had been generated.
So what is the correct way to do this?
Regardless of catkin or rosbuild, the recommended practice is to define messages in a separate package. That might or might not help with this problem.
Yes, I usually do that. But for now I have a package were we have not split it that way. And that would have been a working solution if I had not found a working dependency.