Why is Qt looking for opengles2 when running qmake for my application?
-
I have built Qt 5.15.5 on Linux (CentOS 7). My configuration command for Qt was as follows:
./configure -debug -nomake examples -nomake tests -opensource -mp -confirm-license -platform linux-g++ -prefix <my qt install dir>
and the
configure
output contained the following pertaining to OpenGL:... OpenGL: Desktop OpenGL ....................... yes OpenGL ES 2.0 ........................ no OpenGL ES 3.0 ........................ no OpenGL ES 3.1 ........................ no OpenGL ES 3.2 ........................ no ...
When I use this Qt build to attempt building my application via qmake, I got the following error:
Project ERROR: Could not find feature opengles2
Using the debug output for qmake, I tracked this down to the file <my qt install dir>/mkspecs/features/unix/opengl.prf, which looks like:
qtConfig(opengles2) { INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES2 !isEmpty(QMAKE_LIBDIR_OPENGL_ES2):QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES2 target_qt:LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL_ES2 else:LIBS += $$QMAKE_LIBS_OPENGL_ES2 } else { INCLUDEPATH += $$QMAKE_INCDIR_OPENGL !isEmpty(QMAKE_LIBDIR_OPENGL):QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL target_qt:LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL else:LIBS += $$QMAKE_LIBS_OPENGL }
If I comment out the first logic block I am able to run qmake successfully for my application. My question is why is this build of Qt set up to look for opengles2 in the first place, considering my configure command and output? Are there additional options I should have specified when configuring? The -opengl configure options are listed as windows-specific.