From 4118f98e3a33d1860577ffdf0007c3c63539720c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Sat, 15 Jun 2024 13:36:23 +0200 Subject: [PATCH] clapper: meson: Add additional check for gdbus-codegen Check at meson level if "gdbus-codegen" is available and otherwise exit cleanly, possibly building without MPRIS feature instead of failing. --- src/lib/clapper/features/mpris/meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib/clapper/features/mpris/meson.build b/src/lib/clapper/features/mpris/meson.build index 383b8e1f..39292d44 100644 --- a/src/lib/clapper/features/mpris/meson.build +++ b/src/lib/clapper/features/mpris/meson.build @@ -26,6 +26,14 @@ foreach dep : feature_deps endif endforeach +gdbus_codegen = find_program('gdbus-codegen', required: false) +if not gdbus_codegen.found() + if feature_option.enabled() + error('@0@ feature was enabled, but program gdbus-codegen was not found'.format(feature_name)) + endif + subdir_done() +endif + clapper_mpris_gdbus = gnome.gdbus_codegen('clapper-mpris-gdbus', sources: 'clapper-mpris-gdbus.xml', interface_prefix: 'org.mpris.',