yambar/bar/meson.build
Daniel Eklöf 4daa3d9904
meson: stop using deprecated functions, require meson >= 0.58
* get_pkgconfig_variable() -> get_variable()
* prog.path() -> prog.full_path()
* meson.build_root() -> meson.global_build_root()
2022-02-27 11:32:46 +01:00

47 lines
1.5 KiB
Meson

bar_backends = []
if backend_x11
bar_x11 = declare_dependency(sources: ['xcb.c', 'xcb.h'], dependencies: [xcb_stuff])
bar_backends += [bar_x11]
endif
if backend_wayland
wayland_protocols = dependency('wayland-protocols')
wayland_protocols_datadir = wayland_protocols.get_variable('pkgdatadir')
wscanner = dependency('wayland-scanner', native: true)
wscanner_prog = find_program(
wscanner.get_variable('wayland_scanner'), native: true)
wl_proto_headers = []
wl_proto_src = []
foreach prot : [
'../external/wlr-layer-shell-unstable-v1.xml',
wayland_protocols_datadir + '/stable/xdg-shell/xdg-shell.xml',
wayland_protocols_datadir + '/unstable/xdg-output/xdg-output-unstable-v1.xml']
wl_proto_headers += custom_target(
prot.underscorify() + '-client-header',
output: '@BASENAME@.h',
input: prot,
command: [wscanner_prog, 'client-header', '@INPUT@', '@OUTPUT@'])
wl_proto_src += custom_target(
prot.underscorify() + '-private-code',
output: '@BASENAME@.c',
input: prot,
command: [wscanner_prog, 'private-code', '@INPUT@', '@OUTPUT@'])
endforeach
bar_wayland = declare_dependency(
sources: ['wayland.c', 'wayland.h'] + wl_proto_src + wl_proto_headers,
dependencies: [wayland_client, wayland_cursor, tllist])
bar_backends += [bar_wayland]
endif
bar = declare_dependency(
sources: ['bar.c', 'bar.h', 'private.h', 'backend.h'],
dependencies: bar_backends + [threads])
install_headers('bar.h', subdir: 'yambar/bar')