Use #cmakedefine01 for the remaining config macros

Using 0/1 instead of undefined/defined to 1 allows the compiler to flag
a missing include of the config header.
This commit is contained in:
Alex Richardson 2022-02-28 19:12:30 +00:00 committed by Vlad Zahorodnii
parent 0a0a1fd330
commit 137fea8aa9
4 changed files with 7 additions and 7 deletions

View file

@ -26,13 +26,13 @@
#define BREEZE_KDECORATION_PLUGIN_ID "${BREEZE_KDECORATION_PLUGIN_ID}" #define BREEZE_KDECORATION_PLUGIN_ID "${BREEZE_KDECORATION_PLUGIN_ID}"
#endif #endif
#cmakedefine XCB_ICCCM_FOUND 1 #cmakedefine01 XCB_ICCCM_FOUND
#ifndef XCB_ICCCM_FOUND #if !XCB_ICCCM_FOUND
#define XCB_ICCCM_WM_STATE_WITHDRAWN 0 #define XCB_ICCCM_WM_STATE_WITHDRAWN 0
#define XCB_ICCCM_WM_STATE_NORMAL 1 #define XCB_ICCCM_WM_STATE_NORMAL 1
#define XCB_ICCCM_WM_STATE_ICONIC 3 #define XCB_ICCCM_WM_STATE_ICONIC 3
#endif #endif
#cmakedefine PipeWire_FOUND 1 #cmakedefine01 PipeWire_FOUND
#cmakedefine HAVE_XWAYLAND_LISTENFD #cmakedefine01 HAVE_XWAYLAND_LISTENFD

View file

@ -46,7 +46,7 @@
#include <xcb/damage.h> #include <xcb/damage.h>
#include <xcb/sync.h> #include <xcb/sync.h>
#ifdef XCB_ICCCM_FOUND #if XCB_ICCCM_FOUND
#include <xcb/xcb_icccm.h> #include <xcb/xcb_icccm.h>
#endif #endif

View file

@ -53,7 +53,7 @@ Q_IMPORT_PLUGIN(KWinIntegrationPlugin)
Q_IMPORT_PLUGIN(KGlobalAccelImpl) Q_IMPORT_PLUGIN(KGlobalAccelImpl)
Q_IMPORT_PLUGIN(KWindowSystemKWinPlugin) Q_IMPORT_PLUGIN(KWindowSystemKWinPlugin)
Q_IMPORT_PLUGIN(KWinIdleTimePoller) Q_IMPORT_PLUGIN(KWinIdleTimePoller)
#ifdef PipeWire_FOUND #if PipeWire_FOUND
Q_IMPORT_PLUGIN(ScreencastManagerFactory) Q_IMPORT_PLUGIN(ScreencastManagerFactory)
#endif #endif

View file

@ -195,7 +195,7 @@ bool Xwayland::startInternal()
for (int socket : qAsConst(m_listenFds)) { for (int socket : qAsConst(m_listenFds)) {
int dupSocket = dup(socket); int dupSocket = dup(socket);
fdsToClose << dupSocket; fdsToClose << dupSocket;
#if defined(HAVE_XWAYLAND_LISTENFD) #if HAVE_XWAYLAND_LISTENFD
arguments << QStringLiteral("-listenfd") << QString::number(dupSocket); arguments << QStringLiteral("-listenfd") << QString::number(dupSocket);
#else #else
arguments << QStringLiteral("-listen") << QString::number(dupSocket); arguments << QStringLiteral("-listen") << QString::number(dupSocket);