mirror of
https://github.com/labwc/labwc.git
synced 2026-03-20 05:34:12 -04:00
Merge pull request #321 from eli-schwartz/meson-subproject-cleanup
meson: use proper dependency fallback for wlroots
This commit is contained in:
commit
0f54974430
2 changed files with 7 additions and 12 deletions
16
meson.build
16
meson.build
|
|
@ -37,22 +37,14 @@ if git.found()
|
||||||
endif
|
endif
|
||||||
add_project_arguments('-DLABWC_VERSION=@0@'.format(version), language: 'c')
|
add_project_arguments('-DLABWC_VERSION=@0@'.format(version), language: 'c')
|
||||||
|
|
||||||
wlroots_version = ['>=0.16.0', '<0.17.0']
|
wlroots = dependency(
|
||||||
wlroots_proj = subproject(
|
|
||||||
'wlroots',
|
'wlroots',
|
||||||
default_options: ['default_library=static', 'examples=false'],
|
default_options: ['default_library=static', 'examples=false'],
|
||||||
required: false,
|
version: ['>=0.16.0', '<0.17.0'],
|
||||||
version: wlroots_version,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if wlroots_proj.found()
|
wlroots_has_xwayland = wlroots.get_variable('have_xwayland') == 'true'
|
||||||
wlroots = wlroots_proj.get_variable('wlroots')
|
|
||||||
wlroots_conf = wlroots_proj.get_variable('conf_data')
|
|
||||||
wlroots_has_xwayland = wlroots_conf.get('WLR_HAS_XWAYLAND') == 1
|
|
||||||
else
|
|
||||||
wlroots = dependency('wlroots', version: wlroots_version)
|
|
||||||
wlroots_has_xwayland = cc.get_define('WLR_HAS_XWAYLAND', prefix: '#include <wlr/config.h>', dependencies: wlroots) == '1'
|
|
||||||
endif
|
|
||||||
wayland_server = dependency('wayland-server', version: '>=1.19.0')
|
wayland_server = dependency('wayland-server', version: '>=1.19.0')
|
||||||
wayland_protos = dependency('wayland-protocols')
|
wayland_protos = dependency('wayland-protocols')
|
||||||
xkbcommon = dependency('xkbcommon')
|
xkbcommon = dependency('xkbcommon')
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
[wrap-git]
|
[wrap-git]
|
||||||
url = https://gitlab.freedesktop.org/wlroots/wlroots.git
|
url = https://gitlab.freedesktop.org/wlroots/wlroots.git
|
||||||
revision = 640f3b9f2156a007c5d1a36afdee570e123c95e4
|
revision = 640f3b9f2156a007c5d1a36afdee570e123c95e4
|
||||||
|
|
||||||
|
[provide]
|
||||||
|
dependency_names = wlroots
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue