Currently, I have a package with a CMake invocation like so:
execute_process(COMMAND catkin_find other_package file/in/package --first-only
OUTPUT_VARIABLE LOCATION_OF_FILE)
This works, but with one important caveat: the catkin_find call fails if the workspace wasn't sourced prior to build. What this means is that setting up a workspace with this package can be an awkward dance of creating and building the empty workspace, sourcing it, and then re-building.
My hypothesis is that there's a better way involving find_package()
, but none of the variables which are created by find_package point to the share path. Is there some other catkin macro which fills this niche, or another CMake technique which should be used?
Originally posted by mikepurvis on ROS Answers with karma: 1153 on 2013-11-26
Post score: 1