Skip to content

Proper method to update templated "git-version.h.in" file #10896

Answered by eli-schwartz
tabedzki asked this question in Q&A
Discussion options

You must be logged in to vote

Specify the output file as

output: 'git_version.h'

Meson will automatically treat that as relative to the current build directory context, which is src/ because it is defined in src/meson.build.

You should also do this for the input file as well, though, because otherwise it won't find the input file.

The source file defined as a list of strings can be defined instead with files('main.cpp') and it will remember the directory it was defined in, but if you leave it as a plain string then it's "defined" at the time of use, which is in the root meson.build

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@tabedzki
Comment options

@tabedzki
Comment options

Answer selected by tabedzki
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants