-
Notifications
You must be signed in to change notification settings - Fork 4
/
meson.build
53 lines (44 loc) · 1.2 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
project(
'iwdevtools',
license : 'BSD-2-Clause',
version : '0.12.14',
meson_version : '>=0.57.0'
)
prefix = get_option('prefix')
bindir = get_option('bindir')
confdir = get_option('sysconfdir') / meson.project_name()
datadir = get_option('datadir') / meson.project_name()
eprefix = get_option('eprefix')
getopt = get_option('getopt')
docdir = get_option('docdir')
if docdir == ''
docdir = meson.project_name()
endif
docdir = get_option('datadir') / 'doc' / docdir
docs = [
'NEWS.rst',
'README.rst'
]
conf = configuration_data()
conf.set('confdir', prefix / confdir)
conf.set('datadir', prefix / datadir)
conf.set('package', meson.project_name())
conf.set('version', meson.project_version())
conf.set('eprefix', '"${EPREFIX=' + eprefix + '}" #')
conf.set('getopt', '"${getopt:=' + getopt + '}" #')
pkgconf = [ 'pkgdatadir=' + prefix / datadir ]
subdir('config')
subdir('lib')
subdir('portage')
subdir('scripts')
if get_option('test')
subdir('tests')
endif
import('pkgconfig').generate(
name : meson.project_name(),
description : meson.project_name() + ' bash include files',
dataonly : true,
install_dir : get_option('datadir') / 'pkgconfig',
variables : pkgconf
)
install_data(docs, install_dir : docdir)