[kde-workspace] /: Move find_package() calls into the respective directories

Aleix Pol aleixpol at kde.org
Thu Mar 20 22:41:43 UTC 2014


Git commit 7ea2aad44318e2c981409dbac23fb0fd9cb3e117 by Aleix Pol.
Committed on 20/03/2014 at 18:43.
Pushed by apol into branch 'master'.

Move find_package() calls into the respective directories

All should be done except for KF5 and Qt.
I tried to go through all projects and see whether it depended on the
different modules. I would appreciate it very much if the different
maintainers could take a look and see if everything is correct.

CCMAIL: plasma-devel at kde.org

M  +0    -153  CMakeLists.txt
M  +12   -0    khotkeys/CMakeLists.txt
M  +48   -0    kinfocenter/CMakeLists.txt
M  +7    -0    krunner/CMakeLists.txt
M  +12   -0    kstyles/CMakeLists.txt
M  +5    -0    kwin/CMakeLists.txt
M  +3    -0    libksysguard/CMakeLists.txt
M  +13   -0    oxygen/CMakeLists.txt
M  +32   -0    plasma-desktop/CMakeLists.txt
M  +56   -0    plasma-workspace/CMakeLists.txt
M  +0    -4    plasma-workspace/krunner/CMakeLists.txt
M  +13   -1    powerdevil/CMakeLists.txt
M  +1    -1    powerdevil/daemon/powerdevilcore.cpp
M  +1    -1    powerdevil/daemon/powerdevilfdoconnector.cpp
M  +2    -2    powerdevil/kcmodule/common/actioneditwidget.cpp
M  +1    -1    powerdevil/kcmodule/global/GeneralPage.cpp
M  +2    -2    powerdevil/kcmodule/profiles/EditPage.cpp

http://commits.kde.org/kde-workspace/7ea2aad44318e2c981409dbac23fb0fd9cb3e117

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9ce0dd3..c67b0eb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -50,159 +50,6 @@ find_package(KF5 CONFIG REQUIRED
     I18n GuiAddons Service ConfigWidgets ItemViews Notifications IconThemes FrameworkIntegration Completion JobWidgets TextWidgets XmlGui Crash
     Bookmarks UnitConversion KIO KCMUtils Parts Kross NotifyConfig Su DocTools NewStuff KHtml Declarative Init Runner Activities Plasma PlasmaQuick KDE4Support)
 
-find_package(ZLIB)
-set_package_properties(ZLIB PROPERTIES DESCRIPTION "Support for gzip compressed files and data streams"
-                       URL "http://www.zlib.net"
-                       TYPE REQUIRED
-                      )
-
-find_package(dbusmenu-qt5 CONFIG)
-set_package_properties(dbusmenu-qt5 PROPERTIES DESCRIPTION "Support for notification area menus via the DBusMenu protocol"
-                       URL "https://launchpad.net/libdbusmenu-qt"
-                       TYPE OPTIONAL
-                      )
-
-find_package(QImageBlitz)
-set_package_properties(QImageBlitz PROPERTIES DESCRIPTION "An image effects library"
-                       URL "http://sourceforge.net/projects/qimageblitz"
-                       TYPE OPTIONAL
-                      )
-
-# find_package(KF5Declarative QUIET CONFIG)
-set_package_properties(KDeclarative PROPERTIES DESCRIPTION "KDE Declarative (QML) support from kdelibs"
-                       URL "http://www.kde.org"
-                       TYPE REQUIRED
-                       PURPOSE "Required for building ksmserver"
-                      )
-
-find_package(OpenGL)
-set_package_properties(OpenGL PROPERTIES DESCRIPTION "The OpenGL libraries"
-                       URL "http://www.opengl.org"
-                       TYPE OPTIONAL
-                      )
-find_package(OpenGLES)
-set_package_properties(OpenGLES PROPERTIES DESCRIPTION "The OpenGLES libraries"
-                       URL "http://www.khronos.org/opengles"
-                       TYPE OPTIONAL
-                      )
-find_package(EGL)
-set_package_properties(EGL PROPERTIES
-                       TYPE OPTIONAL
-                       PURPOSE "Required to build KWin with EGL support"
-                      )
-
-find_package(Wayland 1.2 COMPONENTS Client Egl Cursor)
-set_package_properties(Wayland PROPERTIES
-                       TYPE OPTIONAL
-                       PURPOSE "Required for building KWin with Wayland support"
-                      )
-add_feature_info("Wayland-Client" Wayland_Client_FOUND "Required for building the Wayland backend in KWin")
-add_feature_info("Wayland-EGL" Wayland_Egl_FOUND "Required for building the Wayland EGL compositing backend in KWin")
-
-find_package(XKB)
-set_package_properties(XKB PROPERTIES
-                       TYPE OPTIONAL
-                       PURPOSE "Required for building KWin with Wayland support"
-                      )
-
-
-find_package(X11)
-
-set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"
-                        URL "http://www.x.org"
-                        TYPE OPTIONAL
-                        PURPOSE "Required for building the X11 based workspace"
-                    )
-
-if(X11_FOUND)
-  find_package(XCB REQUIRED COMPONENTS XCB XFIXES DAMAGE COMPOSITE SHAPE SYNC RENDER RANDR KEYSYMS IMAGE SHM XTEST)
-  set_package_properties(XCB PROPERTIES TYPE REQUIRED)
-  find_package(XCB COMPONENTS ICCCM)
-  add_feature_info("XCB-ICCCM" XCB_ICCCM_FOUND "Required for building test applications for KWin")
-
-
-  add_feature_info("Automated testing of X clients" X11_XTest_FOUND
-                   "The X11 Testing Resource extension library is useful for automated testing of X clients")
-  add_feature_info("libXau" X11_Xau_FOUND "The X11 Authorization Protocol library may be used by KDM")
-  add_feature_info("LibXdmcp" X11_Xdmcp_FOUND "The X Display Manager Control Protocol library may be used by KDM")
-  if(NOT X11_Xkbfile_FOUND)
-    message(FATAL_ERROR "The X11 keyboard layout library was not found. Required for building keyboard modules.")
-  endif()
-  if(NOT X11_Xcomposite_FOUND)
-    message(FATAL_ERROR "The X11 composite library was not found. Required for building the plasma tray and notifications widgets.")
-  endif()
-  if(NOT X11_Xdamage_FOUND)
-    message(FATAL_ERROR "The X11 damaged region extension library was not found. Required for compositing support in KWin.")
-  endif()
-  if(NOT X11_Xrender_FOUND)
-    message(FATAL_ERROR " The X Rendering Extension client library was not found. Required for XRender Compositing backend in KWin.")
-  endif()
-  if(NOT X11_Xfixes_FOUND)
-    message(FATAL_ERROR "The X11 miscellaneous 'fixes' extension library was not found. Required for XRender Compositing backend in KWin.")
-  endif()
-  if(NOT X11_Xrandr_FOUND)
-    message(FATAL_ERROR "The X11 RandR extension library was not found. Required for Multi Screen Support.")
-  endif()
-  if(NOT OPENGL_FOUND AND NOT OPENGLES_FOUND)
-    message(FATAL_ERROR "Either OpenGL or OpenGL ES 2.0 are required for Compositing support in KWin.")
-  endif()
-  if(NOT X11_Xcursor_FOUND)
-    message(FATAL_ERROR "The X11 cursor management library was not found. Required for desktop effects support in KWin.")
-  endif()
-endif()
-
-find_package(GLIB2 2.0)
-set_package_properties(GLIB2 PROPERTIES DESCRIPTION "Low-level core library for data structure handling, portability wrappers, etc."
-                       URL "http://www.gtk.org"
-                       TYPE OPTIONAL
-                       PURPOSE "Needed to build the kxkb keyboard map control program and provide XMMS support in the Now Playing Plasma data engine"
-                      )
-
-find_package(Fontconfig)
-set_package_properties(Fontconfig PROPERTIES DESCRIPTION "Font access configuration library"
-                       URL "http://www.freedesktop.org/wiki/Software/fontconfig"
-                       TYPE OPTIONAL
-                       PURPOSE "Needed to build font configuration and installation tools"
-                      )
-
-#### Python support ( plasma scriptengines ) ####
-find_package(PythonLibrary)
-set_package_properties(PythonLibrary PROPERTIES DESCRIPTION "Python scripting language"
-                       URL "http://python.org"
-                       TYPE OPTIONAL
-                       PURPOSE "Needed to build plasma scriptengine for python."
-                      )
-
-find_package(Boost 1.34.0 MODULE)
-set_package_properties(Boost PROPERTIES DESCRIPTION "Boost C++ Libraries"
-                       URL "http://www.boost.org"
-                       TYPE OPTIONAL
-                       PURPOSE "Required to build certain Plasma DataEngines (Akonadi, RSS, Calendar)"
-                      )
-
-find_package(Akonadi QUIET CONFIG)
-set_package_properties(Akonadi PROPERTIES DESCRIPTION "An extensible cross-desktop storage service for PIM data"
-                       URL "http://pim.kde.org/akonadi"
-                       TYPE OPTIONAL
-                       PURPOSE "Required to build certain Plasma DataEngines (Akonadi, Calendar)"
-                      )
-
-find_package(KdepimLibs 4.70.10 QUIET CONFIG)
-set_package_properties(KdepimLibs PROPERTIES DESCRIPTION "The KDEPIM libraries"
-                       URL "http://pim.kde.org"
-                       TYPE OPTIONAL
-                       PURPOSE "Required to build certain Plasma DataEngines (Akonadi, Calendar)"
-                      )
-
-find_package(USB)
-macro_bool_to_01(LIBUSB_FOUND HAVE_LIBUSB)
-set_package_properties(USB PROPERTIES DESCRIPTION "User level access to USB devices"
-                       URL "http://libusb.sourceforge.net"
-                       TYPE OPTIONAL		
-                       PURPOSE "Provides Logitech mouse support in KControl."
-		       )
-
-
 include(ConfigureChecks.cmake)
 
 # libs
diff --git a/khotkeys/CMakeLists.txt b/khotkeys/CMakeLists.txt
index cddc9aa..3de3a66 100644
--- a/khotkeys/CMakeLists.txt
+++ b/khotkeys/CMakeLists.txt
@@ -36,6 +36,18 @@ find_package(KF5 CONFIG REQUIRED COMPONENTS
 )
 
 find_package(X11)
+set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"
+                        URL "http://www.x.org"
+                        TYPE OPTIONAL
+                        PURPOSE "Required for building the X11 based workspace"
+                    )
+if(X11_FOUND)
+  find_package(XCB REQUIRED COMPONENTS XCB XFIXES DAMAGE COMPOSITE SHAPE SYNC RENDER RANDR KEYSYMS IMAGE SHM XTEST)
+  set_package_properties(XCB PROPERTIES TYPE REQUIRED)
+  find_package(XCB COMPONENTS ICCCM)
+  add_feature_info("XCB-ICCCM" XCB_ICCCM_FOUND "Required for building test applications for KWin")
+endif()
+
 configure_file(config-X11.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-X11.h)
 
 add_definitions(-DKDE_DEFAULT_DEBUG_AREA=1217)
diff --git a/kinfocenter/CMakeLists.txt b/kinfocenter/CMakeLists.txt
index c1ed62b..9eb937d 100644
--- a/kinfocenter/CMakeLists.txt
+++ b/kinfocenter/CMakeLists.txt
@@ -1,3 +1,47 @@
+find_package(ZLIB)
+set_package_properties(ZLIB PROPERTIES DESCRIPTION "Support for gzip compressed files and data streams"
+                       URL "http://www.zlib.net"
+                       TYPE REQUIRED
+                      )
+
+find_package(OpenGL)
+set_package_properties(OpenGL PROPERTIES DESCRIPTION "The OpenGL libraries"
+                       URL "http://www.opengl.org"
+                       TYPE OPTIONAL
+                      )
+
+find_package(OpenGLES)
+set_package_properties(OpenGLES PROPERTIES DESCRIPTION "The OpenGLES libraries"
+                       URL "http://www.khronos.org/opengles"
+                       TYPE OPTIONAL
+                      )
+find_package(EGL)
+set_package_properties(EGL PROPERTIES
+                       TYPE OPTIONAL
+                       PURPOSE "Required to build KWin with EGL support"
+                      )
+
+find_package(Wayland 1.2 COMPONENTS Client Egl Cursor)
+set_package_properties(Wayland PROPERTIES
+                       TYPE OPTIONAL
+                       PURPOSE "Required for building KWin with Wayland support"
+                      )
+add_feature_info("Wayland-Client" Wayland_Client_FOUND "Required for building the Wayland backend in KWin")
+add_feature_info("Wayland-EGL" Wayland_Egl_FOUND "Required for building the Wayland EGL compositing backend in KWin")
+
+find_package(X11)
+set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"
+                        URL "http://www.x.org"
+                        TYPE OPTIONAL
+                        PURPOSE "Required for building the X11 based workspace"
+                      )
+if(X11_FOUND)
+  find_package(XCB REQUIRED COMPONENTS XCB XFIXES DAMAGE COMPOSITE SHAPE SYNC RENDER RANDR KEYSYMS IMAGE SHM XTEST)
+  set_package_properties(XCB PROPERTIES TYPE REQUIRED)
+  find_package(XCB COMPONENTS ICCCM)
+  add_feature_info("XCB-ICCCM" XCB_ICCCM_FOUND "Required for building test applications for KWin")
+endif()
+
 configure_file(config-workspace.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-workspace.h)
 configure_file(config-X11.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-X11.h)
 include_directories(${CMAKE_CURRENT_BINARY_DIR})
@@ -40,3 +84,7 @@ target_link_libraries( kinfocenter
 install( TARGETS kinfocenter          ${INSTALL_TARGETS_DEFAULT_ARGS} )
 install( PROGRAMS kinfocenter.desktop  DESTINATION  ${XDG_APPS_INSTALL_DIR} )
 install( FILES kinfocenterui.rc DESTINATION ${DATA_INSTALL_DIR}/kinfocenter )
+
+if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
+    feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
+endif()
diff --git a/krunner/CMakeLists.txt b/krunner/CMakeLists.txt
index 48ac9fd..feee9e3 100644
--- a/krunner/CMakeLists.txt
+++ b/krunner/CMakeLists.txt
@@ -1,3 +1,10 @@
+find_package(X11)
+set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"
+                        URL "http://www.x.org"
+                        TYPE OPTIONAL
+                        PURPOSE "Required for building the X11 based workspace"
+                    )
+
 #KDE4_NO_ENABLE_FINAL(krunner)
 add_definitions(-DKDE_DEFAULT_DEBUG_AREA=1207)
 
diff --git a/kstyles/CMakeLists.txt b/kstyles/CMakeLists.txt
index 260f65b..23fc107 100644
--- a/kstyles/CMakeLists.txt
+++ b/kstyles/CMakeLists.txt
@@ -1,2 +1,14 @@
+find_package(X11)
+set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"
+                        URL "http://www.x.org"
+                        TYPE OPTIONAL
+                        PURPOSE "Required for building the X11 based workspace"
+                    )
+
+find_package(XCB REQUIRED COMPONENTS XCB XFIXES DAMAGE COMPOSITE SHAPE SYNC RENDER RANDR KEYSYMS IMAGE SHM XTEST)
+set_package_properties(XCB PROPERTIES TYPE REQUIRED)
+find_package(XCB COMPONENTS ICCCM)
+add_feature_info("XCB-ICCCM" XCB_ICCCM_FOUND "Required for building test applications for KWin")
+
 add_subdirectory( oxygen )
 add_subdirectory( themes )
diff --git a/kwin/CMakeLists.txt b/kwin/CMakeLists.txt
index b8a10b3..cd3781c 100644
--- a/kwin/CMakeLists.txt
+++ b/kwin/CMakeLists.txt
@@ -114,6 +114,11 @@ set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"
                         TYPE REQUIRED
                     )
 
+
+if(NOT OPENGL_FOUND AND NOT OPENGLES_FOUND)
+    message(FATAL_ERROR "Either OpenGL or OpenGL ES 2.0 are required for Compositing support in KWin.")
+endif()
+
 # All the required XCB components
 find_package(XCB REQUIRED COMPONENTS
     XCB
diff --git a/libksysguard/CMakeLists.txt b/libksysguard/CMakeLists.txt
index 1c72d93..284b42c 100644
--- a/libksysguard/CMakeLists.txt
+++ b/libksysguard/CMakeLists.txt
@@ -72,3 +72,6 @@ install(EXPORT libksysguardLibraryTargets
         DESTINATION ${CMAKECONFIG_INSTALL_DIR}
         FILE KF5SysGuardLibraryTargets.cmake )
 
+if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
+    feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
+endif()
diff --git a/oxygen/CMakeLists.txt b/oxygen/CMakeLists.txt
index f8d4d23..85840c1 100644
--- a/oxygen/CMakeLists.txt
+++ b/oxygen/CMakeLists.txt
@@ -1 +1,14 @@
+find_package(X11)
+set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"
+                        URL "http://www.x.org"
+                        TYPE OPTIONAL
+                        PURPOSE "Required for building the X11 based workspace"
+                    )
+if(X11_FOUND)
+  find_package(XCB REQUIRED COMPONENTS XCB XFIXES DAMAGE COMPOSITE SHAPE SYNC RENDER RANDR KEYSYMS IMAGE SHM XTEST)
+  set_package_properties(XCB PROPERTIES TYPE REQUIRED)
+  find_package(XCB COMPONENTS ICCCM)
+  add_feature_info("XCB-ICCCM" XCB_ICCCM_FOUND "Required for building test applications for KWin")
+endif()
+
 add_subdirectory(liboxygen)
diff --git a/plasma-desktop/CMakeLists.txt b/plasma-desktop/CMakeLists.txt
index 7c65709..f551dec 100644
--- a/plasma-desktop/CMakeLists.txt
+++ b/plasma-desktop/CMakeLists.txt
@@ -1,5 +1,33 @@
 project(plasma-desktop)
 
+find_package(USB)
+set(HAVE_LIBUSB ${LIBUSB_FOUND})
+set_package_properties(USB PROPERTIES DESCRIPTION "User level access to USB devices"
+                       URL "http://libusb.sourceforge.net"
+                       TYPE OPTIONAL
+                       PURPOSE "Provides Logitech mouse support in KControl."
+                      )
+
+find_package(Fontconfig)
+set_package_properties(Fontconfig PROPERTIES DESCRIPTION "Font access configuration library"
+                       URL "http://www.freedesktop.org/wiki/Software/fontconfig"
+                       TYPE OPTIONAL
+                       PURPOSE "Needed to build font configuration and installation tools"
+                      )
+
+find_package(X11)
+set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"
+                        URL "http://www.x.org"
+                        TYPE OPTIONAL
+                        PURPOSE "Required for building the X11 based workspace"
+                      )
+if(X11_FOUND)
+  find_package(XCB REQUIRED COMPONENTS XCB XFIXES DAMAGE COMPOSITE SHAPE SYNC RENDER RANDR KEYSYMS IMAGE SHM XTEST)
+  set_package_properties(XCB PROPERTIES TYPE REQUIRED)
+  find_package(XCB COMPONENTS ICCCM)
+  add_feature_info("XCB-ICCCM" XCB_ICCCM_FOUND "Required for building test applications for KWin")
+endif()
+
 include_directories("${CMAKE_CURRENT_BINARY_DIR}")
 
 configure_file(config-workspace.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-workspace.h)
@@ -17,3 +45,7 @@ add_subdirectory(containments)
 add_subdirectory(toolboxes)
 add_subdirectory(applets)
 add_subdirectory(kcms)
+
+if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
+    feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
+endif()
diff --git a/plasma-workspace/CMakeLists.txt b/plasma-workspace/CMakeLists.txt
index fb1142e..beabb9c 100644
--- a/plasma-workspace/CMakeLists.txt
+++ b/plasma-workspace/CMakeLists.txt
@@ -1,5 +1,57 @@
 project(plasma-workspace)
 
+find_package(ZLIB)
+set_package_properties(ZLIB PROPERTIES DESCRIPTION "Support for gzip compressed files and data streams"
+                       URL "http://www.zlib.net"
+                       TYPE REQUIRED
+                      )
+
+find_package(dbusmenu-qt5 CONFIG)
+set_package_properties(dbusmenu-qt5 PROPERTIES DESCRIPTION "Support for notification area menus via the DBusMenu protocol"
+                       URL "https://launchpad.net/libdbusmenu-qt"
+                       TYPE OPTIONAL
+                      )
+
+find_package(QImageBlitz)
+set_package_properties(QImageBlitz PROPERTIES DESCRIPTION "An image effects library"
+                       URL "http://sourceforge.net/projects/qimageblitz"
+                       TYPE OPTIONAL
+                      )
+
+find_package(X11)
+set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"
+                        URL "http://www.x.org"
+                        TYPE OPTIONAL
+                        PURPOSE "Required for building the X11 based workspace")
+
+find_package(KdepimLibs 4.70.10 QUIET CONFIG)
+set_package_properties(KdepimLibs PROPERTIES DESCRIPTION "The KDEPIM libraries"
+                       URL "http://pim.kde.org"
+                       TYPE OPTIONAL
+                       PURPOSE "Required to build certain Plasma DataEngines (Akonadi, Calendar)"
+                      )
+
+find_package(Akonadi QUIET CONFIG)
+set_package_properties(Akonadi PROPERTIES DESCRIPTION "An extensible cross-desktop storage service for PIM data"
+                       URL "http://pim.kde.org/akonadi"
+                       TYPE OPTIONAL
+                       PURPOSE "Required to build certain Plasma DataEngines (Akonadi, Calendar)"
+                      )
+
+find_package(Boost 1.34.0 MODULE)
+set_package_properties(Boost PROPERTIES DESCRIPTION "Boost C++ Libraries"
+                       URL "http://www.boost.org"
+                       TYPE OPTIONAL
+                       PURPOSE "Required to build certain Plasma DataEngines (Akonadi, RSS, Calendar)"
+                      )
+
+if(X11_FOUND)
+  find_package(XCB REQUIRED COMPONENTS XCB XFIXES DAMAGE COMPOSITE SHAPE SYNC RENDER RANDR KEYSYMS IMAGE SHM XTEST)
+  set_package_properties(XCB PROPERTIES TYPE REQUIRED)
+  find_package(XCB COMPONENTS ICCCM)
+  add_feature_info("XCB-ICCCM" XCB_ICCCM_FOUND "Required for building test applications for KWin")
+endif()
+
 include_directories("${CMAKE_CURRENT_BINARY_DIR}")
 
 configure_file(config-workspace.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-workspace.h)
@@ -25,3 +77,7 @@ add_subdirectory(runners)
 add_subdirectory(applets)
 add_subdirectory(dataengines)
 add_subdirectory(wallpapers)
+
+if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
+    feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
+endif()
diff --git a/plasma-workspace/krunner/CMakeLists.txt b/plasma-workspace/krunner/CMakeLists.txt
index aa3c0c8..1df80a8 100644
--- a/plasma-workspace/krunner/CMakeLists.txt
+++ b/plasma-workspace/krunner/CMakeLists.txt
@@ -87,10 +87,6 @@ if(X11_FOUND)
   if(XCB_SHAPE_FOUND)
     target_link_libraries(krunner ${XCB_SHAPE_LIBRARY})
   endif()
-
-  if(HAVE_GLX)
-    target_link_libraries(krunner ${OPENGL_gl_LIBRARY})
-  endif()
 endif()
 
 install(TARGETS krunner ${INSTALL_TARGETS_DEFAULT_ARGS})
diff --git a/powerdevil/CMakeLists.txt b/powerdevil/CMakeLists.txt
index c644910..c295548 100644
--- a/powerdevil/CMakeLists.txt
+++ b/powerdevil/CMakeLists.txt
@@ -1,7 +1,19 @@
 find_package(UDev) #upower/udev backend
 
+find_package(X11)
+set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"
+                        URL "http://www.x.org"
+                        TYPE OPTIONAL
+                        PURPOSE "Required for building the X11 based workspace"
+)
+if(X11_FOUND)
+  find_package(XCB REQUIRED COMPONENTS XCB XFIXES DAMAGE COMPOSITE SHAPE SYNC RENDER RANDR KEYSYMS IMAGE SHM XTEST)
+  set_package_properties(XCB PROPERTIES TYPE REQUIRED)
+  find_package(XCB COMPONENTS ICCCM)
+  add_feature_info("XCB-ICCCM" XCB_ICCCM_FOUND "Required for building test applications for KWin")
+endif()
+
 include_directories (
-    ${CMAKE_CURRENT_SOURCE_DIR}
     ${CMAKE_CURRENT_BINARY_DIR}
     ${CMAKE_CURRENT_SOURCE_DIR}/daemon
 )
diff --git a/powerdevil/daemon/powerdevilcore.cpp b/powerdevil/daemon/powerdevilcore.cpp
index ca7fbea..64791d6 100644
--- a/powerdevil/daemon/powerdevilcore.cpp
+++ b/powerdevil/daemon/powerdevilcore.cpp
@@ -28,7 +28,7 @@
 #include "powerdevilpolicyagent.h"
 #include "powerdevilprofilegenerator.h"
 
-#include "daemon/actions/bundled/suspendsession.h"
+#include "actions/bundled/suspendsession.h"
 
 #include <Solid/Battery>
 #include <Solid/Device>
diff --git a/powerdevil/daemon/powerdevilfdoconnector.cpp b/powerdevil/daemon/powerdevilfdoconnector.cpp
index 3e5b3ee..a624bb3 100644
--- a/powerdevil/daemon/powerdevilfdoconnector.cpp
+++ b/powerdevil/daemon/powerdevilfdoconnector.cpp
@@ -27,7 +27,7 @@
 #include "powermanagementfdoadaptor.h"
 #include "powermanagementinhibitadaptor.h"
 
-#include "daemon/actions/bundled/suspendsession.h"
+#include "actions/bundled/suspendsession.h"
 
 #include <KConfigGroup>
 
diff --git a/powerdevil/kcmodule/common/actioneditwidget.cpp b/powerdevil/kcmodule/common/actioneditwidget.cpp
index a09c4df..4c67b4f 100644
--- a/powerdevil/kcmodule/common/actioneditwidget.cpp
+++ b/powerdevil/kcmodule/common/actioneditwidget.cpp
@@ -22,8 +22,8 @@
 
 #include "actionconfigwidget.h"
 
-#include <daemon/powerdevilaction.h>
-#include <daemon/powerdevilactionconfig.h>
+#include <powerdevilaction.h>
+#include <powerdevilactionconfig.h>
 
 #include <QCheckBox>
 #include <QVBoxLayout>
diff --git a/powerdevil/kcmodule/global/GeneralPage.cpp b/powerdevil/kcmodule/global/GeneralPage.cpp
index 1ef27a3..c0df82f 100644
--- a/powerdevil/kcmodule/global/GeneralPage.cpp
+++ b/powerdevil/kcmodule/global/GeneralPage.cpp
@@ -22,7 +22,7 @@
 #include "ErrorOverlay.h"
 #include "PowerDevilSettings.h"
 
-#include "daemon/actions/bundled/suspendsession.h"
+#include "actions/bundled/suspendsession.h"
 
 #include <Solid/Device>
 #include <Solid/DeviceInterface>
diff --git a/powerdevil/kcmodule/profiles/EditPage.cpp b/powerdevil/kcmodule/profiles/EditPage.cpp
index 43a01a7..06246ce 100644
--- a/powerdevil/kcmodule/profiles/EditPage.cpp
+++ b/powerdevil/kcmodule/profiles/EditPage.cpp
@@ -22,8 +22,8 @@
 #include "actioneditwidget.h"
 #include "ErrorOverlay.h"
 
-#include <daemon/powerdevilactionconfig.h>
-#include <daemon/powerdevilprofilegenerator.h>
+#include <powerdevilactionconfig.h>
+#include <powerdevilprofilegenerator.h>
 
 #include <QCheckBox>
 #include <QFormLayout>



More information about the Plasma-devel mailing list