Skip to content

Commit d4d97b5

Browse files
Scott KilauMathisMARION
authored andcommitted
build: allowing compiling without D-Bus
There is a minor bug in CMakeLists.txt that always brings in common/dbus.c, even when DBUS is not enabled. Origin: #24
1 parent 1c1d89e commit d4d97b5

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ add_library(libwsbrd STATIC
146146
common/bus_uart.c
147147
common/capture.c
148148
common/commandline.c
149-
common/dbus.c
150149
common/events_scheduler.c
151150
common/log.c
152151
common/bits.c
@@ -270,7 +269,7 @@ if(LIBCAP_FOUND)
270269
endif()
271270
if(LIBSYSTEMD_FOUND)
272271
target_compile_definitions(libwsbrd PRIVATE HAVE_LIBSYSTEMD)
273-
target_sources(libwsbrd PRIVATE app_wsbrd/app/dbus.c)
272+
target_sources(libwsbrd PRIVATE common/dbus.c app_wsbrd/app/dbus.c)
274273
if(AUTH_LEGACY)
275274
target_sources(libwsbrd PRIVATE app_wsbrd/app/dbus_auth_legacy.c)
276275
else()

app_wsbrd/app/dbus.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ struct wsbr_ctxt;
2121

2222
extern const struct sd_bus_vtable wsbrd_dbus_vtable[];
2323
#else
24-
static const struct sd_bus_vtable *wsbrd_dbus_vtable;
24+
static const struct sd_bus_vtable *const wsbrd_dbus_vtable;
2525
#endif
2626

2727
#endif

0 commit comments

Comments
 (0)