Skip to content

Commit

Permalink
meson: make version numbers ints and fix int/string comparison
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tp-m committed Feb 8, 2018
1 parent 992fb96 commit 5b970a7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions meson.build
Expand Up @@ -6,11 +6,11 @@ project('gst-plugins-base', 'c',

gst_version = meson.project_version()
version_arr = gst_version.split('.')
gst_version_major = version_arr[0]
gst_version_minor = version_arr[1]
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
gst_version_nano = version_arr[3]
gst_version_nano = version_arr[3].to_int()
else
gst_version_nano = 0
endif
Expand All @@ -26,7 +26,7 @@ soversion = 0
# maintaining compatibility with the previous libtool versioning
# current = minor * 100 + micro
# FIXME: should be able to convert string to int somehow so we can just do maths
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)

plugins_install_dir = '@0@/gstreamer-1.0'.format(get_option('libdir'))

Expand Down

0 comments on commit 5b970a7

Please sign in to comment.