summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/kernel/kernel.pri16
-rw-r--r--src/gui/kernel/qopenglcontext.h4
-rw-r--r--src/gui/kernel/qwindow.cpp2
-rw-r--r--src/gui/opengl/opengl.pri78
-rw-r--r--src/gui/opengl/qopengl.h4
-rw-r--r--src/gui/opengl/qopenglbuffer.h4
-rw-r--r--src/gui/opengl/qopenglframebufferobject.h5
-rw-r--r--src/gui/opengl/qopenglfunctions.h4
-rw-r--r--src/gui/opengl/qopenglpaintdevice.h4
-rw-r--r--src/gui/opengl/qopenglshaderprogram.h4
10 files changed, 83 insertions, 42 deletions
diff --git a/src/gui/kernel/kernel.pri b/src/gui/kernel/kernel.pri
index 12cb42c741..b46a9f0f10 100644
--- a/src/gui/kernel/kernel.pri
+++ b/src/gui/kernel/kernel.pri
@@ -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
diff --git a/src/gui/kernel/qopenglcontext.h b/src/gui/kernel/qopenglcontext.h
index 30e4fee0eb..29fed4400c 100644
--- a/src/gui/kernel/qopenglcontext.h
+++ b/src/gui/kernel/qopenglcontext.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
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index deec2a8f83..2893273ce0 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -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"
diff --git a/src/gui/opengl/opengl.pri b/src/gui/opengl/opengl.pri
index 3c5ab932ba..f0d9000fb6 100644
--- a/src/gui/opengl/opengl.pri
+++ b/src/gui/opengl/opengl.pri
@@ -4,43 +4,47 @@ contains(QT_CONFIG, opengl):CONFIG += opengl
contains(QT_CONFIG, opengles2):CONFIG += opengles2
contains(QT_CONFIG, egl):CONFIG += egl
-HEADERS += opengl/qopengl.h \
- opengl/qopengl_p.h \
- opengl/qopenglfunctions.h \
- opengl/qopenglframebufferobject.h \
- opengl/qopenglframebufferobject_p.h \
- opengl/qopenglpaintdevice.h \
- opengl/qopenglbuffer.h \
- opengl/qopenglshaderprogram.h \
- opengl/qopenglextensions_p.h \
- opengl/qopenglgradientcache_p.h \
- opengl/qopengltexturecache_p.h \
- opengl/qopenglengineshadermanager_p.h \
- opengl/qopengl2pexvertexarray_p.h \
- opengl/qopenglpaintengine_p.h \
- opengl/qopenglengineshadersource_p.h \
- opengl/qopenglcustomshaderstage_p.h \
- opengl/qopengltriangulatingstroker_p.h \
- opengl/qopengltextureglyphcache_p.h \
- opengl/qopenglshadercache_p.h \
- opengl/qopenglshadercache_meego_p.h \
- opengl/qtriangulator_p.h \
- opengl/qrbtree_p.h
+contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles2)|contains(QT_CONFIG, egl) {
-SOURCES += opengl/qopengl.cpp \
- opengl/qopenglfunctions.cpp \
- opengl/qopenglframebufferobject.cpp \
- opengl/qopenglpaintdevice.cpp \
- opengl/qopenglbuffer.cpp \
- opengl/qopenglshaderprogram.cpp \
- opengl/qopenglgradientcache.cpp \
- opengl/qopengltexturecache.cpp \
- opengl/qopenglengineshadermanager.cpp \
- opengl/qopengl2pexvertexarray.cpp \
- opengl/qopenglpaintengine.cpp \
- opengl/qopenglcustomshaderstage.cpp \
- opengl/qopengltriangulatingstroker.cpp \
- opengl/qopengltextureglyphcache.cpp \
- opengl/qtriangulator.cpp
+ HEADERS += opengl/qopengl.h \
+ opengl/qopengl_p.h \
+ opengl/qopenglfunctions.h \
+ opengl/qopenglframebufferobject.h \
+ opengl/qopenglframebufferobject_p.h \
+ opengl/qopenglpaintdevice.h \
+ opengl/qopenglbuffer.h \
+ opengl/qopenglshaderprogram.h \
+ opengl/qopenglextensions_p.h \
+ opengl/qopenglgradientcache_p.h \
+ opengl/qopengltexturecache_p.h \
+ opengl/qopenglengineshadermanager_p.h \
+ opengl/qopengl2pexvertexarray_p.h \
+ opengl/qopenglpaintengine_p.h \
+ opengl/qopenglengineshadersource_p.h \
+ opengl/qopenglcustomshaderstage_p.h \
+ opengl/qopengltriangulatingstroker_p.h \
+ opengl/qopengltextureglyphcache_p.h \
+ opengl/qopenglshadercache_p.h \
+ opengl/qopenglshadercache_meego_p.h \
+ opengl/qtriangulator_p.h \
+ opengl/qrbtree_p.h
+
+ SOURCES += opengl/qopengl.cpp \
+ opengl/qopenglfunctions.cpp \
+ opengl/qopenglframebufferobject.cpp \
+ opengl/qopenglpaintdevice.cpp \
+ opengl/qopenglbuffer.cpp \
+ opengl/qopenglshaderprogram.cpp \
+ opengl/qopenglgradientcache.cpp \
+ opengl/qopengltexturecache.cpp \
+ opengl/qopenglengineshadermanager.cpp \
+ opengl/qopengl2pexvertexarray.cpp \
+ opengl/qopenglpaintengine.cpp \
+ opengl/qopenglcustomshaderstage.cpp \
+ opengl/qopengltriangulatingstroker.cpp \
+ opengl/qopengltextureglyphcache.cpp \
+ opengl/qtriangulator.cpp
+
+}
#INCLUDEPATH += ../3rdparty/harfbuzz/src
diff --git a/src/gui/opengl/qopengl.h b/src/gui/opengl/qopengl.h
index 9e7752cf1d..c108d2f6b0 100644
--- a/src/gui/opengl/qopengl.h
+++ b/src/gui/opengl/qopengl.h
@@ -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
diff --git a/src/gui/opengl/qopenglbuffer.h b/src/gui/opengl/qopenglbuffer.h
index a3e5743a15..d76eb47be9 100644
--- a/src/gui/opengl/qopenglbuffer.h
+++ b/src/gui/opengl/qopenglbuffer.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
diff --git a/src/gui/opengl/qopenglframebufferobject.h b/src/gui/opengl/qopenglframebufferobject.h
index 340f5783de..c1c6a71b3c 100644
--- a/src/gui/opengl/qopenglframebufferobject.h
+++ b/src/gui/opengl/qopenglframebufferobject.h
@@ -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
diff --git a/src/gui/opengl/qopenglfunctions.h b/src/gui/opengl/qopenglfunctions.h
index c830a893c7..8d1b4abec5 100644
--- a/src/gui/opengl/qopenglfunctions.h
+++ b/src/gui/opengl/qopenglfunctions.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
diff --git a/src/gui/opengl/qopenglpaintdevice.h b/src/gui/opengl/qopenglpaintdevice.h
index f0566fbab7..7738f6bb2e 100644
--- a/src/gui/opengl/qopenglpaintdevice.h
+++ b/src/gui/opengl/qopenglpaintdevice.h
@@ -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
diff --git a/src/gui/opengl/qopenglshaderprogram.h b/src/gui/opengl/qopenglshaderprogram.h
index 81171240b5..e9214dab56 100644
--- a/src/gui/opengl/qopenglshaderprogram.h
+++ b/src/gui/opengl/qopenglshaderprogram.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