Add QT5 Support

This commit is contained in:
Tobias Fischer
2015-03-16 19:51:22 +00:00
parent 63f438876c
commit b5e015ec8f
56 changed files with 192 additions and 164 deletions

View File

@@ -5,7 +5,11 @@ SET(headers_ui
)
#This will generate moc_* for Qt
QT4_WRAP_CPP(moc_srcs ${headers_ui})
IF("${RTABMAP_QT_VERSION}" STREQUAL "4")
QT4_WRAP_CPP(moc_srcs ${headers_ui})
ELSE()
QT5_WRAP_CPP(moc_srcs ${headers_ui})
ENDIF()
SET(SRC_FILES
main.cpp
@@ -21,12 +25,14 @@ SET(INCLUDE_DIRS
${PCL_INCLUDE_DIRS}
)
INCLUDE(${QT_USE_FILE})
IF("${RTABMAP_QT_VERSION}" STREQUAL "4")
INCLUDE(${QT_USE_FILE})
ENDIF()
SET(LIBRARIES
${QT_LIBRARIES}
${OpenCV_LIBS}
${PCL_LIBRARIES}
${OpenCV_LIBS}
${PCL_LIBRARIES}
)
# rc.exe has problems with these defintions... commented!
@@ -67,6 +73,9 @@ ELSE()
ADD_EXECUTABLE(rtabmap ${SRC_FILES})
ENDIF()
TARGET_LINK_LIBRARIES(rtabmap rtabmap_core rtabmap_gui rtabmap_utilite ${LIBRARIES})
IF("${RTABMAP_QT_VERSION}" STREQUAL "5")
QT5_USE_MODULES(rtabmap Widgets Core Gui Svg PrintSupport)
ENDIF()
IF(APPLE AND BUILD_AS_BUNDLE)
SET_TARGET_PROPERTIES(rtabmap PROPERTIES

View File

@@ -25,13 +25,13 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <QtGui/QApplication>
#include <QApplication>
#include <QtCore/QDir>
#include "rtabmap/utilite/UEventsManager.h"
#include "rtabmap/core/RtabmapThread.h"
#include "rtabmap/core/Rtabmap.h"
#include "rtabmap/gui/MainWindow.h"
#include <QtGui/QMessageBox>
#include <QMessageBox>
#include "rtabmap/utilite/UObjDeletionThread.h"
#include "ObjDeletionHandler.h"