From 6594c7c90901bb027b288363b8830d724581fbc3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 31 Aug 2022 18:30:11 -0400 Subject: Fix missing example plugin UI binaries --- lv2/core.lv2/meta.ttl | 2 ++ meson/suppressions/meson.build | 1 + plugins/eg-sampler.lv2/meson.build | 19 +++++++++++++++++++ plugins/eg-scope.lv2/meson.build | 19 +++++++++++++++++++ 4 files changed, 41 insertions(+) diff --git a/lv2/core.lv2/meta.ttl b/lv2/core.lv2/meta.ttl index ddc38f0..03e2240 100644 --- a/lv2/core.lv2/meta.ttl +++ b/lv2/core.lv2/meta.ttl @@ -42,6 +42,8 @@ THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH R rdfs:label "Fix includedir in pkg-config file." ] , [ rdfs:label "Only install lv2specgen when required Python modules are found." + ] , [ + rdfs:label "Fix missing example plugin UI binaries." ] ] ] , [ diff --git a/meson/suppressions/meson.build b/meson/suppressions/meson.build index e2170c0..7ef302a 100644 --- a/meson/suppressions/meson.build +++ b/meson/suppressions/meson.build @@ -34,6 +34,7 @@ if is_variable('cc') ] elif cc.get_id() == 'gcc' c_suppressions += [ + '-Wno-bad-function-cast', '-Wno-cast-align', '-Wno-cast-qual', '-Wno-conversion', diff --git a/plugins/eg-sampler.lv2/meson.build b/plugins/eg-sampler.lv2/meson.build index 1283a8f..6cac920 100644 --- a/plugins/eg-sampler.lv2/meson.build +++ b/plugins/eg-sampler.lv2/meson.build @@ -2,6 +2,7 @@ # SPDX-License-Identifier: CC0-1.0 OR ISC plugin_sources = files('sampler.c') +ui_sources = files('sampler_ui.c') bundle_name = 'eg-sampler.lv2' data_filenames = ['manifest.ttl.in', 'sampler.ttl', 'click.wav'] @@ -13,6 +14,11 @@ sndfile_dep = dependency('sndfile', version: '>= 1.0.0', required: get_option('plugins')) +gtk2_dep = dependency('gtk+-2.0', + include_type: 'system', + required: get_option('plugins'), + version: '>= 2.18.0') + if samplerate_dep.found() and sndfile_dep.found() module = shared_library( 'sampler', @@ -45,4 +51,17 @@ if samplerate_dep.found() and sndfile_dep.found() ) endif endforeach + + if gtk2_dep.found() + shared_library( + 'sampler_ui', + ui_sources, + c_args: c_suppressions, + dependencies: [lv2_dep, gtk2_dep], + gnu_symbol_visibility: 'hidden', + install: true, + install_dir: lv2dir / bundle_name, + name_prefix: '', + ) + endif endif diff --git a/plugins/eg-scope.lv2/meson.build b/plugins/eg-scope.lv2/meson.build index ecf01b2..1b66699 100644 --- a/plugins/eg-scope.lv2/meson.build +++ b/plugins/eg-scope.lv2/meson.build @@ -2,9 +2,15 @@ # SPDX-License-Identifier: CC0-1.0 OR ISC plugin_sources = files('examploscope.c') +ui_sources = files('examploscope_ui.c') bundle_name = 'eg-scope.lv2' data_filenames = ['manifest.ttl.in', 'examploscope.ttl.in'] +gtk2_dep = dependency('gtk+-2.0', + include_type: 'system', + required: get_option('plugins'), + version: '>= 2.18.0') + module = shared_library( 'examploscope', plugin_sources, @@ -39,3 +45,16 @@ foreach filename : data_filenames ) endif endforeach + +if gtk2_dep.found() + shared_library( + 'examploscope_ui', + ui_sources, + c_args: c_suppressions, + dependencies: [lv2_dep, gtk2_dep], + gnu_symbol_visibility: 'hidden', + install: true, + install_dir: lv2dir / bundle_name, + name_prefix: '', + ) +endif -- cgit v1.2.1