Make it possible to compile with -no-opengl.
This takes out the dependency to the header files of OpenGl. The ifdef QT_NO_OPENGL in the opengl headers are needed, as qmake adds depends in the makefiles for all GUI headers. Task-number: QTBUG-23207 Change-Id: If31448ee35fd8c39194c7cb7d62273fbc6def883 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
This commit is contained in:
parent
dc39531acc
commit
d584292aa2
@ -21,9 +21,6 @@ HEADERS += \
|
||||
kernel/qplatformthemefactory_qpa_p.h \
|
||||
kernel/qplatformthemeplugin_qpa.h \
|
||||
kernel/qplatformwindow_qpa.h \
|
||||
kernel/qplatformopenglcontext_qpa.h \
|
||||
kernel/qopenglcontext.h \
|
||||
kernel/qopenglcontext_p.h \
|
||||
kernel/qplatformcursor_qpa.h \
|
||||
kernel/qplatformclipboard_qpa.h \
|
||||
kernel/qplatformnativeinterface_qpa.h \
|
||||
@ -72,8 +69,6 @@ SOURCES += \
|
||||
kernel/qplatformthemefactory_qpa.cpp \
|
||||
kernel/qplatformthemeplugin_qpa.cpp \
|
||||
kernel/qplatformwindow_qpa.cpp \
|
||||
kernel/qplatformopenglcontext_qpa.cpp \
|
||||
kernel/qopenglcontext.cpp \
|
||||
kernel/qplatformcursor_qpa.cpp \
|
||||
kernel/qplatformclipboard_qpa.cpp \
|
||||
kernel/qplatformnativeinterface_qpa.cpp \
|
||||
@ -100,4 +95,15 @@ SOURCES += \
|
||||
kernel/qtouchdevice.cpp \
|
||||
kernel/qplatformsharedgraphicscache_qpa.cpp
|
||||
|
||||
contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles2)|contains(QT_CONFIG, egl) {
|
||||
HEADERS += \
|
||||
kernel/qplatformopenglcontext_qpa.h \
|
||||
kernel/qopenglcontext.h \
|
||||
kernel/qopenglcontext_p.h
|
||||
|
||||
SOURCES += \
|
||||
kernel/qplatformopenglcontext_qpa.cpp \
|
||||
kernel/qopenglcontext.cpp
|
||||
}
|
||||
|
||||
win32:HEADERS+=kernel/qwindowdefs_win.h
|
||||
|
@ -42,6 +42,8 @@
|
||||
#ifndef QOPENGLCONTEXT_H
|
||||
#define QOPENGLCONTEXT_H
|
||||
|
||||
#ifndef QT_NO_OPENGL
|
||||
|
||||
#include <QtCore/qnamespace.h>
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QScopedPointer>
|
||||
@ -146,4 +148,6 @@ QT_END_NAMESPACE
|
||||
|
||||
QT_END_HEADER
|
||||
|
||||
#endif // QT_NO_OPENGL
|
||||
|
||||
#endif // QGUIGLCONTEXT_H
|
||||
|
@ -43,8 +43,10 @@
|
||||
|
||||
#include "qplatformwindow_qpa.h"
|
||||
#include "qsurfaceformat.h"
|
||||
#ifndef QT_NO_OPENGL
|
||||
#include "qplatformopenglcontext_qpa.h"
|
||||
#include "qopenglcontext.h"
|
||||
#endif
|
||||
#include "qscreen.h"
|
||||
|
||||
#include "qwindow_p.h"
|
||||
|
@ -4,6 +4,8 @@ contains(QT_CONFIG, opengl):CONFIG += opengl
|
||||
contains(QT_CONFIG, opengles2):CONFIG += opengles2
|
||||
contains(QT_CONFIG, egl):CONFIG += egl
|
||||
|
||||
contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles2)|contains(QT_CONFIG, egl) {
|
||||
|
||||
HEADERS += opengl/qopengl.h \
|
||||
opengl/qopengl_p.h \
|
||||
opengl/qopenglfunctions.h \
|
||||
@ -43,4 +45,6 @@ SOURCES += opengl/qopengl.cpp \
|
||||
opengl/qopengltextureglyphcache.cpp \
|
||||
opengl/qtriangulator.cpp
|
||||
|
||||
}
|
||||
|
||||
#INCLUDEPATH += ../3rdparty/harfbuzz/src
|
||||
|
@ -42,6 +42,8 @@
|
||||
#ifndef QOPENGL_H
|
||||
#define QOPENGL_H
|
||||
|
||||
#ifndef QT_NO_OPENGL
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
QT_BEGIN_HEADER
|
||||
@ -79,4 +81,6 @@ QT_END_NAMESPACE
|
||||
|
||||
QT_END_HEADER
|
||||
|
||||
#endif // QT_NO_OPENGL
|
||||
|
||||
#endif // QOPENGL_H
|
||||
|
@ -42,6 +42,8 @@
|
||||
#ifndef QOPENGLBUFFER_H
|
||||
#define QOPENGLBUFFER_H
|
||||
|
||||
#ifndef QT_NO_OPENGL
|
||||
|
||||
#include <QtCore/qscopedpointer.h>
|
||||
#include <QtGui/qopengl.h>
|
||||
|
||||
@ -129,4 +131,6 @@ QT_END_NAMESPACE
|
||||
|
||||
QT_END_HEADER
|
||||
|
||||
#endif // QT_NO_OPENGL
|
||||
|
||||
#endif
|
||||
|
@ -42,6 +42,8 @@
|
||||
#ifndef QOPENGLFRAMEBUFFEROBJECT_H
|
||||
#define QOPENGLFRAMEBUFFEROBJECT_H
|
||||
|
||||
#ifndef QT_NO_OPENGL
|
||||
|
||||
#include <QtGui/qopengl.h>
|
||||
#include <QtGui/qpaintdevice.h>
|
||||
|
||||
@ -159,4 +161,7 @@ private:
|
||||
QT_END_NAMESPACE
|
||||
|
||||
QT_END_HEADER
|
||||
|
||||
#endif // QT_NO_OPENGL
|
||||
|
||||
#endif // QOPENGLFRAMEBUFFEROBJECT_H
|
||||
|
@ -42,6 +42,8 @@
|
||||
#ifndef QOPENGLFUNCTIONS_H
|
||||
#define QOPENGLFUNCTIONS_H
|
||||
|
||||
#ifndef QT_NO_OPENGL
|
||||
|
||||
#ifdef __GLEW_H__
|
||||
#warning qopenglfunctions.h is not compatible with GLEW, GLEW defines will be undefined
|
||||
#warning To use GLEW with Qt, do not include <qopengl.h> or <QOpenGLFunctions> after glew.h
|
||||
@ -2420,4 +2422,6 @@ QT_END_NAMESPACE
|
||||
|
||||
QT_END_HEADER
|
||||
|
||||
#endif // QT_NO_OPENGL
|
||||
|
||||
#endif
|
||||
|
@ -42,6 +42,8 @@
|
||||
#ifndef QOPENGLPAINTDEVICE_H
|
||||
#define QOPENGLPAINTDEVICE_H
|
||||
|
||||
#ifndef QT_NO_OPENGL
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
@ -100,4 +102,6 @@ QT_END_NAMESPACE
|
||||
|
||||
QT_END_HEADER
|
||||
|
||||
#endif // QT_NO_OPENGL
|
||||
|
||||
#endif // QOPENGLPAINTDEVICE_H
|
||||
|
@ -42,6 +42,8 @@
|
||||
#ifndef QOPENGLSHADERPROGRAM_H
|
||||
#define QOPENGLSHADERPROGRAM_H
|
||||
|
||||
#ifndef QT_NO_OPENGL
|
||||
|
||||
#include <QtGui/qopengl.h>
|
||||
#include <QtGui/qvector2d.h>
|
||||
#include <QtGui/qvector3d.h>
|
||||
@ -314,4 +316,6 @@ QT_END_NAMESPACE
|
||||
|
||||
QT_END_HEADER
|
||||
|
||||
#endif // QT_NO_OPENGL
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user