diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2018-12-16 18:07:48 +0000 |
---|---|---|
committer | Sebastian Dröge <slomo@coaxion.net> | 2018-12-17 09:12:53 +0000 |
commit | 4130b087767957334237404e7d1743a4dc2f2552 (patch) | |
tree | dd53de2bde505537a6d23d8009a3b5b2c0aecc5f /ext | |
parent | 56c65afff4e42bf4a0ef9fd34e97eb4b5cecb773 (diff) | |
download | gstreamer-plugins-bad-4130b087767957334237404e7d1743a4dc2f2552.tar.gz |
meson: build wildmidi plugin
Diffstat (limited to 'ext')
-rw-r--r-- | ext/meson.build | 2 | ||||
-rw-r--r-- | ext/wildmidi/meson.build | 32 |
2 files changed, 33 insertions, 1 deletions
diff --git a/ext/meson.build b/ext/meson.build index 9e718e294..9a5230ccd 100644 --- a/ext/meson.build +++ b/ext/meson.build @@ -52,7 +52,6 @@ subdir('spandsp') subdir('srt') subdir('srtp') #subdir('teletextdec') -#subdir('wildmidi') subdir('ttml') subdir('voaacenc') #subdir('voamrwbenc') @@ -61,6 +60,7 @@ subdir('wayland') subdir('webrtc') subdir('webrtcdsp') subdir('webp') +subdir('wildmidi') subdir('wpe') subdir('x265') subdir('zbar') diff --git a/ext/wildmidi/meson.build b/ext/wildmidi/meson.build new file mode 100644 index 000000000..902e06622 --- /dev/null +++ b/ext/wildmidi/meson.build @@ -0,0 +1,32 @@ +if get_option('wildmidi').disabled() + subdir_done() +endif + +# Recent versions ship a pkg-config file, so try that first +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) + else + message('WildMidi version too old, need >= 0.4.x') + endif +endif + +if wildmidi_dep.found() + gstwildmidi = library('gstwildmidi', + 'gstwildmididec.c', + c_args: gst_plugins_bad_args, + include_directories: [configinc], + dependencies: [gstaudio_dep, gstbadaudio_dep, wildmidi_dep], + install: true, + install_dir: plugins_install_dir, + ) + pkgconfig.generate(gstwildmidi, install_dir: plugins_pkgconfig_install_dir) +elif get_option('wildmidi').enabled() + error('WildMidi plugin explicitly enabled, but required library or headers not found.') +endif |