Commit d0cbd961 authored by Marc-André Lureau's avatar Marc-André Lureau

meson: fix ninja dist, and building from tarball

meson doesn't handle git-version-gen correctly yet (see
meson#688). Let's set the version manually for now.

And a tag version vX.X will also fail to build, version_info[2]
is out of array bounds.
Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso's avatarVictor Toso <victortoso@redhat.com>
parent a2c01ea4
......@@ -2,7 +2,7 @@
# project definition
#
project('spice-gtk', 'c',
version : run_command('build-aux/git-version-gen', '${MESON_SOURCE_ROOT}/.tarball-version', check : true).stdout().strip(),
version : '0.36',
license : 'LGPLv2.1',
meson_version : '>= 0.49')
......
......@@ -8,9 +8,9 @@ spice_gtk_include += [include_directories('.')]
version_info = meson.project_version().split('.')
major = '@0@'.format(version_info[0])
minor = '@0@'.format(version_info[1])
micro = version_info[2].split('-')[0]
if micro == ''
micro = '0'
micro = '0'
if version_info.length() > 2
micro = version_info[2].split('-')[0]
endif
version_data = configuration_data()
version_data.set('SPICE_GTK_MAJOR_VERSION', major)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment