Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a cmake variable for linking to the default plugin #979

Merged
merged 2 commits into from
Mar 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ if(NOT OGRE_OV_LIBRARIES_ABS)
endif()

catkin_package(
CFG_EXTRAS
rviz-extras.cmake
INCLUDE_DIRS
src
${EIGEN3_INCLUDE_DIRS}
Expand Down
4 changes: 4 additions & 0 deletions cmake/rviz-extras.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# The file being included is generated by src/rviz/default_plugin/CMakeLists.txt
include("${rviz_DIR}/default_plugin_location.cmake")
set(rviz_DEFAULT_PLUGIN_LIBRARIES
"${rviz_DIR}/../../../@CATKIN_PACKAGE_LIB_DESTINATION@/${rviz_DEFAULT_PLUGIN_FILE_NAME}")
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
from catkin_pkg.python_setup import generate_distutils_setup

d = generate_distutils_setup(
packages = ['rviz'],
package_dir = {'': 'src/python_bindings'},
requires = ['roslib', 'rospkg', 'python_qt_bindings']
packages=['rviz'],
package_dir={'': 'src/python_bindings'},
requires=['roslib', 'rospkg', 'python_qt_bindings']
)

setup(**d)
13 changes: 9 additions & 4 deletions src/rviz/default_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,12 @@ install(TARGETS default_plugin
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION})

#message("TODO: stop installing libdefault_plugin.so into share/rviz after pluginlib starts looking for it in lib.")
#install(TARGETS default_plugin
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
# LIBRARY DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
# Generate to the devel space so the extras file can include it from the devel space.
file(GENERATE
OUTPUT "${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}/cmake/default_plugin_location.cmake"
CONTENT "set(rviz_DEFAULT_PLUGIN_FILE_NAME $<TARGET_FILE_NAME:default_plugin>)"
)
# Install from the devel space to the install space.
install(FILES "${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}/cmake/default_plugin_location.cmake"
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/cmake
)