From e61e840d099b6624cde54993780378564649a23d Mon Sep 17 00:00:00 2001 From: Patrik Nilsson Date: Mon, 5 Mar 2018 17:43:26 +0100 Subject: [PATCH] meson: fix ladspa dependencies There are two issues, both related to dependency checking with the meson support for the ladspa plugin. With autotools, lrdf is handled like an optional dependency. But with meson it is required. This makes the meson support less flexible and inconsistent with autotools. When autotools is used it properly checks if ladspa.h is available. But with meson it does not, instead it treats lrdf as the main dependency. This could cause a build failure if lrdf is installed, but the ladspa sdk is not. https://bugzilla.gnome.org/show_bug.cgi?id=794350 --- ext/ladspa/meson.build | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/ext/ladspa/meson.build b/ext/ladspa/meson.build index c0469ac095..b8a3ca0f9d 100644 --- a/ext/ladspa/meson.build +++ b/ext/ladspa/meson.build @@ -6,14 +6,20 @@ ladspa_sources = [ 'gstladspautils.c', ] -ladspa_dep = dependency('lrdf', required : false) -if ladspa_dep.found() - gstrsvg = library('gstladspa', +ladspa_cargs = [] + +lrdf_dep = dependency('lrdf', required : false) +if lrdf_dep.found() + ladspa_cargs = ['-DHAVE_LRDF'] +endif + +if cc.has_header('ladspa.h') + gstladspa = library('gstladspa', ladspa_sources, - c_args : gst_plugins_bad_args, + c_args : gst_plugins_bad_args + ladspa_cargs, link_args : noseh_link_args, include_directories : [configinc, libsinc], - dependencies : [gstaudio_dep, gstbase_dep, gmodule_dep, ladspa_dep, mathlib], + dependencies : [gstaudio_dep, gstbase_dep, gmodule_dep, mathlib], install : true, install_dir : plugins_install_dir, )