UI: Fix Qt platform override in CMake 3

This override is still needed until Qt minimum version requirement is
increased to at least 6.3.0.

ui-config.h.in and CMake 2 are modified to avoid USE_XDG redefinition in
CMake 3.
This commit is contained in:
tytan652 2024-05-24 10:05:26 +02:00 • committed by Ryan Foster
commit 116107bc86
4 changed files with 17 additions and 12 deletions

View file

@ -1996,7 +1996,8 @@ static int run_program(fstream &logFile, int argc, char *argv[])
if (platform_theme && strcmp(platform_theme, "qt5ct") == 0)
unsetenv("QT_QPA_PLATFORMTHEME");
#if defined(ENABLE_WAYLAND) && defined(USE_XDG)
#if defined(ENABLE_WAYLAND) && defined(USE_XDG) && \
QT_VERSION < QT_VERSION_CHECK(6, 3, 0)
/* NOTE: Qt doesn't use the Wayland platform on GNOME, so we have to
* force it using the QT_QPA_PLATFORM env var. It's still possible to
* use other QPA platforms using this env var, or the -platform command