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.
This commit is contained in:
Rafał Dzięgiel
2024-06-15 13:36:23 +02:00
parent d4598846d3
commit 521a83bad0

View File

@@ -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.',