Make sure git-hash.h is generated prior to building

meson.build was previously written in such a way that Ninja did not
actually have to generate git-hash.h before building the source files
that needed it, although Ninja often did do it.
This commit is contained in:
刘皓 2025-07-12 21:16:37 -04:00
parent c8d9ebb6be
commit 3a397eefa0
No known key found for this signature in database
GPG key ID: 7901753DB465B711

View file

@ -8,8 +8,8 @@ endif
compilers = {'cpp': meson.get_compiler('cpp')}
global_sources = [vcs_tag(command: ['git', 'rev-parse', '--short=7', 'HEAD'], fallback: 'unknown', input: 'src/git-hash.h.in', output: 'git-hash.h')]
global_dependencies = []
global_sources = []
global_dependencies = [declare_dependency(sources: vcs_tag(command: ['git', 'rev-parse', '--short=7', 'HEAD'], fallback: 'unknown', input: 'src/git-hash.h.in', output: 'git-hash.h'))]
global_include_dirs = []
global_args = []
global_link_args = []