diff options
author | Teemu Ikonen <tpikonen@mailbox.org> | 2021-11-22 12:06:26 +0200 |
---|---|---|
committer | Teemu Ikonen <tpikonen@mailbox.org> | 2021-11-28 16:07:38 +0200 |
commit | a5bb211a43092c0ceb0a60ec4aabf6beab417460 (patch) | |
tree | 11c3278587329aab8f5caaf2df65ae4e8b6b7969 /interface | |
parent | e4c61f8f76a3d6aa15a1d9b83c68aa1474fd0e82 (diff) |
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.
Diffstat (limited to 'interface')
-rw-r--r-- | interface/meson.build | 10 |
1 files changed, 6 insertions, 4 deletions
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', |