-
Notifications
You must be signed in to change notification settings - Fork 24
/
meson.build
85 lines (69 loc) · 2.54 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
project ('gnome-boxes',
['vala', 'c'],
version: '48.alpha',
license: 'LGPLv2+',
meson_version: '>= 0.59.0',
)
gnome = import ('gnome')
i18n = import ('i18n')
cc = meson.get_compiler ('c')
valac = meson.get_compiler ('vala')
libarchive_dep = dependency ('libarchive', version: '>= 3.0.0')
src_dir = join_paths (meson.source_root (), 'src')
vapi_dir = join_paths (meson.source_root (), 'vapi')
config_dep = valac.find_library ('config', dirs: src_dir)
pkglibdir = join_paths (get_option ('libdir'), meson.project_name ())
po_dir = join_paths (meson.source_root (), 'po')
data_dir = join_paths (get_option ('prefix'), get_option ('datadir'))
locale_dir = join_paths (get_option ('prefix'), get_option ('localedir'))
pkgdatadir = join_paths (data_dir, meson.project_name ())
conf = configuration_data ()
conf.set_quoted ('DISTRIBUTOR_NAME', get_option ('distributor_name'))
conf.set_quoted ('DISTRIBUTOR_VERSION', get_option ('distributor_version'))
conf.set_quoted ('PACKAGE_NAME', meson.project_name ())
conf.set_quoted ('PACKAGE_TARNAME', meson.project_name ())
conf.set_quoted ('PACKAGE_VERSION', meson.project_version ())
conf.set_quoted ('GETTEXT_PACKAGE', meson.project_name ())
conf.set('PACKAGE_URL', '"https://gnomeboxes.org"')
conf.set_quoted ('DATADIR', data_dir)
conf.set_quoted ('CACHEDIR', '/var/cache')
conf.set_quoted ('LOCALEDIR', locale_dir)
conf.set10 ('UEFI_INSTALLS_SUPPORTED', get_option ('uefi'))
conf.set('PACKAGE_BUGREPORT', '"http://gitlab.gnome.org/gnome/gnome-boxes/issues"')
if get_option ('profile') == 'development'
profile = 'Devel'
name_suffix = ' (Development Snapshot)'
else
profile = ''
name_suffix = ''
endif
application_id = 'org.gnome.Boxes@0@'.format (profile)
conf.set_quoted ('PROFILE', profile)
conf.set_quoted ('APPLICATION_ID', application_id)
conf.set_quoted ('NAME_SUFFIX', name_suffix)
conf.set_quoted ('VERSION', '@0@-@VCS_TAG@'.format (meson.project_version()))
config_h = declare_dependency (
sources: vcs_tag (
command: ['git', 'rev-parse', '--short', 'HEAD'],
fallback: get_option('profile') != 'default'? 'devel' : 'stable',
input: configure_file (
output: 'config.h.in',
configuration: conf
),
output: 'config.h'
)
)
#configure_file (output: 'config.h', configuration: conf)
config_h_dir = include_directories ('.')
gnome.post_install(
glib_compile_schemas: true,
gtk_update_icon_cache: true,
update_desktop_database: true,
)
subdir ('data')
subdir ('help')
subdir ('po')
subdir ('src')
if get_option ('installed_tests')
subdir ('tests')
endif