Add cmake target dependencies of the executable/library to ensure that

the required messages/services/actions are generated previously.

Avoids the compilation errors mentioned in the README file