2017-05-04 08:15:23 +00:00
|
|
|
QT_FOR_CONFIG += gui
|
|
|
|
|
2018-12-19 11:46:52 +00:00
|
|
|
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)
|
|
|
|
}
|
|
|
|
|
2016-08-05 11:35:39 +00:00
|
|
|
qtConfig(opengles2) {
|
2017-05-04 08:15:23 +00:00
|
|
|
# Depending on the configuration we use libQtANGLE or libEGL and libGLESv2
|
|
|
|
qtConfig(combined-angle-lib) {
|
2018-12-19 11:46:52 +00:00
|
|
|
prependOpenGlLib($$LIBQTANGLE_NAME)
|
2017-05-04 08:15:23 +00:00
|
|
|
} else {
|
2018-12-19 11:46:52 +00:00
|
|
|
prependOpenGlLib($$LIBGLESV2_NAME)
|
|
|
|
prependOpenGlLib($$LIBEGL_NAME)
|
2017-05-04 08:15:23 +00:00
|
|
|
}
|
2016-03-09 13:59:20 +00:00
|
|
|
# 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
|
2016-08-05 11:35:39 +00:00
|
|
|
qtConfig(angle) {
|
2016-03-09 13:59:20 +00:00
|
|
|
LIBS += $$QMAKE_LIBS_OPENGL_ES2_DEBUG
|
2012-05-23 13:07:06 +00:00
|
|
|
} else {
|
2012-11-30 07:57:37 +00:00
|
|
|
LIBS += $$QMAKE_LIBS_OPENGL_ES2
|
2012-05-23 13:07:06 +00:00
|
|
|
}
|
|
|
|
} else {
|
2016-03-09 13:59:20 +00:00
|
|
|
LIBS += $$QMAKE_LIBS_OPENGL_ES2
|
|
|
|
QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES2_RELEASE
|
|
|
|
}
|
2016-08-15 19:56:36 +00:00
|
|
|
qtConfig(static): DEFINES += GL_APICALL= EGLAPI=
|
2016-03-09 13:59:20 +00:00
|
|
|
} else {
|
2016-08-05 11:35:39 +00:00
|
|
|
!qtConfig(dynamicgl) {
|
2016-03-09 13:59:20 +00:00
|
|
|
QMAKE_LIBS += $$QMAKE_LIBS_OPENGL
|
|
|
|
QMAKE_LFLAGS += $$QMAKE_LFLAGS_OPENGL
|
2012-05-23 13:07:06 +00:00
|
|
|
}
|
2011-04-27 10:05:43 +00:00
|
|
|
}
|