Catkin invoke script built in other package
I am trying to using add_custom_target
to invoke a binary during the build process. This is tricky because the binary is built by another Catkin package and is installed its libexec directory. I can't figure out how to make this work when both packages are built in the same Catkin workspace. I also am not sure how to call the binary in a way that is portable between the devel and install spaces.
These seem to be two separate issues:
- How do make my custom target depend on the binary built by the other package? I can't simply add it as a dependency, because that would fail when the other package is in a chained workspace.
- What is the correct way of resolving the path to the binary? Should I use
rosrun
,rospack
, orcatkin_find
? Or do I need to somehow export a CMake variable that contains the path?