Skip to content

Commit

Permalink
Drop Qt4 support
Browse files Browse the repository at this point in the history
The background for this diff is that we want to specify Qt as a
dependency in the package.xml. However, it's only possible to specify
either Qt4 or Qt5. Thus we drop the support for Qt4 so that we can
specify Qt5 as a dependency in package.xml.

ROS melodic (which is already two years old) uses Qt5, thus this diff
shouldn't be too problematic.
  • Loading branch information
AndreSchroeder-TomTom authored and schra committed Apr 17, 2020
1 parent 3d631d1 commit c48504e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 27 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Changelog for package rviz_satellite
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Forthcoming
-----------
* Drop Qt4 support

1.3.0 (2020-04-17)
------------------
* Fix setting the fixed frame
Expand Down
41 changes: 14 additions & 27 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@ find_package(catkin REQUIRED COMPONENTS

catkin_package(CATKIN_DEPENDS nav_msgs sensor_msgs)

if (rviz_QT_VERSION VERSION_LESS "5")
find_package(Qt4 COMPONENTS QtCore QtGui QtNetwork REQUIRED)
include(${QT_USE_FILE})
else()
find_package(Qt5 COMPONENTS Core Gui Network Concurrent REQUIRED)
endif()
find_package(Qt5 COMPONENTS Core Gui Network Concurrent REQUIRED)

set(${PROJECT_NAME}_SOURCES
src/aerialmap_display.cpp
Expand All @@ -40,27 +35,19 @@ set(${PROJECT_NAME}_HEADERS
)

# invoke MOC and UI/ include Qt headers/ link Qt libraries
if (rviz_QT_VERSION VERSION_LESS "5")
qt4_wrap_cpp(${PROJECT_NAME}_MOCSrcs ${${PROJECT_NAME}_HEADERS})
include_directories(${Qt4_INCLUDE_DIR})
link_libraries(
${QT_LIBRARIES}
)
else()
qt5_wrap_cpp(${PROJECT_NAME}_MOCSrcs ${${PROJECT_NAME}_HEADERS})
include_directories(
${Qt5Core_INCLUDE_DIRS}
${Qt5Gui_INCLUDE_DIRS}
${Qt5Network_INCLUDE_DIRS}
${Qt5Concurrent_INCLUDE_DIRS}
)
link_libraries(
${Qt5Core_LIBRARIES}
${Qt5Gui_LIBRARIES}
${Qt5Network_LIBRARIES}
${Qt5Concurrent_LIBRARIES}
)
endif()
qt5_wrap_cpp(${PROJECT_NAME}_MOCSrcs ${${PROJECT_NAME}_HEADERS})
include_directories(
${Qt5Core_INCLUDE_DIRS}
${Qt5Gui_INCLUDE_DIRS}
${Qt5Network_INCLUDE_DIRS}
${Qt5Concurrent_INCLUDE_DIRS}
)
link_libraries(
${Qt5Core_LIBRARIES}
${Qt5Gui_LIBRARIES}
${Qt5Network_LIBRARIES}
${Qt5Concurrent_LIBRARIES}
)

# Other includes
include_directories(
Expand Down

0 comments on commit c48504e

Please sign in to comment.