link to Ogre only if rviz is found

This commit is contained in:
matlabbe
2018-04-10 15:19:03 -04:00
parent 75f1652194
commit 8029dd707d
+7 -7
View File
@@ -45,13 +45,13 @@ IF(RTABMAP_GUI OR rviz_FOUND)
ENDIF() ENDIF()
ENDIF() ENDIF()
ENDIF(RTABMAP_GUI OR rviz_FOUND) ENDIF(RTABMAP_GUI OR rviz_FOUND)
IF(rviz_FOUND)
## We also use Ogre ## We also use Ogre for rviz plugins
include($ENV{ROS_ROOT}/core/rosbuild/FindPkgConfig.cmake) include($ENV{ROS_ROOT}/core/rosbuild/FindPkgConfig.cmake)
pkg_check_modules(OGRE OGRE) pkg_check_modules(OGRE OGRE)
include_directories( ${OGRE_INCLUDE_DIRS} ) include_directories( ${OGRE_INCLUDE_DIRS} )
link_directories( ${OGRE_LIBRARY_DIRS} ) link_directories( ${OGRE_LIBRARY_DIRS} )
ENDIF(rviz_FOUND)
## Uncomment this if the package has a setup.py. This macro ensures ## Uncomment this if the package has a setup.py. This macro ensures
## modules and global scripts declared therein get installed ## modules and global scripts declared therein get installed