main: include wlroots version in --version string

This commit is contained in:
Consolatis 2026-05-07 02:13:42 +02:00 committed by Johan Malm
parent 2480a23b19
commit 2189b2be1e

View file

@ -4,6 +4,7 @@
#include <pango/pangocairo.h>
#include <signal.h>
#include <unistd.h>
#include <wlr/version.h>
#include "common/fd-util.h"
#include "common/font.h"
#include "common/macros.h"
@ -66,12 +67,15 @@ static void
print_version(void)
{
#define FEATURE_ENABLED(feature) (HAVE_##feature ? "+" : "-")
printf("labwc %s (%sxwayland %snls %srsvg %slibsfdo)\n",
printf("labwc %s (%sxwayland %snls %srsvg %slibsfdo) running on wlroots %d.%d.%d\n",
LABWC_VERSION,
FEATURE_ENABLED(XWAYLAND),
FEATURE_ENABLED(NLS),
FEATURE_ENABLED(RSVG),
FEATURE_ENABLED(LIBSFDO)
FEATURE_ENABLED(LIBSFDO),
wlr_version_get_major(),
wlr_version_get_minor(),
wlr_version_get_micro()
);
#undef FEATURE_ENABLED
}