summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/meson.build2
-rw-r--r--ext/musepack/meson.build16
-rw-r--r--meson_options.txt1
3 files changed, 18 insertions, 1 deletions
diff --git a/ext/meson.build b/ext/meson.build
index 0e656533a..6ad70d42c 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 000000000..41434be8d
--- /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 619c12a71..589055781 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')