-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmeson.build
More file actions
114 lines (97 loc) · 2.69 KB
/
Copy pathmeson.build
File metadata and controls
114 lines (97 loc) · 2.69 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
project(
'still',
'c',
version: '0.0.9',
license: 'MIT',
meson_version: '>=0.59.0',
default_options: ['c_std=c11', 'warning_level=3', 'werror=true'],
)
add_project_arguments(
['-D_XOPEN_SOURCE=700', '-Wno-unused-parameter'],
language: 'c',
)
math = meson.get_compiler('c').find_library('m', required: false)
pixman = dependency('pixman-1')
wayland_client = dependency('wayland-client', version: '>=1.20')
wayland_scanner = find_program('wayland-scanner', native: true)
proto_c = generator(
wayland_scanner,
output: '@BASENAME@-protocol.c',
arguments: ['private-code', '@INPUT@', '@OUTPUT@'],
)
proto_h = generator(
wayland_scanner,
output: '@BASENAME@-client-protocol.h',
arguments: ['client-header', '@INPUT@', '@OUTPUT@'],
)
wayland_protocols = dependency('wayland-protocols', version: '>=1.25')
wayland_protocols_datadir = wayland_protocols.get_variable('pkgdatadir')
xdg_shell = [
proto_c.process(wayland_protocols_datadir / 'stable/xdg-shell/xdg-shell.xml'),
]
wp_viewporter = [
proto_c.process(
wayland_protocols_datadir / 'stable/viewporter/viewporter.xml',
),
proto_h.process(
wayland_protocols_datadir / 'stable/viewporter/viewporter.xml',
),
]
layer_shell = [
proto_c.process('protocols/wlr-layer-shell-unstable-v1.xml'),
proto_h.process('protocols/wlr-layer-shell-unstable-v1.xml'),
]
screencopy = [
proto_c.process('protocols/wlr-screencopy-unstable-v1.xml'),
proto_h.process('protocols/wlr-screencopy-unstable-v1.xml'),
]
executable(
meson.project_name(),
install: true,
sources: [
'src/array.c',
'src/buffer.c',
'src/capture.c',
'src/image.c',
'src/main.c',
'src/overlay.c',
xdg_shell,
wp_viewporter,
layer_shell,
screencopy,
],
dependencies: [math, pixman, wayland_client],
)
unity = subproject('unity', required: false)
if unity.found()
unity_dep = unity.get_variable('unity_dep')
test(
'array',
executable(
'array.test',
sources: ['src/array.c', 'src/array.test.c'],
dependencies: [unity_dep],
),
)
test(
'image',
executable(
'image.test',
sources: ['src/image.c', 'src/image.test.c'],
dependencies: [math, pixman, unity_dep],
),
)
endif
scdoc = find_program('scdoc', required: get_option('man-pages'))
if scdoc.found()
custom_target(
'still.1',
input: 'still.1.scd',
output: 'still.1',
command: scdoc,
feed: true,
capture: true,
install: true,
install_dir: get_option('mandir') / 'man1',
)
endif