Description: set HAVE_X11 with CMake
From: David Faure <faure@kde.org>
Origin: upstream, https://cgit.kde.org/khotkeys.git/commit/?id=ae5743738245437332b1bb670b9a3f8c429211e2
Bug-Debian: https://bugs.debian.org/946327
Forwarded: not-needed
Applied-Upstream: 5.15.1
Last-Update: 2020-01-02
---

--- khotkeys-5.14.5.orig/CMakeLists.txt
+++ khotkeys-5.14.5/CMakeLists.txt
@@ -37,6 +37,7 @@ find_package(LibKWorkspace CONFIG REQUIR
 if(X11_FOUND)
     find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS X11Extras )
     set(HAVE_XTEST ${X11_XTest_FOUND})
+    set(HAVE_X11 1)
 endif()
 
 configure_file(config-X11.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-X11.h)
--- khotkeys-5.14.5.orig/config-X11.h.cmake
+++ khotkeys-5.14.5/config-X11.h.cmake
@@ -41,4 +41,4 @@
 #cmakedefine HAS_RANDR_1_3 1
 
 /* Define if you have X11 at all */
-#define HAVE_X11 ${X11_FOUND}
\ No newline at end of file
+#cmakedefine01 HAVE_X11
--- khotkeys-5.14.5.orig/libkhotkeysprivate/conditions/existing_window_condition.h
+++ khotkeys-5.14.5/libkhotkeysprivate/conditions/existing_window_condition.h
@@ -26,7 +26,6 @@
 
 #include <KConfig>      // Needed because of some Qt Status redefinitions
 #include <KConfigGroup>      // Needed because of some Qt Status redefinitions
-#include <config-kwindowsystem.h> // Needed for HAVE_X11
 #include <config-X11.h>
 #include <kdemacros.h>
 
