meson: SOURCE_DIR is not a valid macro in custom_target()

But appears to have been allowed in older versions of meson.

Fixes an issue where foot’s version was always reported as the last
stable release, even though it was a git build.
This commit is contained in:
Daniel Eklöf 2021-03-11 17:30:00 +01:00
parent 098bc2771b
commit 928b819934
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -112,7 +112,7 @@ version = custom_target(
'generate_version',
build_always_stale: true,
output: 'version.h',
command: [generate_version_sh, meson.project_version(), '@SOURCE_DIR@', '@OUTPUT@'])
command: [generate_version_sh, meson.project_version(), '@SOURCE_ROOT@', '@OUTPUT@'])
misc = static_library(
'misc',