Skip to content

Add glew dependency for newer Qt6 version #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ if(NOT TARGET OpenGL::GL OR NOT TARGET OpenGL::GLU)
find_package(OpenGL REQUIRED)
endif()

find_package(GLEW REQUIRED)

set(MOC_HEADER_FILES
QGLViewer/camera.h
QGLViewer/frame.h
Expand Down Expand Up @@ -109,6 +111,7 @@ else()
target_link_libraries(${PROJECT_NAME} PUBLIC ${OPENGL_LIBRARIES})
target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC ${OPENGL_INCLUDE_DIR})
endif()
target_link_libraries(${PROJECT_NAME} PUBLIC GLEW::GLEW)

target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>")
Expand Down
1 change: 1 addition & 0 deletions QGLViewer/VRender/Primitive.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# include <windows.h>
#endif

# include <GL/glew.h>
#ifdef __APPLE__
# include <OpenGL/gl.h>
#else
Expand Down
1 change: 1 addition & 0 deletions QGLViewer/VRender/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# include <windows.h>
#endif

# include <GL/glew.h>
#ifdef __APPLE__
# include <OpenGL/gl.h>
#else
Expand Down
1 change: 1 addition & 0 deletions QGLViewer/VRender/VRender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# include <windows.h>
#endif

# include <GL/glew.h>
#ifdef __APPLE__
# include <OpenGL/gl.h>
#else
Expand Down
1 change: 1 addition & 0 deletions QGLViewer/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Error : libQGLViewer requires a minimum Qt version of 5.4 Error

// OpenGL includes - Included here and hence shared by all the files that need
// OpenGL headers.
#include <GL/glew.h>
#include <QOpenGLWidget>

// GLU was removed from Qt in version 4.8
Expand Down