From 0042b8040f3d3a3a531810bed8180e0fcd4d4f96 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Mon, 6 Mar 2023 14:37:17 +0100 Subject: [PATCH] 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 Reviewed-by: David Edmundson --- tests/auto/wayland/datadevicev1/tst_datadevicev1.cpp | 1 - .../wayland/primaryselectionv1/tst_primaryselectionv1.cpp | 1 - tests/auto/wayland/scaling/tst_scaling.cpp | 1 - tests/auto/wayland/seat/tst_seat.cpp | 1 - tests/auto/wayland/seatv4/tst_seatv4.cpp | 1 - tests/auto/wayland/seatv7/tst_seatv7.cpp | 1 - tests/auto/wayland/shared/CMakeLists.txt | 6 +++++- tests/auto/wayland/xdgdecorationv1/tst_xdgdecorationv1.cpp | 1 - tests/auto/wayland/xdgoutput/tst_xdgoutput.cpp | 1 - tests/auto/wayland/xdgshell/tst_xdgshell.cpp | 1 - 10 files changed, 5 insertions(+), 10 deletions(-) diff --git a/tests/auto/wayland/datadevicev1/tst_datadevicev1.cpp b/tests/auto/wayland/datadevicev1/tst_datadevicev1.cpp index d78255e9fc8..cdbf7379a2a 100644 --- a/tests/auto/wayland/datadevicev1/tst_datadevicev1.cpp +++ b/tests/auto/wayland/datadevicev1/tst_datadevicev1.cpp @@ -3,7 +3,6 @@ #include "mockcompositor.h" -#include #include #include #include diff --git a/tests/auto/wayland/primaryselectionv1/tst_primaryselectionv1.cpp b/tests/auto/wayland/primaryselectionv1/tst_primaryselectionv1.cpp index 558e4676b3e..b9e12873052 100644 --- a/tests/auto/wayland/primaryselectionv1/tst_primaryselectionv1.cpp +++ b/tests/auto/wayland/primaryselectionv1/tst_primaryselectionv1.cpp @@ -5,7 +5,6 @@ #include -#include #include #include #include diff --git a/tests/auto/wayland/scaling/tst_scaling.cpp b/tests/auto/wayland/scaling/tst_scaling.cpp index bceea92d49b..f94c37cc99b 100644 --- a/tests/auto/wayland/scaling/tst_scaling.cpp +++ b/tests/auto/wayland/scaling/tst_scaling.cpp @@ -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 #include #include #include diff --git a/tests/auto/wayland/seat/tst_seat.cpp b/tests/auto/wayland/seat/tst_seat.cpp index 8a9375d6872..9db10d552db 100644 --- a/tests/auto/wayland/seat/tst_seat.cpp +++ b/tests/auto/wayland/seat/tst_seat.cpp @@ -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 #include #include diff --git a/tests/auto/wayland/seatv4/tst_seatv4.cpp b/tests/auto/wayland/seatv4/tst_seatv4.cpp index 314569a1c49..8d78c2b3643 100644 --- a/tests/auto/wayland/seatv4/tst_seatv4.cpp +++ b/tests/auto/wayland/seatv4/tst_seatv4.cpp @@ -3,7 +3,6 @@ #include "mockcompositor.h" -#include #include #if QT_CONFIG(cursor) #include diff --git a/tests/auto/wayland/seatv7/tst_seatv7.cpp b/tests/auto/wayland/seatv7/tst_seatv7.cpp index c341ec96740..e423456c5b5 100644 --- a/tests/auto/wayland/seatv7/tst_seatv7.cpp +++ b/tests/auto/wayland/seatv7/tst_seatv7.cpp @@ -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 #include #include diff --git a/tests/auto/wayland/shared/CMakeLists.txt b/tests/auto/wayland/shared/CMakeLists.txt index 8112ffb7120..a1f150c2245 100644 --- a/tests/auto/wayland/shared/CMakeLists.txt +++ b/tests/auto/wayland/shared/CMakeLists.txt @@ -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 diff --git a/tests/auto/wayland/xdgdecorationv1/tst_xdgdecorationv1.cpp b/tests/auto/wayland/xdgdecorationv1/tst_xdgdecorationv1.cpp index 8adc9dd0e7d..ba91514d20b 100644 --- a/tests/auto/wayland/xdgdecorationv1/tst_xdgdecorationv1.cpp +++ b/tests/auto/wayland/xdgdecorationv1/tst_xdgdecorationv1.cpp @@ -5,7 +5,6 @@ #include -#include #include #include #include diff --git a/tests/auto/wayland/xdgoutput/tst_xdgoutput.cpp b/tests/auto/wayland/xdgoutput/tst_xdgoutput.cpp index ea8719f13d3..bb104dd59c9 100644 --- a/tests/auto/wayland/xdgoutput/tst_xdgoutput.cpp +++ b/tests/auto/wayland/xdgoutput/tst_xdgoutput.cpp @@ -4,7 +4,6 @@ #include "xdgoutputv1.h" #include "mockcompositor.h" -#include #include #include diff --git a/tests/auto/wayland/xdgshell/tst_xdgshell.cpp b/tests/auto/wayland/xdgshell/tst_xdgshell.cpp index efaa6a8f160..101baecc714 100644 --- a/tests/auto/wayland/xdgshell/tst_xdgshell.cpp +++ b/tests/auto/wayland/xdgshell/tst_xdgshell.cpp @@ -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 #include #include #include