mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-23 20:35:42 +02:00
meson: enable_x11 -> backend_x11, enable_wayland -> backend_wayland
This commit is contained in:
parent
8135313396
commit
121b2f1575
3 changed files with 9 additions and 11 deletions
|
@ -1,14 +1,12 @@
|
|||
bar_backends = []
|
||||
|
||||
# TODO: X11
|
||||
if enable_x11
|
||||
if backend_x11
|
||||
bar_x11 = declare_dependency(sources: ['xcb.c', 'xcb.h'],
|
||||
dependencies: [xcb_stuff, cairo, cairo_ft])
|
||||
bar_backends += [bar_x11]
|
||||
endif
|
||||
|
||||
# TODO: conditional Wayland
|
||||
if enable_wayland
|
||||
if backend_wayland
|
||||
wayland_protocols = dependency('wayland-protocols')
|
||||
wayland_protocols_datadir = wayland_protocols.get_pkgconfig_variable('pkgdatadir')
|
||||
|
||||
|
|
10
meson.build
10
meson.build
|
@ -30,10 +30,10 @@ if xcb_aux.found() and xcb_cursor.found() and xcb_event.found() and \
|
|||
xcb_ewmh.found() and xcb_randr.found() and xcb_render.found() and \
|
||||
cairo_xcb.found()
|
||||
|
||||
enable_x11 = true
|
||||
backend_x11 = true
|
||||
add_project_arguments('-DENABLE_X11', language: 'c')
|
||||
else
|
||||
enable_x11 = false
|
||||
backend_x11 = false
|
||||
endif
|
||||
|
||||
wayland_client = dependency('wayland-client', required: get_option('backend-wayland'))
|
||||
|
@ -41,13 +41,13 @@ wayland_cursor = dependency('wayland-cursor', required: get_option('backend-wayl
|
|||
wlroots = dependency('wlroots', required: get_option('backend-wayland'))
|
||||
|
||||
if wayland_client.found() and wayland_cursor.found() and wlroots.found()
|
||||
enable_wayland = true
|
||||
backend_wayland = true
|
||||
add_project_arguments('-DENABLE_WAYLAND', language: 'c')
|
||||
else
|
||||
enable_wayland = false
|
||||
backend_wayland = false
|
||||
endif
|
||||
|
||||
if enable_x11
|
||||
if backend_x11
|
||||
xcb_stuff_lib = static_library(
|
||||
'xcb-stuff', 'xcb.c', 'xcb.h',
|
||||
dependencies: [xcb_aux, xcb_cursor, xcb_event, xcb_ewmh, xcb_randr,
|
||||
|
|
|
@ -21,7 +21,7 @@ deps = {
|
|||
'removables': [[], [dynlist, udev]],
|
||||
}
|
||||
|
||||
if enable_x11
|
||||
if backend_x11
|
||||
deps_x11_only = {
|
||||
'xkb': [[], [xcb_stuff, xcb_xkb]],
|
||||
'xwindow': [[], [xcb_stuff]],
|
||||
|
@ -46,7 +46,7 @@ foreach mod, data : deps
|
|||
endif
|
||||
endforeach
|
||||
|
||||
if enable_x11
|
||||
if backend_x11
|
||||
foreach mod, data : deps_x11_only
|
||||
sources = data[0]
|
||||
dep = data[1]
|
||||
|
|
Loading…
Add table
Reference in a new issue