diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2016-02-05 13:41:21 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2016-02-05 19:53:25 +0000 |
commit | 707e6f528fc79db236d282e7ea41eb952c825433 (patch) | |
tree | a03bc0a339bdcf6dbf0eeb88e6401f019d8ddd4e | |
parent | 80eabc56349b5efe4acf3fcb467b5b2d6491131f (diff) |
Build (and fail) Quick with -no-opengl
Disable qmltest, particles, Quick examples and tests.
Also guard private QOpenGL header includes because, unlike the public
QOpenGL* headers, this is not done in the private headers.
This allows build attempts against a -no-opengl qtbase. It will of course
fail when encontering the GL symbols and QOpenGL class usage in Quick/SG.
Change-Id: I323f7a8b8854cc6e486e264517df30be3e5f8d3c
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
-rw-r--r-- | examples/quick/quick.pro | 69 | ||||
-rw-r--r-- | src/imports/imports.pro | 10 | ||||
-rw-r--r-- | src/quick/scenegraph/coreapi/qsggeometry.cpp | 3 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgdefaultglyphnode_p.cpp | 3 | ||||
-rw-r--r-- | src/quick/scenegraph/util/qsgdefaultpainternode.cpp | 7 | ||||
-rw-r--r-- | src/quick/scenegraph/util/qsgdepthstencilbuffer_p.h | 5 | ||||
-rw-r--r-- | src/src.pro | 14 | ||||
-rw-r--r-- | tests/auto/auto.pro | 21 |
8 files changed, 81 insertions, 51 deletions
diff --git a/examples/quick/quick.pro b/examples/quick/quick.pro index c5ef46173c..591e4042a1 100644 --- a/examples/quick/quick.pro +++ b/examples/quick/quick.pro @@ -1,36 +1,39 @@ TEMPLATE = subdirs -SUBDIRS = quick-accessibility \ - animation \ - draganddrop \ - externaldraganddrop \ - canvas \ - imageelements \ - keyinteraction \ - localstorage \ - models \ - views \ - mousearea \ - positioners \ - righttoleft \ - scenegraph \ - shadereffects \ - text \ - threading \ - touchinteraction \ - tutorials \ - customitems \ - imageprovider \ - imageresponseprovider \ - window \ - particles \ - demos \ - rendercontrol -# Widget dependent examples -qtHaveModule(widgets) { - SUBDIRS += embeddedinwidgets - qtHaveModule(quickwidgets): SUBDIRS += quickwidgets -} +contains(QT_CONFIG, opengl(es1|es2)?) { + SUBDIRS = quick-accessibility \ + animation \ + draganddrop \ + externaldraganddrop \ + canvas \ + imageelements \ + keyinteraction \ + localstorage \ + models \ + views \ + mousearea \ + positioners \ + righttoleft \ + scenegraph \ + shadereffects \ + text \ + threading \ + touchinteraction \ + tutorials \ + customitems \ + imageprovider \ + imageresponseprovider \ + window \ + particles \ + demos \ + rendercontrol + + # Widget dependent examples + qtHaveModule(widgets) { + SUBDIRS += embeddedinwidgets + qtHaveModule(quickwidgets): SUBDIRS += quickwidgets + } -EXAMPLE_FILES = \ - shared + EXAMPLE_FILES = \ + shared +} diff --git a/src/imports/imports.pro b/src/imports/imports.pro index f7002f9ed5..528269e0f6 100644 --- a/src/imports/imports.pro +++ b/src/imports/imports.pro @@ -11,9 +11,13 @@ SUBDIRS += \ qtHaveModule(quick) { SUBDIRS += \ qtquick2 \ - particles \ - window \ - testlib + window + + contains(QT_CONFIG, opengl(es1|es2)?) { + SUBDIRS += \ + particles \ + testlib + } } qtHaveModule(xmlpatterns) : SUBDIRS += xmllistmodel diff --git a/src/quick/scenegraph/coreapi/qsggeometry.cpp b/src/quick/scenegraph/coreapi/qsggeometry.cpp index 5012f6a31b..cbc5f86527 100644 --- a/src/quick/scenegraph/coreapi/qsggeometry.cpp +++ b/src/quick/scenegraph/coreapi/qsggeometry.cpp @@ -42,7 +42,10 @@ #include <qopenglcontext.h> #include <qopenglfunctions.h> + +#ifndef QT_NO_OPENGL #include <private/qopenglextensions_p.h> +#endif #ifdef Q_OS_QNX #include <malloc.h> diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp index 78b803df83..ada358f02d 100644 --- a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp +++ b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp @@ -45,7 +45,10 @@ #include <QtGui/private/qguiapplication_p.h> #include <qpa/qplatformintegration.h> #include <private/qfontengine_p.h> + +#ifndef QT_NO_OPENGL #include <private/qopenglextensions_p.h> +#endif #include <QtQuick/qquickwindow.h> #include <QtQuick/private/qsgtexture_p.h> diff --git a/src/quick/scenegraph/util/qsgdefaultpainternode.cpp b/src/quick/scenegraph/util/qsgdefaultpainternode.cpp index 2deb993a6e..925f3b5b9f 100644 --- a/src/quick/scenegraph/util/qsgdefaultpainternode.cpp +++ b/src/quick/scenegraph/util/qsgdefaultpainternode.cpp @@ -42,13 +42,18 @@ #include <QtQuick/private/qquickpainteditem_p.h> #include <QtQuick/private/qsgcontext_p.h> -#include <private/qopenglextensions_p.h> + #include <qopenglframebufferobject.h> #include <qopenglfunctions.h> #include <qopenglpaintdevice.h> + #include <qmath.h> #include <qpainter.h> +#ifndef QT_NO_OPENGL +#include <private/qopenglextensions_p.h> +#endif + QT_BEGIN_NAMESPACE #define QT_MINIMUM_DYNAMIC_FBO_SIZE 64U diff --git a/src/quick/scenegraph/util/qsgdepthstencilbuffer_p.h b/src/quick/scenegraph/util/qsgdepthstencilbuffer_p.h index c2d0590532..13a2803c30 100644 --- a/src/quick/scenegraph/util/qsgdepthstencilbuffer_p.h +++ b/src/quick/scenegraph/util/qsgdepthstencilbuffer_p.h @@ -53,10 +53,13 @@ #include <QtCore/qsize.h> #include <QtGui/private/qopenglcontext_p.h> -#include <QtGui/private/qopenglextensions_p.h> #include <QtCore/qsharedpointer.h> #include <QtCore/qhash.h> +#ifndef QT_NO_OPENGL +#include <QtGui/private/qopenglextensions_p.h> +#endif + QT_BEGIN_NAMESPACE class QSGDepthStencilBufferManager; diff --git a/src/src.pro b/src/src.pro index 385e4eb601..f34e9cda9f 100644 --- a/src/src.pro +++ b/src/src.pro @@ -3,13 +3,17 @@ CONFIG += ordered SUBDIRS += \ qml -qtHaveModule(gui):contains(QT_CONFIG, opengl(es1|es2)?) { +qtHaveModule(gui) { SUBDIRS += \ - quick \ - qmltest \ - particles + quick - qtHaveModule(widgets): SUBDIRS += quickwidgets + contains(QT_CONFIG, opengl(es1|es2)?) { + SUBDIRS += \ + qmltest \ + particles + + qtHaveModule(widgets): SUBDIRS += quickwidgets + } } SUBDIRS += \ diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index 425e88b983..cf3da263ca 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -1,15 +1,20 @@ TEMPLATE=subdirs -SUBDIRS=\ - qml \ - quick \ - particles \ - qmltest \ - qmldevtools \ + +SUBDIRS = \ cmake \ installed_cmake \ - toolsupport + qmldevtools + +qtHaveModule(quick):contains(QT_CONFIG, opengl(es1|es2)?) { + SUBDIRS += \ + qml \ + quick \ + particles \ + qmltest \ + toolsupport -qtHaveModule(widgets): SUBDIRS += quickwidgets + qtHaveModule(widgets): SUBDIRS += quickwidgets +} qmldevtools.CONFIG = host_build |