qt5base-lts/mkspecs/features/win32/opengl.prf
Oswald Buddenhagen 5b3dfa470e qmake: link qt libraries by full path
this avoids the scenario where the linker would pick up the wrong qt
libraries for LIBS_PRIVATE because LIBS added the "wrong" path first.
this is also consistent with configure-supplied dependencies as of
recently.

as a side effect, this also removes pretenses of lsb linker handling, as
it makes no sense after the change and is certainly obsolete anyway.

Fixes: QTBUG-50921
Change-Id: I84398c9143f393c2eefb3c69a31bd9f633669924
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-04-15 05:41:08 +00:00

40 lines
1.3 KiB
Plaintext

QT_FOR_CONFIG += gui
defineTest(prependOpenGlLib) {
path = $$QT.core.libs/$$QMAKE_PREFIX_STATICLIB$$1
ext = .$$QMAKE_EXTENSION_STATICLIB
QMAKE_LIBS_OPENGL_ES2 = $${path}$${ext} $$QMAKE_LIBS_OPENGL_ES2
QMAKE_LIBS_OPENGL_ES2_DEBUG = $${path}d$${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
}
}