Fix build with Qt5. (#150)

- Include Qt5 include directories into search path. Fixes #138.
- Supersedes and fixes #124.
master
Holger Rapp 2016-10-26 14:47:57 +02:00 committed by GitHub
parent f100950244
commit de53d1f7f6
2 changed files with 4 additions and 0 deletions

View File

@ -40,12 +40,15 @@ set(CMAKE_AUTOMOC ON)
if(rviz_QT_VERSION VERSION_LESS "5") if(rviz_QT_VERSION VERSION_LESS "5")
message(STATUS "Using Qt4 based on the rviz_QT_VERSION: ${rviz_QT_VERSION}") message(STATUS "Using Qt4 based on the rviz_QT_VERSION: ${rviz_QT_VERSION}")
find_package(Qt4 ${rviz_QT_VERSION} EXACT REQUIRED QtCore QtGui) find_package(Qt4 ${rviz_QT_VERSION} EXACT REQUIRED QtCore QtGui)
include_directories(${Qt4_INCLUDE_DIRS})
include(${QT_USE_FILE}) include(${QT_USE_FILE})
else() else()
message(STATUS "Using Qt5 based on the rviz_QT_VERSION: ${rviz_QT_VERSION}") 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(Qt5 ${rviz_QT_VERSION} EXACT REQUIRED Core Widgets)
find_package(Qt5Widgets REQUIRED) find_package(Qt5Widgets REQUIRED)
set(QT_LIBRARIES Qt5::Widgets) set(QT_LIBRARIES Qt5::Widgets)
include_directories(${Qt5Widgets_INCLUDE_DIRS})
include_directories(${Qt5_INCLUDE_DIRS})
endif() endif()
add_definitions(-DQT_NO_KEYWORDS) add_definitions(-DQT_NO_KEYWORDS)

View File

@ -65,6 +65,7 @@ We recommend using `wstool <http://wiki.ros.org/wstool>`_ and `rosdep
wstool update -t src wstool update -t src
# Install deb dependencies. # Install deb dependencies.
rosdep init
rosdep update rosdep update
rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y