aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-02-08 15:17:53 +0100
committerSimon Ser <contact@emersion.fr>2021-02-15 16:32:33 +0100
commitfdd9088e0533511262da28ed551910691fe13b7f (patch)
treeb1655744b86602253bbc4b9f73c3a28eba69b807 /meson.build
parent6f873078d4c0a941954be2873d3bb37f63ff31a8 (diff)
build: set have_* dep variables for our features
This allows users to to something like this when wlroots is used as a subproject: wlr_has_xwayland = wlroots.get_variable('have_xwayland') Instead of having to parse conf_data from the subproject object.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build6
1 files changed, 6 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index f49d95bd..559fa4af 100644
--- a/meson.build
+++ b/meson.build
@@ -158,10 +158,16 @@ lib_wlr = library(
link_depends: symbols_file,
)
+wlr_vars = {}
+foreach name, have : features
+ wlr_vars += { 'have_' + name.underscorify(): have.to_string() }
+endforeach
+
wlroots = declare_dependency(
link_with: lib_wlr,
dependencies: wlr_deps,
include_directories: wlr_inc,
+ variables: wlr_vars,
)
meson.override_dependency('wlroots', wlroots)