-
Notifications
You must be signed in to change notification settings - Fork 23
/
meson.build
82 lines (68 loc) · 1.96 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
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
project(
'dmenu-wl',
'c',
version: '4.2.1',
license: 'MIT',
default_options: ['c_std=c99']
)
add_project_arguments(
[
'-pedantic',
'-Wall',
'-D_DEFAULT_SOURCE',
'-DVERSION="@0@"'.format(meson.project_version()),
],
language : 'c'
)
cc = meson.get_compiler('c')
cairo = dependency('cairo')
glib = dependency('glib-2.0')
gobject = dependency('gobject-2.0')
pango = dependency('pango')
pangocairo = dependency('pangocairo')
rt = cc.find_library('rt')
wayland_client = dependency('wayland-client')
wayland_protos = dependency('wayland-protocols')
wayland_scanner_dep = dependency('wayland-scanner')
wayland_scanner = find_program(
wayland_scanner_dep.get_pkgconfig_variable('wayland_scanner')
)
xkbcommon = dependency('xkbcommon')
wl_protocol_dir = wayland_protos.get_pkgconfig_variable('pkgdatadir')
protocols = [
[wl_protocol_dir, 'stable/xdg-shell/xdg-shell.xml'],
[wl_protocol_dir, 'unstable/xdg-output/xdg-output-unstable-v1.xml'],
'wlr-layer-shell-unstable-v1.xml'
]
protos_src = []
protos_headers = []
foreach p : protocols
xml = join_paths(p)
protos_src += custom_target(
xml.underscorify() + '_client_c',
input: xml,
output: '@BASENAME@-protocol.c',
command: [wayland_scanner, 'public-code', '@INPUT@', '@OUTPUT@'],
)
protos_headers += custom_target(
xml.underscorify() + '_client_h',
input: xml,
output: '@BASENAME@-client-protocol.h',
command: [wayland_scanner, 'client-header', '@INPUT@', '@OUTPUT@'],
)
endforeach
dmenu_deps = [
cairo,
glib,
gobject,
pango,
pangocairo,
rt,
wayland_client,
xkbcommon
]
dmenu_src = ['dmenu.c', 'draw.c'] + protos_src + protos_headers
executable('dmenu-wl', dmenu_src, dependencies: dmenu_deps, install: true)
executable('dmenu-wl_path', 'dmenu_path.c', install: true)
install_data('dmenu-wl_run', install_dir: get_option('bindir'))
install_man('dmenu-wl.1')