From 14641560b0035402e699b0df0bea75f183ceb057 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?=
 <leohdz172@protonmail.com>
Date: Mon, 30 May 2022 16:18:31 -0500
Subject: include xcb only when building with xwayland support

---
 Makefile  | 2 +-
 config.mk | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index cab513c..3371144 100644
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,7 @@ WAYLAND_PROTOCOLS = `pkg-config --variable=pkgdatadir wayland-protocols`
 WAYLAND_SCANNER   = `pkg-config --variable=wayland_scanner wayland-scanner`
 
 # CFLAGS / LDFLAGS
-PKGS      = wlroots wayland-server xcb xkbcommon libinput
+PKGS      = wlroots wayland-server xkbcommon libinput $(XLIBS)
 DWLCFLAGS = `pkg-config --cflags $(PKGS)` $(DWLCPPFLAGS) $(CFLAGS) $(XWAYLAND)
 LDLIBS    = `pkg-config --libs $(PKGS)`
 
diff --git a/config.mk b/config.mk
index 3a5e37f..ba24bb8 100644
--- a/config.mk
+++ b/config.mk
@@ -9,5 +9,7 @@ MANDIR = $(PREFIX)/share/man
 #CFLAGS = -pedantic -Wall -Wextra -Werror -Wno-unused-parameter -Wno-sign-compare -Wno-unused-function -Wno-unused-variable -Wno-unused-result -Wdeclaration-after-statement
 
 XWAYLAND =
+XLIBS =
 # Uncomment to build XWayland support
 #XWAYLAND = -DXWAYLAND
+#XLIBS = xcb
-- 
cgit v1.2.3