Skip to content

Commit

Permalink
Merge pull request OctoMap#6 from anasarrak/ros2
Browse files Browse the repository at this point in the history
Updating QT to be buildable with QT5
  • Loading branch information
ahcorde authored Jul 10, 2019
2 parents c16ef89 + 8915700 commit 7185fe9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON) # enables -fPIC in applicable compilers

option(BUILD_OCTOVIS_SUBPROJECT "Build targets from subproject octovis" ON)
option(BUILD_DYNAMICETD3D_SUBPROJECT "Build targets from subproject dynamicEDT3D" ON)
option(OCTOVIS_QT5 "Link Octovis against Qt5?" NO)
option(OCTOVIS_QT5 "Link Octovis against Qt5?" ON)

if(OCTOVIS_QT5)
# Compiling against QT5 requires C++11.
Expand Down
7 changes: 5 additions & 2 deletions octovis/CMakeModules/FindQGLViewer.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ FIND_PATH( QGLViewer_INCLUDE_DIR qglviewer.h
/opt/local/include/QGLViewer
${QGLVIEWER_BASE_DIR}
)

if(QT4_FOUND)
FIND_LIBRARY( QGLViewer_LIBRARY_DIR_UBUNTU NAMES qglviewer-qt4 QGLViewer-qt4)
else()
FIND_LIBRARY( QGLViewer_LIBRARY_DIR_UBUNTU NAMES qglviewer-qt5 QGLViewer-qt5)
endif()
FIND_LIBRARY( QGLViewer_LIBRARY_DIR_WINDOWS QGLViewer2 ${QGLVIEWER_BASE_DIR})
FIND_LIBRARY( QGLViewer_LIBRARY_DIR_OTHER QGLViewer ${QGLVIEWER_BASE_DIR})

Expand Down Expand Up @@ -119,4 +122,4 @@ ENDIF()
# You need to use qmake of QT4. You are using QT3 if you get:

#CMakeFiles/octovis.dir/ViewerWidget.cpp.o: In function `octomap::ViewerWidget::ViewerWidget(QWidget*)':
#ViewerWidget.cpp:(.text+0x1715): undefined reference to `QGLViewer::QGLViewer(QWidget*, QGLWidget const*, QFlags<Qt::WindowType>)'
#ViewerWidget.cpp:(.text+0x1715): undefined reference to `QGLViewer::QGLViewer(QWidget*, QGLWidget const*, QFlags<Qt::WindowType>)'

0 comments on commit 7185fe9

Please sign in to comment.