diya-shell/meson.build

59 lines
1.6 KiB
Meson
Raw Normal View History

project('diya-shell',
['c'],
version: '0.1.0',
license: 'MIT',
meson_version: '>=0.51.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',
],
language: 'c')
gtk = dependency('gtk4')
wayland_client = dependency('wayland-client', version: '>=1.10.0')
# wayland_scanner is required, but we can find it without pkg-config
wayland_scanner = find_program('wayland-scanner')
# use system xdg-shell protocol when available
#wayland_protocols = dependency('wayland-protocols', version: '>=1.16')
# pkg_config = import('pkgconfig')
# gnome = import('gnome')
gtk_layer_shell = dependency('gtk4-layer-shell-0', version: '>=1.0.2')
wayland_targets=[]
wayland_protos = [
'protocols/wlr-foreign-toplevel-management-unstable-v1'
]
foreach proto : wayland_protos
xml = ''.join([proto,'.xml'])
header = ''.join([proto.split('/').get(-1),'.h'])
cfile = ''.join([proto.split('/').get(-1),'.c'])
wayland_targets += custom_target(header,output:header,input:xml,
command: [ wayland_scanner, 'client-header', '@INPUT@', '@OUTPUT@' ] )
wayland_targets += custom_target(cfile,output:cfile,input:xml,
command: [ wayland_scanner, 'public-code', '@INPUT@', '@OUTPUT@' ] )
endforeach
src = [
'src/base.c',
'src/launcher.c',
'src/background.c',
'src/wayland.c',
'src/shell.c',
'src/foreign.c',
wayland_targets]
executable(
'diya-shell',
src,
dependencies: [gtk, gtk_layer_shell, wayland_client])