Files
diyac/meson.build
2025-07-05 20:37:04 +02:00

73 lines
1.8 KiB
Meson

project('diyac',
['c'],
version: '0.1.0',
license: 'MIT',
meson_version: '>=0.58.0',
default_options: ['c_std=gnu11', 'warning_level=3'])
lib_so_version = '0'
add_project_arguments(
[
'-Wno-pedantic',
'-Werror=implicit-function-declaration',
'-Werror=return-type',
'-DWLR_USE_UNSTABLE',
'-D__COMPOSITOR_VERSION__="@0@"'.format(meson.project_version())
],
language: 'c')
wlroots = dependency('wlroots')
wayland_server = dependency('wayland-server', version: '>=1.10.0')
xkbcommon = dependency('xkbcommon')
# wayland_scanner is required, but we can find it without pkg-config
wayland_scanner = find_program('wayland-scanner')
wayland_protocols = dependency('wayland-protocols', version: '>=1.16')
wl_protocol_dir = wayland_protocols.get_variable('pkgdatadir')
wayland_targets=[]
wl_protocols = [
wl_protocol_dir / 'stable/xdg-shell/xdg-shell',
'protocol/wlr-layer-shell-unstable-v1',
]
foreach proto : wl_protocols
xml = ''.join([proto,'.xml'])
header = ''.join([proto.split('/').get(-1),'-protocol.h'])
cfile = ''.join([proto.split('/').get(-1),'-protocol.c'])
wayland_targets += custom_target(header,output:header,input:xml,
command: [ wayland_scanner, 'server-header', '@INPUT@', '@OUTPUT@' ] )
wayland_targets += custom_target(cfile,output:cfile,input:xml,
command: [ wayland_scanner, 'private-code', '@INPUT@', '@OUTPUT@' ] )
endforeach
incdir = include_directories([
])
src = [
'diyac.c',
'cursor.c',
'output.c',
'seat.c',
'node.c',
'view.c',
'foreign.c',
'xdg.c',
'layer.c',
'session.c',
wayland_targets
]
buil_dep = [wlroots, wayland_server, xkbcommon]
executable(
'diyac',
src,
dependencies: buil_dep,
include_directories : incdir)