mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
meson: make version numbers ints and fix int/string comparison
WARNING: Trying to compare values of different types (str, int). The result of this is undefined and will become a hard error in a future Meson release.
This commit is contained in:
parent
ca7833edac
commit
8891547bc7
1 changed files with 8 additions and 6 deletions
12
meson.build
12
meson.build
|
@ -6,11 +6,13 @@ project('gst-editing-services', 'c',
|
||||||
|
|
||||||
gst_version = meson.project_version()
|
gst_version = meson.project_version()
|
||||||
version_arr = gst_version.split('.')
|
version_arr = gst_version.split('.')
|
||||||
gst_version_major = version_arr[0]
|
gst_version = meson.project_version()
|
||||||
gst_version_minor = version_arr[1]
|
version_arr = gst_version.split('.')
|
||||||
gst_version_micro = version_arr[2]
|
gst_version_major = version_arr[0].to_int()
|
||||||
|
gst_version_minor = version_arr[1].to_int()
|
||||||
|
gst_version_micro = version_arr[2].to_int()
|
||||||
if version_arr.length() == 4
|
if version_arr.length() == 4
|
||||||
gst_version_nano = version_arr[3]
|
gst_version_nano = version_arr[3].to_int()
|
||||||
else
|
else
|
||||||
gst_version_nano = 0
|
gst_version_nano = 0
|
||||||
endif
|
endif
|
||||||
|
@ -19,7 +21,7 @@ apiversion = '1.0'
|
||||||
soversion = 0
|
soversion = 0
|
||||||
# maintaining compatibility with the previous libtool versioning
|
# maintaining compatibility with the previous libtool versioning
|
||||||
# current = minor * 100 + micro
|
# current = minor * 100 + micro
|
||||||
libversion = '@0@.@1@.0'.format(soversion, gst_version_minor.to_int() * 100 + gst_version_micro.to_int())
|
libversion = '@0@.@1@.0'.format(soversion, gst_version_minor * 100 + gst_version_micro)
|
||||||
|
|
||||||
glib_req = '>= 2.40.0'
|
glib_req = '>= 2.40.0'
|
||||||
gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)
|
gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)
|
||||||
|
|
Loading…
Reference in a new issue