diff --git a/kstyle/CMakeLists.txt b/kstyle/CMakeLists.txt --- a/kstyle/CMakeLists.txt +++ b/kstyle/CMakeLists.txt @@ -7,8 +7,9 @@ ConfigWidgets WindowSystem) -find_package(Qt5 COMPONENTS Quick) +find_package(Qt5 COMPONENTS Quick X11Extras) set(BREEZE_HAVE_QTQUICK ${Qt5Quick_FOUND}) +set(BREEZE_HAVE_QTX11EXTRAS ${Qt5X11Extras_FOUND}) find_package( KF5FrameworkIntegration CONFIG ) set_package_properties(KF5FrameworkIntegration PROPERTIES @@ -19,26 +20,6 @@ set(BREEZE_HAVE_KSTYLE ${KF5FrameworkIntegration_FOUND}) -find_package(XCB COMPONENTS XCB) -set_package_properties(XCB PROPERTIES - DESCRIPTION "X protocol C-language Binding" - URL "https://xcb.freedesktop.org" - TYPE OPTIONAL - PURPOSE "Required to pass style properties to native Windows on X11 Platform" -) - -find_package(KF5Wayland CONFIG) -set(BREEZE_HAVE_KWAYLAND ${KF5Wayland_FOUND}) - -if(UNIX AND NOT APPLE) - set(BREEZE_HAVE_X11 ${XCB_XCB_FOUND}) - if (XCB_XCB_FOUND) - find_package(Qt5 REQUIRED CONFIG COMPONENTS X11Extras) - endif() -else() - set(BREEZE_HAVE_X11 FALSE) -endif() - ################# includes ################# include_directories( @@ -101,6 +82,9 @@ if( BREEZE_HAVE_QTQUICK ) target_link_libraries(breeze Qt5::Quick) endif() +if (BREEZE_HAVE_QTX11EXTRAS) + target_link_libraries(breeze Qt5::X11Extras) +endif() target_link_libraries(breeze KF5::ConfigCore KF5::ConfigWidgets KF5::GuiAddons KF5::WindowSystem) target_link_libraries(breeze breezecommon5) @@ -114,15 +98,6 @@ target_compile_definitions(breeze PRIVATE _USE_MATH_DEFINES _BSD_SOURCE) endif() -if(BREEZE_HAVE_X11) - target_link_libraries(breeze ${XCB_LIBRARIES}) - target_link_libraries(breeze Qt5::X11Extras) -endif() - -if(BREEZE_HAVE_KWAYLAND) - target_link_libraries(breeze KF5::WaylandClient) -endif() - ########### install files ############### install(TARGETS breeze DESTINATION ${QT_PLUGIN_INSTALL_DIR}/styles/) diff --git a/kstyle/breezehelper.cpp b/kstyle/breezehelper.cpp --- a/kstyle/breezehelper.cpp +++ b/kstyle/breezehelper.cpp @@ -28,7 +28,7 @@ #include #include -#if BREEZE_HAVE_X11 +#if BREEZE_HAVE_QTX11EXTRAS #include #endif @@ -1575,7 +1575,7 @@ bool Helper::compositingActive() const { - #if BREEZE_HAVE_X11 + #if BREEZE_HAVE_QTX11EXTRAS if( isX11() ) { return QX11Info::isCompositingManagerRunning( QX11Info::appScreen() ); } #endif diff --git a/kstyle/config-breeze.h.cmake b/kstyle/config-breeze.h.cmake --- a/kstyle/config-breeze.h.cmake +++ b/kstyle/config-breeze.h.cmake @@ -25,12 +25,10 @@ /* Define to 1 if QtQuick is available */ #cmakedefine01 BREEZE_HAVE_QTQUICK +/* Define to 1 if QtX11Extras is available */ +#cmakedefine01 BREEZE_HAVE_QTX11EXTRAS + /* Define to 1 if FrameworkIntegration/Kstyle libraries are found */ #cmakedefine01 BREEZE_HAVE_KSTYLE -/* Define to 1 if XCB libraries are found */ -#cmakedefine01 BREEZE_HAVE_X11 - -#cmakedefine01 BREEZE_HAVE_KWAYLAND - #endif