From 8a981ceeee82fd40f41b4f1191f451419cf8cbfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Thu, 8 Feb 2018 19:18:59 +0000 Subject: [PATCH] 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. Also remove unused libversion/soversion. --- meson.build | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/meson.build b/meson.build index 9275eaf5fb..16823c4421 100644 --- a/meson.build +++ b/meson.build @@ -6,11 +6,11 @@ project('gst-omx', '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] -if version_arr.length() == 4 - gst_version_nano = version_arr[3] +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].to_int() else gst_version_nano = 0 endif @@ -19,10 +19,6 @@ glib_req = '>= 2.40.0' gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor) tizil_req = '>= 0.1.0' api_version = '1.0' -soversion = 0 -# maintaining compatibility with the previous libtool versioning -# current = minor * 100 + micro -libversion = '@0@.@1@.0'.format(soversion, gst_version_minor.to_int() * 100 + gst_version_micro.to_int()) plugins_install_dir = '@0@/gstreamer-1.0'.format(get_option('libdir'))