diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2018-02-08 19:18:21 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2018-02-08 19:18:21 +0000 |
commit | 6aa4c40ffdd875565134f34f6077bbd55dfa9804 (patch) | |
tree | 22deddf97d303f99e390603f8e85efa4f3f6f34b /meson.build | |
parent | 1e1ff4ece588f7268964cc7341671623382d8edc (diff) |
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.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/meson.build b/meson.build index 419bd52..02f7b36 100644 --- a/meson.build +++ b/meson.build @@ -6,10 +6,14 @@ project('gst-libav', 'c', 'cpp', 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_nano = version_arr.get(3, 0) +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 libavfilter_dep = dependency('libavfilter', version: '>= 6.47.100') libavformat_dep = dependency('libavformat', version: '>= 57.41.100') |