mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 08:47:45 +08:00
fixed qt related compilation errors
This commit is contained in:
@@ -16,6 +16,15 @@ catkin_package(
|
||||
CATKIN_DEPENDS cv_bridge geometry_msgs std_msgs std_srvs nav_msgs rtabmap_msgs rtabmap_sync tf
|
||||
)
|
||||
|
||||
# catkin is not using cmake targets for dependencies,
|
||||
# so we should explcitly look for Qt to get compilation
|
||||
# flags (-fPIC missing)
|
||||
FIND_PACKAGE(Qt5 COMPONENTS Widgets Core Gui QUIET)
|
||||
IF(NOT Qt5_FOUND)
|
||||
FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui REQUIRED)
|
||||
INCLUDE(${QT_USE_FILE})
|
||||
ENDIF(NOT Qt5_FOUND)
|
||||
|
||||
###########
|
||||
## Build ##
|
||||
###########
|
||||
@@ -27,6 +36,9 @@ include_directories(
|
||||
)
|
||||
|
||||
add_executable(rtabmap_viz src/GuiNode.cpp src/GuiWrapper.cpp src/PreferencesDialogROS.cpp)
|
||||
IF(Qt5_FOUND)
|
||||
QT5_USE_MODULES(rtabmap_viz Widgets Core Gui)
|
||||
ENDIF(Qt5_FOUND)
|
||||
target_link_libraries(rtabmap_viz ${catkin_LIBRARIES})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user