2024-04-14 16:29:02 +02:00
|
|
|
project('diya-shell',
|
|
|
|
['c'],
|
|
|
|
version: '0.1.0',
|
|
|
|
license: 'MIT',
|
2024-04-17 01:05:53 +02:00
|
|
|
meson_version: '>=0.58.0',
|
2024-04-14 16:29:02 +02:00
|
|
|
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
|
2024-04-17 01:05:53 +02:00
|
|
|
wayland_protocols = dependency('wayland-protocols', version: '>=1.16')
|
|
|
|
|
|
|
|
wl_protocol_dir = wayland_protocols.get_variable('pkgdatadir')
|
|
|
|
|
2024-04-14 16:29:02 +02:00
|
|
|
|
|
|
|
# pkg_config = import('pkgconfig')
|
|
|
|
# gnome = import('gnome')
|
|
|
|
|
|
|
|
gtk_layer_shell = dependency('gtk4-layer-shell-0', version: '>=1.0.2')
|
|
|
|
wayland_targets=[]
|
|
|
|
|
2024-04-17 01:05:53 +02:00
|
|
|
wl_protocols = [
|
|
|
|
wl_protocol_dir / 'staging/ext-session-lock/ext-session-lock-v1',
|
|
|
|
'protocols/wlr-foreign-toplevel-management-unstable-v1'
|
2024-04-14 16:29:02 +02:00
|
|
|
]
|
|
|
|
|
2024-04-17 01:05:53 +02:00
|
|
|
foreach proto : wl_protocols
|
2024-04-14 16:29:02 +02:00
|
|
|
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',
|
2024-04-17 01:05:53 +02:00
|
|
|
'src/session.c',
|
|
|
|
'src/widgets/cairo-widget.c',
|
2024-04-19 23:46:51 +02:00
|
|
|
'src/widgets/cairo-box.c',
|
|
|
|
'src/widgets/cairo-window.c',
|
2024-04-22 00:31:57 +02:00
|
|
|
'src/widgets/cairo-image.c',
|
2024-04-29 21:41:51 +02:00
|
|
|
'src/widgets/cairo-text.c',
|
2024-04-17 01:05:53 +02:00
|
|
|
'src/main.c',
|
2024-04-14 16:29:02 +02:00
|
|
|
wayland_targets]
|
|
|
|
|
|
|
|
executable(
|
|
|
|
'diya-shell',
|
|
|
|
src,
|
|
|
|
dependencies: [gtk, gtk_layer_shell, wayland_client])
|