Auto detect which Qt version to use (Qt5 has priority if both are installed). ROS Kinetic fix for vtk libproj.so not found bug.

This commit is contained in:
matlabbe
2016-05-04 16:45:19 -04:00
parent d2882a88f3
commit b8c2cd9f94
12 changed files with 58 additions and 71 deletions

View File

@@ -48,7 +48,7 @@ SET(qrc
./GuiLib.qrc
)
IF("${RTABMAP_QT_VERSION}" STREQUAL "4")
IF(QT4_FOUND)
# generate rules for building source files from the resources
QT4_ADD_RESOURCES(srcs_qrc ${qrc})
@@ -106,9 +106,9 @@ SET(INCLUDE_DIRS
${PCL_INCLUDE_DIRS}
)
IF("${RTABMAP_QT_VERSION}" STREQUAL "4")
IF(QT4_FOUND)
INCLUDE(${QT_USE_FILE})
ENDIF()
ENDIF(QT4_FOUND)
SET(LIBRARIES
${QT_LIBRARIES}
@@ -131,9 +131,9 @@ ADD_LIBRARY(rtabmap_gui ${SRC_FILES})
# Linking with Qt libraries
TARGET_LINK_LIBRARIES(rtabmap_gui rtabmap_core rtabmap_utilite ${LIBRARIES})
IF("${RTABMAP_QT_VERSION}" STREQUAL "5")
IF(Qt5_FOUND)
QT5_USE_MODULES(rtabmap_gui Widgets Core Gui Svg PrintSupport)
ENDIF()
ENDIF(Qt5_FOUND)
SET_TARGET_PROPERTIES(
rtabmap_gui