Commit a26cce18 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠
Browse files

meson: wildmidi detection fixes

Need at least 0.4.2 apparently.

ext/wildmidi/meson.build:11:2: ERROR:  String '' cannot be converted to int
parent d49bc71f
......@@ -8,10 +8,14 @@ wildmidi_dep = dependency('WildMIDI', version: '>= 0.4.2', required: false)
if not wildmidi_dep.found() and cc.has_header ('wildmidi_lib.h')
wildmidi_ver_maj = cc.get_define('LIBWILDMIDI_VER_MAJOR', prefix: '#include <wildmidi_lib.h>')
wildmidi_ver_min = cc.get_define('LIBWILDMIDI_VER_MINOR', prefix: '#include <wildmidi_lib.h>')
wildmidi_ver_maj = ''.join(wildmidi_ver_maj.split('L')).to_int() # '0L' -> 0
wildmidi_ver_min = ''.join(wildmidi_ver_min.split('L')).to_int() # '4L' -> 4
if wildmidi_ver_maj == 0 and wildmidi_ver_min >= 4
wildmidi_dep = cc.find_library('WildMidi', required: false)
if wildmidi_ver_maj != '' and wildmidi_ver_min != ''
wildmidi_ver_maj = ''.join(wildmidi_ver_maj.split('L')).to_int() # '0L' -> 0
wildmidi_ver_min = ''.join(wildmidi_ver_min.split('L')).to_int() # '4L' -> 4
if wildmidi_ver_maj == 0 and wildmidi_ver_min >= 4
wildmidi_dep = cc.find_library('WildMidi', required: false)
else
message('WildMidi version too old, need >= 0.4.x')
endif
else
message('WildMidi version too old, need >= 0.4.x')
endif
......
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