From 1b9e0ccebf0b5014d25223116ed3e85ea4691e3d Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Mon, 6 Mar 2023 14:37:17 +0100 Subject: Compile with -no-opengl A few of the tests were including Qt OpenGL for no good reason, and the link step should be optional. Fixes: QTBUG-110420 Change-Id: Icb78c15e49070c6938bf9bb75abfed677af6785b Reviewed-by: Inho Lee Reviewed-by: David Edmundson (cherry picked from commit 83599e16789f945ef15954f2a2aabb37b245e596) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/client/datadevicev1/tst_datadevicev1.cpp | 1 - tests/auto/client/primaryselectionv1/tst_primaryselectionv1.cpp | 1 - tests/auto/client/scaling/tst_scaling.cpp | 1 - tests/auto/client/seat/tst_seat.cpp | 1 - tests/auto/client/seatv4/tst_seatv4.cpp | 1 - tests/auto/client/seatv7/tst_seatv7.cpp | 1 - tests/auto/client/shared/CMakeLists.txt | 6 +++++- tests/auto/client/xdgdecorationv1/tst_xdgdecorationv1.cpp | 1 - tests/auto/client/xdgoutput/tst_xdgoutput.cpp | 1 - tests/auto/client/xdgshell/tst_xdgshell.cpp | 1 - 10 files changed, 5 insertions(+), 10 deletions(-) diff --git a/tests/auto/client/datadevicev1/tst_datadevicev1.cpp b/tests/auto/client/datadevicev1/tst_datadevicev1.cpp index d78255e9..cdbf7379 100644 --- a/tests/auto/client/datadevicev1/tst_datadevicev1.cpp +++ b/tests/auto/client/datadevicev1/tst_datadevicev1.cpp @@ -3,7 +3,6 @@ #include "mockcompositor.h" -#include #include #include #include diff --git a/tests/auto/client/primaryselectionv1/tst_primaryselectionv1.cpp b/tests/auto/client/primaryselectionv1/tst_primaryselectionv1.cpp index 558e4676..b9e12873 100644 --- a/tests/auto/client/primaryselectionv1/tst_primaryselectionv1.cpp +++ b/tests/auto/client/primaryselectionv1/tst_primaryselectionv1.cpp @@ -5,7 +5,6 @@ #include -#include #include #include #include diff --git a/tests/auto/client/scaling/tst_scaling.cpp b/tests/auto/client/scaling/tst_scaling.cpp index bceea92d..f94c37cc 100644 --- a/tests/auto/client/scaling/tst_scaling.cpp +++ b/tests/auto/client/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/client/seat/tst_seat.cpp b/tests/auto/client/seat/tst_seat.cpp index 8a9375d6..9db10d55 100644 --- a/tests/auto/client/seat/tst_seat.cpp +++ b/tests/auto/client/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/client/seatv4/tst_seatv4.cpp b/tests/auto/client/seatv4/tst_seatv4.cpp index 314569a1..8d78c2b3 100644 --- a/tests/auto/client/seatv4/tst_seatv4.cpp +++ b/tests/auto/client/seatv4/tst_seatv4.cpp @@ -3,7 +3,6 @@ #include "mockcompositor.h" -#include #include #if QT_CONFIG(cursor) #include diff --git a/tests/auto/client/seatv7/tst_seatv7.cpp b/tests/auto/client/seatv7/tst_seatv7.cpp index c341ec96..e423456c 100644 --- a/tests/auto/client/seatv7/tst_seatv7.cpp +++ b/tests/auto/client/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/client/shared/CMakeLists.txt b/tests/auto/client/shared/CMakeLists.txt index 8112ffb7..a1f150c2 100644 --- a/tests/auto/client/shared/CMakeLists.txt +++ b/tests/auto/client/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/client/xdgdecorationv1/tst_xdgdecorationv1.cpp b/tests/auto/client/xdgdecorationv1/tst_xdgdecorationv1.cpp index 8adc9dd0..ba91514d 100644 --- a/tests/auto/client/xdgdecorationv1/tst_xdgdecorationv1.cpp +++ b/tests/auto/client/xdgdecorationv1/tst_xdgdecorationv1.cpp @@ -5,7 +5,6 @@ #include -#include #include #include #include diff --git a/tests/auto/client/xdgoutput/tst_xdgoutput.cpp b/tests/auto/client/xdgoutput/tst_xdgoutput.cpp index b1dcde43..4112068a 100644 --- a/tests/auto/client/xdgoutput/tst_xdgoutput.cpp +++ b/tests/auto/client/xdgoutput/tst_xdgoutput.cpp @@ -4,7 +4,6 @@ #include "xdgoutputv1.h" #include "mockcompositor.h" -#include #include #include diff --git a/tests/auto/client/xdgshell/tst_xdgshell.cpp b/tests/auto/client/xdgshell/tst_xdgshell.cpp index efaa6a8f..101baecc 100644 --- a/tests/auto/client/xdgshell/tst_xdgshell.cpp +++ b/tests/auto/client/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 -- cgit v1.2.1