From 5c86369758535ea40d43179c8bf97ec0c1ac4a75 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Fri, 10 Mar 2023 20:34:26 +0000 Subject: [PATCH] meson: explicitly annotate version.h as dependency Currently we list the custom_target (aka vcs_tag() as part of the sources. Although since it's not an explicit dependency meson/ninja are free to compile the C/C++ files, before the file is generated. Closes: https://github.com/flightlessmango/MangoHud/issues/862 Signed-off-by: Emil Velikov --- meson.build | 2 ++ src/meson.build | 1 + 2 files changed, 3 insertions(+) diff --git a/meson.build b/meson.build index 5ed2d80f..10727a63 100644 --- a/meson.build +++ b/meson.build @@ -16,6 +16,8 @@ mangohud_version = vcs_tag( input: 'version.h.in', output: 'version.h') +mangohud_version_dep = declare_dependency(sources : mangohud_version) + pre_args = [ '-D__STDC_CONSTANT_MACROS', '-D__STDC_FORMAT_MACROS', diff --git a/src/meson.build b/src/meson.build index f4cf3358..65133050 100644 --- a/src/meson.build +++ b/src/meson.build @@ -162,6 +162,7 @@ mangohud_static_lib = static_library( ], gnu_symbol_visibility : 'hidden', dependencies : [ + mangohud_version_dep, vulkan_wsi_deps, dearimgui_dep, spdlog_dep,