From a5bb211a43092c0ceb0a60ec4aabf6beab417460 Mon Sep 17 00:00:00 2001 From: Teemu Ikonen Date: Mon, 22 Nov 2021 12:06:26 +0200 Subject: meson, location-source: Allow disabling compass in build Add option 'compass' to meson_options.txt and set preprocessor directive GCLUE_USE_COMPASS from it. Print compass option value in build summary. Use GCLUE_USE_COMPASS in gclue-location-source.c for conditional compilation of compass functionality. --- interface/meson.build | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'interface') diff --git a/interface/meson.build b/interface/meson.build index 9e230a7..74954db 100644 --- a/interface/meson.build +++ b/interface/meson.build @@ -66,10 +66,12 @@ if get_option('enable-backend') interface_prefix: 'fi.w1.wpa_supplicant1.', annotations: annotations) - compass_iface_sources = gnome.gdbus_codegen( - 'compass-interface', - 'net.hadess.SensorProxy.xml', - interface_prefix: 'net.hadess.SensorProxy') + if get_option('compass') + compass_iface_sources = gnome.gdbus_codegen( + 'compass-interface', + 'net.hadess.SensorProxy.xml', + interface_prefix: 'net.hadess.SensorProxy') + endif endif install_data('org.freedesktop.GeoClue2.Agent.xml', -- cgit v1.2.3