summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2020-01-14 09:28:27 +0100
committerJohan Klokkhammer Helsing <johan.helsing@qt.io>2020-01-14 11:31:29 +0100
commit96dea48c154e5971593582f92917db3b3f17c7fa (patch)
treeb4cba1721f09e46c5d9f5b492357bc0e5d52f7e8
parent123cf74dd00307478ac72ec4fd34d9198a603379 (diff)
Make the opengl module optionally depend on widgets
Previously, it was a hard dependency, so the opengl module wouldn't get built when configured with -no-feature-widgets even though the widget dependency is only needed for QOpenGLWidget. Task-number: QTBUG-74409 Change-Id: Icc6e7599d0c9c31e9448456eef1e5ecc4605234a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
-rw-r--r--src/opengl/qopenglwidget.h4
-rw-r--r--src/src.pro13
2 files changed, 9 insertions, 8 deletions
diff --git a/src/opengl/qopenglwidget.h b/src/opengl/qopenglwidget.h
index b331880b5d..b266dc359d 100644
--- a/src/opengl/qopenglwidget.h
+++ b/src/opengl/qopenglwidget.h
@@ -42,7 +42,7 @@
#include <QtOpenGL/qtopenglglobal.h>
-#ifndef QT_NO_OPENGL
+#ifdef QT_WIDGETS_LIB
#include <QtWidgets/QWidget>
#include <QtGui/QSurfaceFormat>
@@ -110,6 +110,6 @@ private:
QT_END_NAMESPACE
-#endif // QT_NO_OPENGL
+#endif // QT_WIDGETS_LIB
#endif // QOPENGLWIDGET_H
diff --git a/src/src.pro b/src/src.pro
index 592f0cf644..0b8ae6d308 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -134,7 +134,7 @@ src_widgets.depends = src_corelib src_gui src_tools_uic src_platformheaders
src_opengl.subdir = $$PWD/opengl
src_opengl.target = sub-opengl
-src_opengl.depends = src_gui src_widgets
+src_opengl.depends = src_gui
src_openglextensions.subdir = $$PWD/openglextensions
src_openglextensions.target = sub-openglextensions
@@ -217,7 +217,11 @@ qtConfig(gui) {
TOOLS += src_tools_qvkgen
}
SUBDIRS += src_gui src_platformsupport src_platformheaders
- qtConfig(opengl): SUBDIRS += src_openglextensions
+ qtConfig(opengl) {
+ SUBDIRS += src_openglextensions
+ SUBDIRS += src_opengl
+ src_plugins.depends += src_opengl
+ }
src_plugins.depends += src_gui src_platformsupport src_platformheaders
src_testlib.depends += src_gui # if QtGui is enabled, QtTest requires QtGui's headers
qtConfig(widgets) {
@@ -225,14 +229,11 @@ qtConfig(gui) {
TOOLS += src_tools_uic
src_plugins.depends += src_widgets
src_testlib.depends += src_widgets # if QtWidgets is enabled, QtTest requires QtWidgets's headers
+ src_opengl.depends += src_widgets
qtConfig(printer) {
SUBDIRS += src_printsupport
src_plugins.depends += src_printsupport
}
- qtConfig(opengl) {
- SUBDIRS += src_opengl
- src_plugins.depends += src_opengl
- }
}
}
SUBDIRS += src_plugins