-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
55 lines (46 loc) · 1.37 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
54
project(
'frzscr', 'c',
version: '0.1.0',
license: 'GPL-3.0-or-later',
default_options: ['buildtype=release', 'warning_level=3']
)
add_project_arguments('-Wno-gnu-zero-variadic-macro-arguments', language: 'c')
add_project_arguments('-Wno-unused-parameter', language: 'c')
add_project_arguments('-Wno-unused-variable', language: 'c')
wayland_scanner = find_program('wayland-scanner')
wayland_client_dep = dependency('wayland-client')
protocols = [
'wlr-layer-shell-unstable-v1',
'wlr-screencopy-unstable-v1',
'xdg-shell',
'xdg-output-unstable-v1'
]
protocol_sources = []
foreach protocol : protocols
in_file = '@[email protected]'.format(join_paths('protocols', protocol))
out_h = '@[email protected]'.format(protocol)
out_c = '@[email protected]'.format(protocol)
header = custom_target(out_h,
output: out_h,
input: in_file,
command: [ wayland_scanner, 'client-header', '@INPUT@', '@OUTPUT@' ],
)
source = custom_target(out_c,
output: out_c,
input: in_file,
command: [ wayland_scanner, 'private-code', '@INPUT@', '@OUTPUT@' ],
)
protocol_sources += [header]
protocol_sources += [source]
endforeach
executable('frzscr',
'frzscr.c',
'wayland.c',
'window.c',
'shm.c',
'screenshot.c',
'utils.c',
protocol_sources,
dependencies: [ wayland_client_dep ],
install: true
)