Skip to content

Commit

Permalink
meson: explicitly annotate version.h as dependency
Browse files Browse the repository at this point in the history
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: #862
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
  • Loading branch information
evelikov authored and flightlessmango committed Mar 13, 2023
1 parent 8c531b4 commit 5c86369
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ mangohud_static_lib = static_library(
],
gnu_symbol_visibility : 'hidden',
dependencies : [
mangohud_version_dep,
vulkan_wsi_deps,
dearimgui_dep,
spdlog_dep,
Expand Down

0 comments on commit 5c86369

Please sign in to comment.