Packages without source cannot generate msgs?
I put several custom defined msgs in a package (named custom_msg_pkg), and this package does not contain any cpp or python sources. Then I have other packages depending on this package, using the provided custom msgs. But at compilation time (through catkin_make), the custom_msg_pkg is not being built first, so the compiler gives errors complaining not able to find the custom defined msgs in the custom_msg_pkg.
I am quite sure that I don't get it wrong in package.xml or CMakeLists.txt, since if I manually build them one by one, it works. So I think the problem lies in the order of building packages. In the custom_msg_pkg's CMakeLists.txt, I cannot add add_dependencies(executable custom_msg_pkg_generate_messages_cpp)
, so these messages are not built in the first place when I simple strike catkin_make
.
So I am writing to ask:
- If there is some way to make the custom_msg_pkg built before the dependent packages?
- Is it a bad idea to have a package without source but only contains msg/srv files?
Thanks for any suggestions!