Commit d81762d2 authored by Volker Krause's avatar Volker Krause
Browse files

Adapt to QtX11Extras being gone in Qt6

parent 0143247a
......@@ -48,7 +48,7 @@ set(OXYGEN_HAVE_KWAYLAND ${KF5Wayland_FOUND})
if(NOT APPLE)
set(OXYGEN_HAVE_X11 ${XCB_XCB_FOUND})
if (XCB_XCB_FOUND)
if (XCB_XCB_FOUND AND QT_MAJOR_VERSION EQUAL "5")
find_package(Qt5 REQUIRED CONFIG COMPONENTS X11Extras)
endif()
endif()
......
......@@ -19,7 +19,7 @@ include_directories(${CMAKE_BINARY_DIR}/liboxygen)
if(UNIX AND NOT APPLE)
set(OXYGEN_HAVE_X11 ${XCB_XCB_FOUND})
if (XCB_XCB_FOUND)
if (XCB_XCB_FOUND AND QT_MAJOR_VERSION EQUAL "5")
find_package(Qt5 REQUIRED CONFIG COMPONENTS X11Extras)
endif()
......@@ -87,10 +87,12 @@ target_link_libraries(oxygendecoration
KF5::WindowSystem)
if(OXYGEN_HAVE_X11)
target_link_libraries(oxygendecoration
PUBLIC
Qt::X11Extras
XCB::XCB)
target_link_libraries(oxygendecoration PUBLIC XCB::XCB)
if (QT_MAJOR_VERSION EQUAL "5")
target_link_libraries(oxygendecoration PUBLIC Qt::X11Extras)
else()
target_link_libraries(oxygendecoration PUBLIC Qt::GuiPrivate)
endif()
endif()
......
......@@ -21,7 +21,11 @@
#include <QMouseEvent>
#include <config-oxygen.h>
#if OXYGEN_HAVE_X11
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <QX11Info>
#else
#include <private/qtx11extras_p.h>
#endif
#include <xcb/xcb.h>
#endif
......
......@@ -12,7 +12,11 @@
#include "config-oxygen.h"
#if OXYGEN_HAVE_X11
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <QX11Info>
#else
#include <private/qtx11extras_p.h>
#endif
#endif
namespace Oxygen
......
......@@ -29,7 +29,11 @@
#include <QTimer>
#if OXYGEN_HAVE_X11
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <QX11Info>
#else
#include <private/qtx11extras_p.h>
#endif
#endif
K_PLUGIN_FACTORY_WITH_JSON(
......
......@@ -15,7 +15,11 @@
#include <QPalette>
#if OXYGEN_HAVE_X11
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <QX11Info>
#else
#include <private/qtx11extras_p.h>
#endif
#endif
namespace Oxygen
......
......@@ -75,7 +75,11 @@ target_link_libraries(oxygen oxygenstyle5)
if(OXYGEN_HAVE_X11)
target_link_libraries(oxygen XCB::XCB)
target_link_libraries(oxygen Qt::X11Extras)
if (QT_MAJOR_VERSION EQUAL "5")
target_link_libraries(oxygen Qt::X11Extras)
else()
target_link_libraries(oxygen Qt::GuiPrivate)
endif()
endif()
if(OXYGEN_HAVE_KWAYLAND)
......
......@@ -19,7 +19,11 @@
#include <math.h>
#if OXYGEN_HAVE_X11
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <QX11Info>
#else
#include <private/qtx11extras_p.h>
#endif
#endif
namespace Oxygen
......
......@@ -39,7 +39,6 @@
#include <QWindow>
#if OXYGEN_HAVE_X11
#include <QX11Info>
#include <xcb/xcb.h>
#include <NETWM>
......
......@@ -37,7 +37,12 @@ target_link_libraries(oxygenstyle5
target_include_directories(oxygenstyle5 PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>")
if(OXYGEN_HAVE_X11)
target_link_libraries(oxygenstyle5 PRIVATE XCB::XCB Qt::X11Extras)
target_link_libraries(oxygenstyle5 PRIVATE XCB::XCB)
if (QT_MAJOR_VERSION EQUAL "5")
target_link_libraries(oxygenstyle5 PRIVATE Qt5::X11Extras)
else()
target_link_libraries(oxygenstyle5 PRIVATE Qt::GuiPrivate)
endif()
endif()
set_target_properties(oxygenstyle5 PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
......
......@@ -20,7 +20,11 @@
#include <math.h>
#if OXYGEN_HAVE_X11
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <QX11Info>
#else
#include <private/qtx11extras_p.h>
#endif
#endif
namespace Oxygen
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment