From dabb2ef740219082f05bb9f7e0cf425cfae32dfc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 19 Aug 2018 15:50:25 +0100 Subject: [PATCH] meson: build musepack plugin --- ext/meson.build | 2 +- ext/musepack/meson.build | 16 ++++++++++++++++ meson_options.txt | 1 + 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 ext/musepack/meson.build diff --git a/ext/meson.build b/ext/meson.build index 0e65653..6ad70d4 100644 --- a/ext/meson.build +++ b/ext/meson.build @@ -30,7 +30,7 @@ subdir('lv2') #subdir('modplug') subdir('mpeg2enc') subdir('mplex') -#subdir('musepack') +subdir('musepack') subdir('neon') #subdir('ofa') #subdir('openal') diff --git a/ext/musepack/meson.build b/ext/musepack/meson.build new file mode 100644 index 0000000..41434be --- /dev/null +++ b/ext/musepack/meson.build @@ -0,0 +1,16 @@ +mpcdec_dep = cc.find_library('mpcdec', required: get_option('musepack')) + +if mpcdec_dep.found() and cc.has_header_symbol('mpc/mpcdec.h', 'mpc_demux_init', dependencies: mpcdec_dep) + gstmusepack = library('gstmusepack', + 'gstmusepackdec.c', 'gstmusepackreader.c', + c_args : gst_plugins_bad_args, + link_args : noseh_link_args, + include_directories : [configinc], + dependencies : [gstaudio_dep, mpcdec_dep], + install : true, + install_dir : plugins_install_dir, + ) + pkgconfig.generate(gstmusepack, install_dir : plugins_pkgconfig_install_dir) +elif get_option('musepack').enabled() + error('Could not find libmpcdec header files, but Musepack was enabled via options') +endif diff --git a/meson_options.txt b/meson_options.txt index 619c12a..5890557 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -108,6 +108,7 @@ option('libmms', type : 'feature', value : 'auto', description : 'Microsoft mult option('lv2', type : 'feature', value : 'auto', description : 'LV2 audio plugin bridge') option('mpeg2enc', type : 'feature', value : 'auto', description : 'mpeg2enc video encoder plugin') option('mplex', type : 'feature', value : 'auto', description : 'mplex audio/video multiplexer plugin') +option('musepack', type : 'feature', value : 'auto', description : 'libmpcdec Musepack decoder plugin') option('neon', type : 'feature', value : 'auto', description : 'NEON HTTP source plugin') option('openh264', type : 'feature', value : 'auto', description : 'H.264 video codec plugin') option('openjpeg', type : 'feature', value : 'auto', description : 'JPEG2000 image codec plugin') -- 2.7.4