meson: use versioned wlroots for dependency()

Adapt to upstream change at
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4614
This commit is contained in:
Mike Yuan 2024-05-28 09:54:59 +08:00
parent d0bd591ee7
commit 5d5f7a132c
No known key found for this signature in database
GPG key ID: 417471C0A40F58B3

View file

@ -37,15 +37,20 @@ if is_freebsd
add_project_arguments('-D_C11_SOURCE', language: 'c') add_project_arguments('-D_C11_SOURCE', language: 'c')
endif endif
# Execute the wlroots subproject, if any wlroots_version_major = '0.18'
wlroots_version = ['>=0.18.0', '<0.19.0'] wlroots_version = ['>=0.18.0', '<0.19.0']
subproject( # Execute the wlroots subproject, if any
wlroots_subproject = subproject(
'wlroots', 'wlroots',
default_options: ['examples=false'], default_options: ['examples=false'],
required: false, required: false,
version: wlroots_version, version: wlroots_version,
) )
wlroots = dependency('wlroots', version: wlroots_version) if wlroots_subproject.found()
wlroots = dependency('wlroots', version: wlroots_version)
else
wlroots = dependency('wlroots-' + wlroots_version_major, version: wlroots_version)
endif
wlroots_features = { wlroots_features = {
'xwayland': false, 'xwayland': false,
'libinput_backend': false, 'libinput_backend': false,