Allowing compiling without DBUS.
There is a minor bug in CMakeLists.txt that always brings in common/dbus.c, even though later in the CMakeLists.txt file it is properly bounded by the check of "if(LIBSYSTEMD_FOUND)" (See line ~373 in CMakeLists.txt for it)
Because the line always brings in common/dbus.c, building without dbus isn't possible. Removing the 1 line from the CMakeLists.txt fixes this issue.
Hello, and thank you for pointing this out. Can you add back common/dbus.c in the D-Bus conditional sources?
Sorry about that. I actually thought that the line down in ~373 would bring it in. I should have tested it first. I updated the PR to do: $<$BOOL:${LIBSYSTEMD_FOUND}:common/dbus.c>
Instead, which does fix the compilation for both non-DBUS and DBUS builds.
NOTE: Added a second minor patch on this PR as well.
I had to tag "wsbrd_dbus_vtable" as unused, or otherwise we get this error:
`[22/135] Building C object CMakeFiles/libwsbrd.dir/app_wsbrd/app/wsbr_mac.c.o In file included from app_wsbrd/app/wsbr_mac.c:48:
app_wsbrd/app/dbus.h:24:36: warning: ‘wsbrd_dbus_vtable’ defined but not used [-Wunused-variable] 24 | static const struct sd_bus_vtable *wsbrd_dbus_vtable; | ^~~~~~~~~~~~~~~~~`
Applied onto our private development branch, thank you very much for your contribution! This should be released in version 2.3.1.