meson: Fix building api_version with odd minor

`version_minor + 1` only works if version_minor is an int.
parent 26d31032
......@@ -14,15 +14,14 @@ pkg = import('pkgconfig')
# Versioning
version = meson.project_version()
version_arr = version.split('.')
version_major = version_arr[0]
version_minor = version_arr[1]
version_micro = version_arr[2]
if version_minor.to_int().is_odd()
api_version = '.'.join([version_major, version_minor + 1])
else
api_version = '.'.join([version_major, version_minor])
endif
version_major = version_arr[0].to_int()
version_minor = version_arr[1].to_int()
version_micro = version_arr[2].to_int()
api_version = '@0@.@1@'.format(
version_major,
version_minor.is_odd() ? version_minor + 1 : version_minor,
)
# Before making a release, the LT_VERSION string should be modified.
# The string is of the form C.A.R
......
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