From f38cc78996aa171a41c906a5205d1d86c6f6a197 Mon Sep 17 00:00:00 2001 From: FlightlessMango Date: Mon, 24 Jul 2023 11:18:16 +0200 Subject: [PATCH] add --version to mangohud script --- bin/mangohud.in | 5 +++++ src/meson.build | 1 + 2 files changed, 6 insertions(+) diff --git a/bin/mangohud.in b/bin/mangohud.in index b1a396ce..6c3c6e8b 100755 --- a/bin/mangohud.in +++ b/bin/mangohud.in @@ -15,6 +15,11 @@ if [ "$1" = "--dlsym" ]; then shift fi +if [ "$1" = "--version" ]; then + echo @version@ + exit 0 +fi + # Make sure we don't append mangohud lib multiple times # otherwise this could cause issues with steam runtime case ":${LD_PRELOAD-}:" in diff --git a/src/meson.build b/src/meson.build index ed004ac7..90df1f19 100644 --- a/src/meson.build +++ b/src/meson.build @@ -14,6 +14,7 @@ conf_data = configuration_data() conf_data.set('ld_libdir_mangohud_abs', libdir_mangohud) conf_data.set('ld_libdir_mangohud', ld_libdir_mangohud) conf_data.set('cpu_family', host_machine.cpu_family()) +conf_data.set('version', run_command(['git', 'describe', '--tags', '--dirty=+']).stdout().strip()) overlay_shaders = [ 'overlay.frag',