44d1bc4beac29982fd2d086ef470729febf9b204
[gentoo.git] / kde-frameworks / kidletime / files / kidletime-5.37.0-qtdbus.patch
1 commit e86d576d4030231617d191a569354e368a038384
2 Author: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
3 Date:   Sat Aug 5 23:45:39 2017 +0200
4
5     Qt5DBus is only required with HAVE_XSCREENSAVER
6
7 diff --git a/CMakeLists.txt b/CMakeLists.txt
8 index e3c89d8..39cae72 100644
9 --- a/CMakeLists.txt
10 +++ b/CMakeLists.txt
11 @@ -32,10 +32,6 @@ include(KDECMakeSettings)
12  set(REQUIRED_QT_VERSION 5.6.0)
13  find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Widgets)
14  
15 -if(NOT WIN32 AND NOT APPLE)
16 -    find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED DBus)
17 -endif()
18 -
19  if(APPLE)
20      cmake_find_frameworks(CoreFoundation Carbon)
21  endif()
22 @@ -66,6 +62,10 @@ if(X11_FOUND)
23      set(HAVE_XSCREENSAVER ${X11_Xscreensaver_FOUND})
24      add_feature_info("X-Screensaver based poller" HAVE_XSCREENSAVER "KIdleTime fallback mode (libXss)")
25  
26 +    if(HAVE_XSCREENSAVER AND NOT WIN32)
27 +        find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED DBus)
28 +    endif()
29 +
30      if(NOT HAVE_XSCREENSAVER AND NOT HAVE_XSYNC)
31          message(FATAL_ERROR "\nNeither the XSync (libXext) nor XScreensaver (libXss) development package was found.\nPlease install one of them (XSync is recommended)")
32      endif()