-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmeson.build
93 lines (79 loc) · 2.79 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
93
project(
'wstroke',
'c',
'cpp',
'vala',
version: '2.2.1',
license: 'MIT',
meson_version: '>=1.0.0',
default_options: [
'cpp_std=c++17',
'c_std=c11',
'warning_level=2',
'werror=false',
],
)
# paths (only needed to install icon and desktop file)
prefix = get_option('prefix')
datadir = join_paths(prefix, get_option('datadir'))
icon_dir = join_paths(datadir, 'icons')
desktop_dir = join_paths(datadir, 'applications')
# dependencies for loadable plugin
boost = dependency('boost', modules: ['serialization'], static: false)
wayfire = dependency('wayfire', version: '>=0.8.0')
wayfire_deps_cmd = run_command('pkg-config', '--print-requires', 'wayfire', check: true)
wayfire_deps = wayfire_deps_cmd.stdout().split('\n')
if 'wlroots' in wayfire_deps
message('Using wlroots version < 0.18')
wlroots = dependency('wlroots')
elif 'wlroots-0.18' in wayfire_deps
message('Using wlroots version 0.18')
wlroots = dependency('wlroots-0.18')
else
error('Cannot find supported wlroots dependency')
endif
wlroots_headers = wlroots.partial_dependency(includes: true, compile_args: true)
wlserver = dependency('wayland-server')
glibmm = dependency('glibmm-2.4')
json = dependency('nlohmann_json', required: true)
# additional dependencies for GUI
gtkmm = dependency('gtkmm-3.0')
gdkmm = dependency('gdkmm-3.0')
glib = dependency('glib-2.0')
gobject = dependency('gobject-2.0')
gtk = dependency('gtk+-3.0')
gdk = dependency('gdk-3.0')
gnome = import('gnome')
# filesystem library support
# note: on Ubuntu 18.04 this only works with clang++
cpp = meson.get_compiler('cpp')
if cpp.has_link_argument('-lc++fs')
add_project_link_arguments(['-lc++fs'], language: 'cpp')
elif cpp.has_link_argument('-lc++experimental')
add_project_link_arguments(['-lc++experimental'], language: 'cpp')
elif cpp.has_link_argument('-lstdc++fs')
add_project_link_arguments(['-lstdc++fs'], language: 'cpp')
endif
# wayland-scanner -- needed for keyboard grabber and input inhibitor
wayland_client = dependency('wayland-client')
wayland_scanner = find_program('wayland-scanner')
wayland_scanner_code = generator(
wayland_scanner,
output: '@BASENAME@-protocol.c',
arguments: ['private-code', '@INPUT@', '@OUTPUT@'],
)
wayland_scanner_client = generator(
wayland_scanner,
output: '@BASENAME@-client-protocol.h',
arguments: ['client-header', '@INPUT@', '@OUTPUT@'],
)
add_project_arguments(['--vapidir', meson.current_source_dir() + '/src'], language: 'vala')
add_project_arguments(['--pkg', 'input_inhibitor'], language: 'vala')
subdir('input-inhibitor')
subdir('toplevel-grabber')
subdir('src')
subdir('example')
install_data('wstroke.xml', install_dir: wayfire.get_variable(pkgconfig: 'metadatadir'))
install_data('wstroke-config.desktop', install_dir: desktop_dir)
install_man('wstroke-config.1')
subdir('icons')