From f730bd581769508a31c6bca11277f495af9b6f3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraj=20Or=C5=A1uli=C4=87?= Date: Thu, 20 Apr 2017 12:30:20 +0200 Subject: [PATCH] Update documentation, clean up rviz plugin CMakeLists (#302) - Among the lines added in #150, the one that fixes building with Qt5 is the following line: include_directories(${Qt5Widgets_INCLUDE_DIRS}) The rest is redundant and actually doesn't do anything. A CMake variable named QtX_INCLUDE_DIRS is not defined when find_package()-ing Qt. Also, there is no need to find_package() Qt5 Widgets twice. - In documentation, add sudo to rosdep init invocation, following http://wiki.ros.org/rosdep. Add a comment about the error which will be printed if the user has already run sudo rosdep init since installing ROS. --- cartographer_rviz/CMakeLists.txt | 3 --- docs/source/index.rst | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cartographer_rviz/CMakeLists.txt b/cartographer_rviz/CMakeLists.txt index da1c14d..3e2144d 100644 --- a/cartographer_rviz/CMakeLists.txt +++ b/cartographer_rviz/CMakeLists.txt @@ -48,15 +48,12 @@ target_link_libraries(${PROJECT_NAME} PUBLIC ${QT_LIBRARIES}) if(rviz_QT_VERSION VERSION_LESS "5") message(STATUS "Using Qt4 based on the rviz_QT_VERSION: ${rviz_QT_VERSION}") find_package(Qt4 ${rviz_QT_VERSION} EXACT REQUIRED QtCore QtGui) - include_directories(${Qt4_INCLUDE_DIRS}) include(${QT_USE_FILE}) else() message(STATUS "Using Qt5 based on the rviz_QT_VERSION: ${rviz_QT_VERSION}") find_package(Qt5 ${rviz_QT_VERSION} EXACT REQUIRED Core Widgets) - find_package(Qt5Widgets REQUIRED) set(QT_LIBRARIES Qt5::Widgets) include_directories(${Qt5Widgets_INCLUDE_DIRS}) - include_directories(${Qt5_INCLUDE_DIRS}) endif() add_definitions(-DQT_NO_KEYWORDS) diff --git a/docs/source/index.rst b/docs/source/index.rst index a430303..0e0dfde 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -67,7 +67,9 @@ We recommend using `wstool `_ and `rosdep wstool update -t src # Install deb dependencies. - rosdep init + # The command 'sudo rosdep init' will print an error if you have already + # executed it since installing ROS. This error can be ignored. + sudo rosdep init rosdep update rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y