mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
generic: remove redundant X11 checks and headers inclusions
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
89914d3016
commit
ac36e123ec
6 changed files with 20 additions and 42 deletions
|
@ -35,13 +35,15 @@ set(LIBRARY_TYPE SHARED)
|
||||||
find_package(KDE4Internal REQUIRED)
|
find_package(KDE4Internal REQUIRED)
|
||||||
include(KDE4Defaults)
|
include(KDE4Defaults)
|
||||||
|
|
||||||
if(UNIX AND Q_WS_X11)
|
|
||||||
# X11 Session Management (SM) is required
|
# X11 Session Management (SM) is required
|
||||||
# X11_SM_FOUND is set in FindX11, which is required by KDE4Internal
|
# X11_SM_FOUND is set in FindX11, which is required by KDE4Internal
|
||||||
if(NOT X11_SM_FOUND)
|
if(NOT X11_SM_FOUND)
|
||||||
message(FATAL_ERROR "\nThe X11 Session Management (SM) development package could not be found.\nPlease install libSM.\n")
|
message(FATAL_ERROR "\nThe X11 Session Management (SM) development package could not be found.\nPlease install libSM.\n")
|
||||||
endif(NOT X11_SM_FOUND)
|
endif(NOT X11_SM_FOUND)
|
||||||
endif(UNIX AND Q_WS_X11)
|
|
||||||
|
if(NOT X11_XSync_FOUND AND NOT X11_Xscreensaver_FOUND)
|
||||||
|
message(FATAL_ERROR "\nNeither the XSync (libXext) nor XScreensaver (libXss) development package was found.\nPlease install one of them (XSync is recommended)\n")
|
||||||
|
endif(NOT X11_XSync_FOUND AND NOT X11_Xscreensaver_FOUND)
|
||||||
|
|
||||||
if(ENABLE_TESTING)
|
if(ENABLE_TESTING)
|
||||||
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
||||||
|
@ -89,7 +91,6 @@ set_package_properties(CURL PROPERTIES
|
||||||
)
|
)
|
||||||
|
|
||||||
# optional features
|
# optional features
|
||||||
if(X11_FOUND)
|
|
||||||
kde4_bool_to_01(X11_XTest_FOUND HAVE_XTEST)
|
kde4_bool_to_01(X11_XTest_FOUND HAVE_XTEST)
|
||||||
kde4_bool_to_01(X11_Xcursor_FOUND HAVE_XCURSOR)
|
kde4_bool_to_01(X11_Xcursor_FOUND HAVE_XCURSOR)
|
||||||
kde4_bool_to_01(X11_Xfixes_FOUND HAVE_XFIXES)
|
kde4_bool_to_01(X11_Xfixes_FOUND HAVE_XFIXES)
|
||||||
|
@ -102,11 +103,6 @@ if(X11_FOUND)
|
||||||
add_feature_info("X Screensaver Extension (libXss)" HAVE_XSCREENSAVER "Support for KIdleTime (fallback mode)")
|
add_feature_info("X Screensaver Extension (libXss)" HAVE_XSCREENSAVER "Support for KIdleTime (fallback mode)")
|
||||||
add_feature_info("X Sync Extension (libXext)" HAVE_XSYNC "Efficient operation of KIdleTime")
|
add_feature_info("X Sync Extension (libXext)" HAVE_XSYNC "Efficient operation of KIdleTime")
|
||||||
|
|
||||||
if(NOT HAVE_XSYNC AND NOT HAVE_XSCREENSAVER)
|
|
||||||
message(FATAL_ERROR "\nNeither the XSync (libXext) nor XScreensaver (libXss) development package was found.\nPlease install one of them (XSync is recommended)\n")
|
|
||||||
endif(NOT HAVE_XSYNC AND NOT HAVE_XSCREENSAVER)
|
|
||||||
endif(X11_FOUND)
|
|
||||||
|
|
||||||
kde4_optional_find_package(MPV 0.23.0)
|
kde4_optional_find_package(MPV 0.23.0)
|
||||||
set_package_properties(MPV PROPERTIES
|
set_package_properties(MPV PROPERTIES
|
||||||
DESCRIPTION "A fork of mplayer2 and MPlayer"
|
DESCRIPTION "A fork of mplayer2 and MPlayer"
|
||||||
|
|
|
@ -155,9 +155,7 @@ target_link_libraries(plasma PUBLIC
|
||||||
${PLASMA_EXTRA_LIBS}
|
${PLASMA_EXTRA_LIBS}
|
||||||
)
|
)
|
||||||
|
|
||||||
if(X11_FOUND)
|
|
||||||
target_link_libraries(plasma PRIVATE ${X11_LIBRARIES})
|
target_link_libraries(plasma PRIVATE ${X11_LIBRARIES})
|
||||||
endif(X11_FOUND)
|
|
||||||
|
|
||||||
set_target_properties(plasma PROPERTIES
|
set_target_properties(plasma PROPERTIES
|
||||||
VERSION ${GENERIC_LIB_VERSION}
|
VERSION ${GENERIC_LIB_VERSION}
|
||||||
|
|
|
@ -25,9 +25,6 @@
|
||||||
|
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QtGui/qevent.h>
|
#include <QtGui/qevent.h>
|
||||||
#ifdef Q_WS_X11
|
|
||||||
#include <QtGui/qx11info_x11.h>
|
|
||||||
#endif
|
|
||||||
#include <QBitmap>
|
#include <QBitmap>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QtGui/QVBoxLayout>
|
#include <QtGui/QVBoxLayout>
|
||||||
|
@ -53,10 +50,6 @@
|
||||||
#include "plasma/widgets/scrollwidget.h"
|
#include "plasma/widgets/scrollwidget.h"
|
||||||
#include "plasma/windoweffects.h"
|
#include "plasma/windoweffects.h"
|
||||||
|
|
||||||
#ifdef Q_WS_X11
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace Plasma
|
namespace Plasma
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -29,10 +29,6 @@
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QDeclarativeItem>
|
#include <QDeclarativeItem>
|
||||||
|
|
||||||
#ifdef Q_WS_X11
|
|
||||||
#include <QtGui/qx11info_x11.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <kicon.h>
|
#include <kicon.h>
|
||||||
#include <kiconloader.h>
|
#include <kiconloader.h>
|
||||||
#include <kwindowsystem.h>
|
#include <kwindowsystem.h>
|
||||||
|
|
|
@ -31,10 +31,6 @@
|
||||||
#include <QTextDocument>
|
#include <QTextDocument>
|
||||||
#include <QPropertyAnimation>
|
#include <QPropertyAnimation>
|
||||||
#include <QtGui/qtextobject.h>
|
#include <QtGui/qtextobject.h>
|
||||||
#ifdef Q_WS_X11
|
|
||||||
#include <QtGui/qx11info_x11.h>
|
|
||||||
#include <netwm.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <kdebug.h>
|
#include <kdebug.h>
|
||||||
#include <kglobal.h>
|
#include <kglobal.h>
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QCache>
|
#include <QCache>
|
||||||
#include <QBuffer>
|
#include <QBuffer>
|
||||||
#include <QX11Info>
|
|
||||||
|
|
||||||
#include <kcolorscheme.h>
|
#include <kcolorscheme.h>
|
||||||
#include <kcomponentdata.h>
|
#include <kcomponentdata.h>
|
||||||
|
|
Loading…
Add table
Reference in a new issue