forked from GNOME/phodav
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
76 lines (65 loc) · 1.95 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
project(
'phodav', 'c',
version : run_command(
'build-aux/git-version-gen',
'@0@/.tarball-version'.format(meson.source_root()),
check : true
).stdout().strip(),
license : 'LGPLv2.1',
meson_version : '>= 0.50',
)
meson.add_dist_script('sh', '-c', 'echo @0@>"$MESON_DIST_ROOT/.tarball-version"'.format(meson.project_version()))
proj_version = meson.project_version()
proj_name = meson.project_name()
proj_gettext = 'phodav-2.0'
proj_bugurl = 'https://gitlab.gnome.org/GNOME/phodav/issues/new'
gnome = import('gnome')
prefix = get_option('prefix')
sbindir = join_paths(prefix, get_option('sbindir'))
datadir = join_paths(prefix, get_option('datadir'))
mandir = join_paths(prefix, get_option('mandir'))
localedir = join_paths(datadir, 'locale')
incdir = include_directories('.')
compiler = meson.get_compiler('c')
conf = configuration_data()
deps = []
if host_machine.system() == 'windows'
deps += dependency('gio-windows-2.0', version : '>= 2.44')
else
deps += dependency('gio-unix-2.0', version : '>= 2.44')
endif
deps += dependency('libsoup-2.4', version : '>= 2.48.0', static : true)
deps += dependency('libxml-2.0', static : true)
d1 = dependency('avahi-gobject', required : get_option('avahi'))
d2 = dependency('avahi-client', required : get_option('avahi'))
avahi_deps = []
if d1.found() and d2.found()
avahi_deps += [ d1, d2 ]
conf.set('WITH_AVAHI', 1)
endif
if compiler.has_header('sys/xattr.h')
conf.set('HAVE_SYS_XATTR_H', 1)
endif
subdir('po')
subdir('libphodav')
subdir('bin')
subdir('doc')
subdir('data')
subdir('tests')
config = {
'GETTEXT_PACKAGE' : proj_gettext,
'LOCALEDIR' : localedir,
'PACKAGE_BUGREPORT' : proj_bugurl,
'PACKAGE_NAME' : proj_name,
'PACKAGE_STRING' : '@0@ @1@'.format(proj_name, proj_version),
'PACKAGE_VERSION' : proj_version,
'VERSION' : proj_version,
}
foreach key, value : config
conf.set_quoted(key, value)
endforeach
configure_file(
output : 'config.h',
install : false,
configuration : conf
)