Closed v4hn closed 8 years ago
This fixes #654, merge please!
This does not seem to build with catkin_make (but with catkin build), because the generated target cmake file is build at compile time, but required at cmake configuration time.
I will merge this now as it is an improvement and should remove the regression in the build farm.
@dornhege: you're right. This only resolves the problem with catkin_make_isolated and for cases where rviz is already installed before compiling moveit_ros.
The CFG_EXTRAS
mechanism @wjwwood pulled out of his magic hat seems to be broken w.r.t. that.
Maybe one could also export the real library target as rviz_DEFAULT_PLUGIN_LIBRARIES
in rviz' CMakeLists.txt?
I'm not sure there's a clean solution for the general issue though.
Anyways, this solves most of the use-cases. rviz is usually only in the core system that must be built with catkin_build_isolated afair.
Thanks for merging.
I can put the default plugins in the exported targets maybe. I'd have to think about that some more.
The problem with getting the library name at configure time is that CMake doesn't actually know it, or in the future it won't, until generation is done, which is why they introduced generator expressions.
Actually I think I can just put the target in the rviz_DEFAULT_PLUGIN_LIBRARIES
cmake variable within the rviz CMakeLists.txt
. That way with catkin_make
the rviz_DEFAULT_PLUGIN_LIBRARIES
will be defined and point to the right target.
I opened https://github.com/ros-visualization/rviz/pull/983 as a potential solution.
This is the indigo version of #657. Feel free to cherry-pick the commit to indigo instead of merging this request.
The library is not exported anymore and now is provided separately from rviz_LIBRARIES. See https://github.com/ros-visualization/rviz/pull/979 for details.