meson.build 1.7 KB
Newer Older
Felipe Borges's avatar
Felipe Borges committed
1 2
project ('gnome-boxes',
         ['vala', 'c'],
Felipe Borges's avatar
Felipe Borges committed
3
         version: '3.28.3',
Felipe Borges's avatar
Felipe Borges committed
4
         license: 'LGPLv2+',
5
         meson_version: '>= 0.43',
Felipe Borges's avatar
Felipe Borges committed
6 7 8 9 10
)

gnome = import ('gnome')
i18n = import ('i18n')

11 12 13
cc = meson.get_compiler ('c')
valac = meson.get_compiler ('vala')

14
libarchive_dep = dependency ('libarchive', version: '>= 3.0.0')
Felipe Borges's avatar
Felipe Borges committed
15

16 17 18
src_dir = join_paths (meson.source_root (), 'src')
vapi_dir = join_paths (meson.source_root (), 'vapi')

19
config_dep = valac.find_library ('config', dirs: src_dir)
Felipe Borges's avatar
Felipe Borges committed
20 21 22 23 24

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'))
25
locale_dir = join_paths (get_option ('prefix'), get_option ('localedir'))
Felipe Borges's avatar
Felipe Borges committed
26 27

conf = configuration_data ()
28 29
conf.set_quoted ('DISTRIBUTOR_NAME', get_option ('distributor_name'))
conf.set_quoted ('DISTRIBUTOR_VERSION', get_option ('distributor_version'))
Felipe Borges's avatar
Felipe Borges committed
30 31 32 33 34 35 36 37
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://wiki.gnome.org/Apps/Boxes"')
conf.set_quoted ('DATADIR', data_dir)
conf.set_quoted ('CACHEDIR', '/var/cache')
conf.set_quoted ('LOCALEDIR', locale_dir)
38
conf.set('PACKAGE_BUGREPORT', '"http://gitlab.gnome.org/gnome/gnome-boxes/issues"')
Felipe Borges's avatar
Felipe Borges committed
39 40 41 42

configure_file (output: 'config.h', configuration: conf)
config_h_dir = include_directories ('.')

43
meson.add_install_script (join_paths ('build-aux', 'post_install.py'), data_dir)
Felipe Borges's avatar
Felipe Borges committed
44 45 46 47 48

subdir ('data')
subdir ('help')
subdir ('po')
subdir ('src')
49 50 51 52

if get_option ('installed_tests')
  subdir ('tests')
endif