catkin: dependency on package that generates headers
- I have a package A that generates some c++ header files and some python code.
- I have a package B that depends on the header files from A.
I have problems creating good CMakeLists.txt that ensures that the headers in A always are built before building B.
I realize this is very much like the message generation concept, where packages can rely on messages from another package being built ahead of time.
Can I create the CMakeLists.txt for package A in such a way that a certain custom command always is ensured to run before targets from package B are being built?
This seems like a general CMake question, not necessarily Catkin related (inter-target dependency declaration is a bit of CMake functionality).
Is
the reason you post it here?
I had the impression that inter-package dependency was where catkin shines. And I found it likely that the solution would use a concept similar to the message generation concept. Also I wondered if the solution could relate to catkin_EXPORTED_TARGETS. I apologize if this is a misunderstanding.