From eec210940c85f92c93759abc1733d28a4af43163 Mon Sep 17 00:00:00 2001
From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me>
Date: Sat, 7 Feb 2026 13:06:59 +0100
Subject: [PATCH 2/2] Allow to disable X11 support

---
 qarma.pro | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/qarma.pro b/qarma.pro
index c904d66..eeee4b6 100644
--- a/qarma.pro
+++ b/qarma.pro
@@ -1,9 +1,6 @@
 HEADERS = Qarma.h
 SOURCES = Qarma.cpp
 QT      += gui widgets
-lessThan(QT_MAJOR_VERSION, 6){
-  unix:!macx:QT += x11extras
-}
 TARGET  = qarma
 
 !DISABLE_DBUS {
@@ -11,8 +8,14 @@ TARGET  = qarma
 	QT += dbus
 }
 
-unix:!macx:LIBS    += -lX11
-unix:!macx:DEFINES += WS_X11
+!DISABLE_X11 {
+	unix:!macx:LIBS    += -lX11
+	unix:!macx:DEFINES += WS_X11
+
+	lessThan(QT_MAJOR_VERSION, 6){
+		unix:!macx:QT += x11extras
+	}
+}
 
 # override: qmake PREFIX=/some/where/else
 isEmpty(PREFIX) {
-- 
2.52.0

