diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 6a8bdb2d315..b3d0f9fcb53 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -1,8 +1,6 @@ # special case: set(OpenGL_GL_PREFERENCE GLVND) -find_package(WrapOpenGL) # special case - ##################################################################### ## Gui Module: ##################################################################### @@ -441,6 +439,14 @@ extend_target(Gui CONDITION QT_FEATURE_draganddrop kernel/qsimpledrag.cpp kernel/qsimpledrag_p.h ) +# With qmake, gui's opengl.pri used CONFIG += opengl, where opengl.prf +# acted like WrapOpenGL: direct linkage against either libGLESv2 or +# libGL, depending on the opengl _feature_. This is done by hand now +# here (where the feature is available). +# DO NOT MOVE THIS TO THE BEGINNING OF THE FILE, the feature variables are not +# available until the add_qt_module call. +find_package(WrapOpenGL) # special case + extend_target(Gui CONDITION QT_FEATURE_opengl SOURCES kernel/qopenglcontext.cpp kernel/qopenglcontext.h kernel/qopenglcontext_p.h