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.
This commit is contained in:
Simon Ser 2021-02-08 15:17:53 +01:00
parent 6f873078d4
commit fdd9088e05

View file

@ -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)