-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
53 lines (48 loc) · 1.22 KB
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
project('tinytile', 'c',
version: '0.3.0',
license: 'BSD-3-Clause',
meson_version: '>=0.59.0',
default_options: [
'c_std=c11',
'warning_level=2',
'werror=true',
],
)
add_project_arguments(
[
'-DWLR_USE_UNSTABLE',
'-Wundef',
'-Wno-unused-parameter',
],
language: 'c',
)
if get_option('buildtype').startswith('debug')
add_project_arguments('-DDEBUG', language : 'c')
endif
wl_protocol_dir = dependency('wayland-protocols', version: '>=1.14').get_variable('pkgdatadir')
protocols_being_used = [
[wl_protocol_dir, 'stable/xdg-shell/xdg-shell.xml'],
]
headers_for_protocols_being_used = []
foreach protocol : protocols_being_used
xml = join_paths(protocol)
headers_for_protocols_being_used += generator(
find_program('wayland-scanner'),
output: '@[email protected]',
arguments: ['server-header', '@INPUT@', '@OUTPUT@'],
).process(xml)
endforeach
executable(
meson.project_name(),
'main.c',
dependencies: [
dependency('wlroots', version: '>= 0.16.0', fallback: ['wlroots', 'wlroots']),
dependency('wayland-server'),
dependency('xkbcommon'),
dependency('libinput'),
declare_dependency(
sources: headers_for_protocols_being_used,
),
],
install: true,
)