qt5base-lts/mkspecs/features/win32/opengl.prf
Kai Koehne 0b4ae8e682 MinGW: Fix build with -angle
Since Qt 5.14, debug libs for MinGW don't necessarily have a 'd' suffix anymore.

Fixes: QTBUG-83087
Change-Id: Ia9f499ebed05e96fb056134681a2124c2262fb08
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-03-27 15:34:12 +01:00

41 lines
1.4 KiB
Plaintext

QT_FOR_CONFIG += gui
defineTest(prependOpenGlLib) {
path = $$QT.core.libs/$$QMAKE_PREFIX_STATICLIB$$1
ext = .$$QMAKE_EXTENSION_STATICLIB
!mingw|qtConfig(debug_and_release): debug_suffix = "d"
QMAKE_LIBS_OPENGL_ES2 = $${path}$${ext} $$QMAKE_LIBS_OPENGL_ES2
QMAKE_LIBS_OPENGL_ES2_DEBUG = $${path}$${debug_suffix}$${ext} $$QMAKE_LIBS_OPENGL_ES2_DEBUG
export(QMAKE_LIBS_OPENGL_ES2)
export(QMAKE_LIBS_OPENGL_ES2_DEBUG)
}
qtConfig(opengles2) {
# Depending on the configuration we use libQtANGLE or libEGL and libGLESv2
qtConfig(combined-angle-lib) {
prependOpenGlLib($$LIBQTANGLE_NAME)
} else {
prependOpenGlLib($$LIBGLESV2_NAME)
prependOpenGlLib($$LIBEGL_NAME)
}
# For Desktop, use the ANGLE library location passed on from configure.
INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES2
CONFIG(debug, debug|release) {
QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES2_DEBUG
qtConfig(angle) {
LIBS += $$QMAKE_LIBS_OPENGL_ES2_DEBUG
} else {
LIBS += $$QMAKE_LIBS_OPENGL_ES2
}
} else {
LIBS += $$QMAKE_LIBS_OPENGL_ES2
QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES2_RELEASE
}
qtConfig(static): DEFINES += GL_APICALL= EGLAPI=
} else {
!qtConfig(dynamicgl) {
QMAKE_LIBS += $$QMAKE_LIBS_OPENGL
QMAKE_LFLAGS += $$QMAKE_LFLAGS_OPENGL
}
}