-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
56 lines (48 loc) · 1.26 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
project('maomao', ['c', 'cpp'],
version : '0.1'
)
subdir('protocols')
fs = import('fs')
if not fs.exists('config.h')
run_command('cp', 'config.def.h', 'config.h', check: true)
endif
cc = meson.get_compiler('c')
libm = cc.find_library('m')
xcb = dependency('xcb', required : get_option('xwayland'))
xlibs = dependency('xcb-icccm', required : get_option('xwayland'))
wayland_server_dep = dependency('wayland-server')
wlroots_dep = dependency('wlroots', version : ['>=0.17.0', '<0.18.0'])
xkbcommon_dep = dependency('xkbcommon')
libinput_dep = dependency('libinput')
libwayland_client_dep = dependency('wayland-client')
c_args = [
'-g',
'-Wno-unused-function',
'-DWLR_USE_UNSTABLE',
'-D_POSIX_C_SOURCE=200809L',
'-DVERSION="@0@"'.format(meson.project_version())
]
if xcb.found() and xlibs.found()
c_args += '-DXWAYLAND'
c_args += '-DIM'
endif
executable('maomao',
'maomao.c',
'util.c',
wayland_sources,
dependencies : [
libm,
xcb,
xlibs,
wayland_server_dep,
wlroots_dep,
xkbcommon_dep,
libinput_dep,
libwayland_client_dep,
],
install : true,
c_args : c_args
)
prefix = get_option('prefix')
desktop_install_dir = join_paths(prefix, 'share/wayland-sessions')
install_data('maomao.desktop', install_dir : desktop_install_dir)