mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 08:15:40 +02:00
meson: initial build conf
Not that well tested yet, does not support plugins-as-modules
This commit is contained in:
parent
a1be489293
commit
51e9d691e4
6 changed files with 218 additions and 0 deletions
48
bar/meson.build
Normal file
48
bar/meson.build
Normal file
|
@ -0,0 +1,48 @@
|
|||
bar_backends = []
|
||||
|
||||
# TODO: X11
|
||||
if enable_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
|
||||
wayland_protocols = dependency('wayland-protocols')
|
||||
wayland_protocols_datadir = wayland_protocols.get_pkgconfig_variable('pkgdatadir')
|
||||
|
||||
wscanner = dependency('wayland-scanner', native: true)
|
||||
wscanner_prog = find_program(
|
||||
wscanner.get_pkgconfig_variable('wayland_scanner'), native: true)
|
||||
|
||||
wayland_protocol_header = generator(
|
||||
wscanner_prog,
|
||||
output: '@BASENAME@.h',
|
||||
arguments: ['client-header', '@INPUT@', '@OUTPUT@'])
|
||||
wayland_protocol_source = generator(
|
||||
wscanner_prog,
|
||||
output: '@BASENAME@.c',
|
||||
arguments: ['private-code', '@INPUT@', '@OUTPUT@'])
|
||||
|
||||
generated_wayland_protocols = []
|
||||
foreach prot : [
|
||||
'../external/wlr-protocols/unstable/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']
|
||||
|
||||
generated_wayland_protocols += [
|
||||
wayland_protocol_header.process(prot),
|
||||
wayland_protocol_source.process(prot)]
|
||||
endforeach
|
||||
|
||||
bar_wayland = declare_dependency(
|
||||
sources: ['wayland.c', 'wayland.h'] + generated_wayland_protocols,
|
||||
dependencies: [wayland_client, wayland_cursor, cairo, cairo_ft])
|
||||
|
||||
bar_backends += [bar_wayland]
|
||||
endif
|
||||
|
||||
bar = declare_dependency(
|
||||
sources: ['bar.c', 'bar.h', 'private.h', 'backend.h'],
|
||||
dependencies: bar_backends + [threads])
|
Loading…
Add table
Add a link
Reference in a new issue