From 55c6fbd978d2d6922a2cd72c422ae8c581268721 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sat, 4 Nov 2023 07:23:28 +0100 Subject: {CMakeLists.txt,src/service.c}: Make building against librda optional. --- src/service.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/service.c b/src/service.c index bcc3950..69de20b 100644 --- a/src/service.c +++ b/src/service.c @@ -22,7 +22,9 @@ #include #include -#include +#ifdef RDA_ENABLED +# include +#endif /* RDA_ENABLED */ #include #include "brightness.h" #include "dbus-shared.h" @@ -1189,11 +1191,14 @@ indicator_power_service_init (IndicatorPowerService * self) p->cancellable = g_cancellable_new (); +#ifdef RDA_ENABLED if (!ayatana_common_utils_is_lomiri()) { p->bLocal = rda_session_is_local (); } - else { + else +#endif /* RDA_ENABLED */ + { p->bLocal = TRUE; } p->settings = g_settings_new ("org.ayatana.indicator.power"); -- cgit v1.2.3