# WinCE does not have a platform directory for .prf files, and the
# win32 directory is searched for .prfs by qmake on WinCE. Ideally
# there should be a features/wince/opengl.prf which contains the wince
# block below.

wince* {
    include(../unix/opengl.prf)
} else {
    contains(QT_CONFIG, opengles2) {
#       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
            contains(QT_CONFIG, 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
        }
        DEFINES += QT_OPENGL_ES_2 QT_OPENGL_ES_2_ANGLE
        contains(QT_CONFIG, static): DEFINES += QT_OPENGL_ES_2_ANGLE_STATIC GL_APICALL= EGLAPI=
        QT_CONFIG -= opengl
    } else {
        !contains(QT_CONFIG, dynamicgl) {
            QMAKE_LIBS += $$QMAKE_LIBS_OPENGL
            QMAKE_LFLAGS += $$QMAKE_LFLAGS_OPENGL
        }
    }
}
