Compile with -no-opengl

A few of the tests were including Qt OpenGL for no good reason,
and the link step should be optional.

Pick-to: 6.2 6.5 6.5.0
Fixes: QTBUG-110420
Change-Id: Icb78c15e49070c6938bf9bb75abfed677af6785b
Reviewed-by: Inho Lee <inho.lee@qt.io>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
This commit is contained in:
Eskil Abrahamsen Blomfeldt 2023-03-06 14:37:17 +01:00
parent a20ee861d6
commit 0042b8040f
10 changed files with 5 additions and 10 deletions

View File

@ -3,7 +3,6 @@
#include "mockcompositor.h"
#include <QtOpenGL/QOpenGLWindow>
#include <QtGui/QRasterWindow>
#include <QtGui/QClipboard>
#include <QtGui/QDrag>

View File

@ -5,7 +5,6 @@
#include <qwayland-server-wp-primary-selection-unstable-v1.h>
#include <QtOpenGL/QOpenGLWindow>
#include <QtGui/QRasterWindow>
#include <QtGui/QClipboard>
#include <QtCore/private/qcore_unix_p.h>

View File

@ -2,7 +2,6 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "mockcompositor.h"
#include <QtOpenGL/QOpenGLWindow>
#include <QtGui/QRasterWindow>
#include <QtGui/qpa/qplatformnativeinterface.h>
#include <QtWaylandClient/private/wayland-wayland-client-protocol.h>

View File

@ -2,7 +2,6 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "mockcompositor.h"
#include <QtOpenGL/QOpenGLWindow>
#include <QtGui/QRasterWindow>
#include <QtGui/QEventPoint>

View File

@ -3,7 +3,6 @@
#include "mockcompositor.h"
#include <QtOpenGL/QOpenGLWindow>
#include <QtGui/QRasterWindow>
#if QT_CONFIG(cursor)
#include <wayland-cursor.h>

View File

@ -2,7 +2,6 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "mockcompositor.h"
#include <QtOpenGL/QOpenGLWindow>
#include <QtGui/QRasterWindow>
#include <QtGui/QEventPoint>

View File

@ -53,10 +53,14 @@ qt6_generate_wayland_protocol_server_sources(SharedClientTest
${PROJECT_SOURCE_DIR}/src/3rdparty/protocol/xdg-shell.xml
)
if(QT_FEATURE_opengl)
set(optional_libraries Qt::OpenGL)
endif()
target_link_libraries(SharedClientTest
PUBLIC
Qt::Gui
Qt::OpenGL
${optional_libraries}
Qt::WaylandClientPrivate
Wayland::Server
Threads::Threads # special case

View File

@ -5,7 +5,6 @@
#include <qwayland-server-xdg-decoration-unstable-v1.h>
#include <QtOpenGL/QOpenGLWindow>
#include <QtGui/QRasterWindow>
#include <QtGui/QClipboard>
#include <QtCore/private/qcore_unix_p.h>

View File

@ -4,7 +4,6 @@
#include "xdgoutputv1.h"
#include "mockcompositor.h"
#include <QtOpenGL/QOpenGLWindow>
#include <QtGui/QRasterWindow>
#include <QtGui/QScreen>

View File

@ -2,7 +2,6 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "mockcompositor.h"
#include <QtOpenGL/QOpenGLWindow>
#include <QtGui/QRasterWindow>
#include <QtGui/qpa/qplatformnativeinterface.h>
#include <QtWaylandClient/private/wayland-wayland-client-protocol.h>