Build with meson and disable libxpresent

This commit is contained in:
2026-06-14 11:05:40 +03:00
parent 85ce36bcba
commit fb853a2c65
3 changed files with 61 additions and 11 deletions
@@ -0,0 +1,46 @@
From e14b56a695f51bcfd92a5234990d3eba8982f85c Mon Sep 17 00:00:00 2001
From: EnumDev <[email protected]>
Date: Sun, 14 Jun 2026 09:52:45 +0300
Subject: [PATCH] Add meson toggle for building with libxpresent
---
meson.build | 7 +++++++
meson.options | 7 +++++++
2 files changed, 14 insertions(+)
diff --git a/meson.build b/meson.build
index 1b0d861..aa1a68f 100644
--- a/meson.build
+++ b/meson.build
@@ -65,6 +65,13 @@ dep_libxpresent = dependency('xpresent', required: false, disabler: true)
dep_libxrandr = dependency('xrandr', required: false, version: '>= 1.2',
disabler: true)
+if get_option('xpresent').allowed()
+ dep_libxpresent = dependency('xpresent', required: false, disabler: true)
+else
+ dep_libxpresent = disabler()
+endif
+summary('xpresent', dep_libxpresent.found())
+
if get_option('dga').allowed()
dep_libxxf86dga = dependency('xxf86dga', required: false, disabler: true)
else
diff --git a/meson.options b/meson.options
index 9ecc7dc..282b65c 100644
--- a/meson.options
+++ b/meson.options
@@ -1,3 +1,10 @@
+option(
+ 'xpresent',
+ type: 'feature',
+ value: 'enabled',
+ description: 'Enable xpresent support (default is enabled)'
+)
+
option(
'dga',
type: 'feature',
--
2.54.0