-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmeson.build
93 lines (81 loc) · 2.03 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
82
83
84
85
86
87
88
89
90
91
92
project(
'mwc',
'c',
version: '0.1.0',
license: 'MIT',
)
add_project_arguments('-DWLR_USE_UNSTABLE', language: 'c')
wayland = dependency('wayland-server')
wayland_scanner = find_program('wayland-scanner')
wayland_protocols = dependency('wayland-protocols')
protocol_dir = wayland_protocols.get_variable('pkgdatadir')
protocol_files = [
protocol_dir / 'stable/xdg-shell/xdg-shell.xml',
protocol_dir / 'unstable/xdg-output/xdg-output-unstable-v1.xml',
'protocols/wlr-layer-shell-unstable-v1.xml',
'protocols/cursor-shape-v1.xml',
]
generated = []
foreach f : protocol_files
filename = f.split('/')[-1]
dest = filename.replace('.xml', '-protocol.h')
generated += custom_target(
output: dest,
input: f,
command: [
wayland_scanner, 'server-header',
'@INPUT@', '@OUTPUT@'
],
build_by_default: true
)
endforeach
src = [
'src/config.c',
'src/decoration.c',
'src/dnd.c',
'src/gamma_control.c',
'src/helpers.c',
'src/ipc.c',
'src/keybinds.c',
'src/keyboard.c',
'src/layer_surface.c',
'src/layout.c',
'src/mwc.c',
'src/output.c',
'src/pointer.c',
'src/popup.c',
'src/rendering.c',
'src/session_lock.c',
'src/something.c',
'src/toplevel.c',
'src/workspace.c'
]
inc = [
'.',
'src',
'util'
]
deps = [
dependency('wayland-server'),
dependency('scenefx-0.2', version: '>=0.2.0', fallback: 'scenefx'),
dependency('wlroots-0.18', version: ['>=0.18.0', '<0.19.0'], fallback: 'wlroots'),
dependency('xkbcommon'),
dependency('libinput'),
]
executable('mwc',
src,
generated,
dependencies: deps,
include_directories: include_directories(inc),
link_args : '-lm',
install: true
)
executable('mwc-ipc',
'mwc-ipc/mwc-ipc.c',
include_directories: include_directories('util'),
install: true
)
install_data('default.conf', install_dir: '/usr/share/mwc')
install_data('LICENSE', install_dir: '/usr/share/licenses/mwc')
install_data('mwc.desktop', install_dir: '/usr/share/wayland-sessions')
install_data('mwc-portals.conf', install_dir: '/usr/share/xdg-desktop-portal')