summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Edelev <[email protected]>2022-09-23 17:40:22 +0200
committerAlexey Edelev <[email protected]>2022-09-24 14:05:34 +0200
commit10f4eb0e585a1a2b13d049a8d5496302a43bcafe (patch)
treee861e3f5a403d3de61c5aabf1083596ad7ffdd0d
parentf7e4987966205154fcbd819df31aef2dcece5397 (diff)
Fix build without opengl feature
Guard private includes of private opengl headers and make public opengl headers available even if feature is disabled, since they can be used by user projects. Task-number: QTBUG-103196 Change-Id: If492c97b5cfb21d8aac0d607bc7add38b6d0c73e Reviewed-by: Alexandru Croitor <[email protected]>
-rw-r--r--src/gui/CMakeLists.txt16
-rw-r--r--src/gui/kernel/qguiapplication.cpp4
-rw-r--r--src/gui/painting/qpathsimplifier.cpp4
-rw-r--r--src/gui/platform/unix/qunixnativeinterface.cpp4
4 files changed, 19 insertions, 9 deletions
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
index 2a95babc048..f6c2b2979a6 100644
--- a/src/gui/CMakeLists.txt
+++ b/src/gui/CMakeLists.txt
@@ -101,6 +101,7 @@ qt_internal_add_module(Gui
kernel/qkeymapper.cpp kernel/qkeymapper_p.h
kernel/qoffscreensurface.cpp kernel/qoffscreensurface.h kernel/qoffscreensurface_p.h
kernel/qoffscreensurface_platform.h
+ kernel/qopenglcontext.h
kernel/qpaintdevicewindow.cpp kernel/qpaintdevicewindow.h kernel/qpaintdevicewindow_p.h
kernel/qpalette.cpp kernel/qpalette.h
kernel/qpixelformat.cpp kernel/qpixelformat.h
@@ -118,6 +119,7 @@ qt_internal_add_module(Gui
kernel/qplatformmenu.cpp kernel/qplatformmenu.h kernel/qplatformmenu_p.h
kernel/qplatformnativeinterface.cpp kernel/qplatformnativeinterface.h
kernel/qplatformoffscreensurface.cpp kernel/qplatformoffscreensurface.h
+ kernel/qplatformopenglcontext.h
kernel/qplatformscreen.cpp kernel/qplatformscreen.h kernel/qplatformscreen_p.h
kernel/qplatformservices.cpp kernel/qplatformservices.h
kernel/qplatformsessionmanager.cpp kernel/qplatformsessionmanager.h
@@ -147,6 +149,10 @@ qt_internal_add_module(Gui
math3d/qvector3d.h
math3d/qvector4d.h
math3d/qvectornd.cpp math3d/qvectornd.h
+ opengl/qopengl.h
+ opengl/qopenglext.h
+ opengl/qopenglfunctions.h
+ opengl/qopenglextrafunctions.h
painting/qbackingstore.cpp painting/qbackingstore.h
painting/qbackingstoredefaultcompositor.cpp painting/qbackingstoredefaultcompositor_p.h
painting/qbackingstorerhisupport.cpp painting/qbackingstorerhisupport_p.h
@@ -351,14 +357,12 @@ endif()
qt_internal_extend_target(Gui CONDITION QT_FEATURE_opengl
SOURCES
- kernel/qopenglcontext.cpp kernel/qopenglcontext.h kernel/qopenglcontext_p.h
+ kernel/qopenglcontext.cpp kernel/qopenglcontext_p.h
kernel/qopenglcontext_platform.h
- kernel/qplatformopenglcontext.cpp kernel/qplatformopenglcontext.h
- opengl/qopengl.cpp opengl/qopengl.h opengl/qopengl_p.h
- opengl/qopenglext.h
+ kernel/qplatformopenglcontext.cpp
+ opengl/qopengl.cpp opengl/qopengl_p.h
opengl/qopenglextensions_p.h
- opengl/qopenglextrafunctions.h
- opengl/qopenglfunctions.cpp opengl/qopenglfunctions.h
+ opengl/qopenglfunctions.cpp
opengl/qopenglprogrambinarycache.cpp opengl/qopenglprogrambinarycache_p.h
rhi/qrhigles2.cpp rhi/qrhigles2_p.h
rhi/qrhigles2_p_p.h
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index b99b08ca92a..38ec93cf6fe 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -51,7 +51,9 @@
#include <qpa/qwindowsysteminterface_p.h>
#include "private/qwindow_p.h"
#include "private/qcursor_p.h"
-#include "private/qopenglcontext_p.h"
+#if QT_CONFIG(opengl)
+# include "private/qopenglcontext_p.h"
+#endif
#include "private/qinputdevicemanager_p.h"
#include "private/qinputmethod_p.h"
#include "private/qpointingdevice_p.h"
diff --git a/src/gui/painting/qpathsimplifier.cpp b/src/gui/painting/qpathsimplifier.cpp
index 6c061b2bb1b..36baccd3e40 100644
--- a/src/gui/painting/qpathsimplifier.cpp
+++ b/src/gui/painting/qpathsimplifier.cpp
@@ -8,7 +8,9 @@
#include <QtCore/qpoint.h>
#include <QtCore/qalgorithms.h>
-#include <private/qopengl_p.h>
+#if QT_CONFIG(opengl)
+# include <private/qopengl_p.h>
+#endif
#include <private/qrbtree_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/gui/platform/unix/qunixnativeinterface.cpp b/src/gui/platform/unix/qunixnativeinterface.cpp
index 4ea88a590b3..60a96932e69 100644
--- a/src/gui/platform/unix/qunixnativeinterface.cpp
+++ b/src/gui/platform/unix/qunixnativeinterface.cpp
@@ -3,7 +3,9 @@
#include <QtGui/private/qtguiglobal_p.h>
-#include <QtGui/private/qopenglcontext_p.h>
+#if QT_CONFIG(opengl)
+# include <QtGui/private/qopenglcontext_p.h>
+#endif
#include <QtGui/private/qguiapplication_p.h>
#include <qpa/qplatformopenglcontext.h>