diff options
author | Naushir Patuck <naush@raspberrypi.com> | 2021-10-18 10:29:41 +0100 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-10-19 13:14:54 +0300 |
commit | 54637a615dcdac20f1f61a017d3bae429aa389e4 (patch) | |
tree | 97020ff4dfb5ec24aa88b4e8ba6991b3d5c36e00 /meson.build | |
parent | 40d994778127cc95b0c019017500695e88b4ca44 (diff) |
utils: gen-version: Pass the meson source root to the gen-version.sh script
The gen-version.sh script expects to be called from a git repo, and sets its
src_root variable accordingly. This may not always be the case if it is built
from a tarball source - full support for which is in a future commit.
The MESON_SOURCE_ROOT environnement variable does not get set when called from
the meson vcs_tag() function, but does when called from the run_command()
function, so that cannot be used either.
Instead, explicitly pass the meson source root to the gen-version.sh script.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/meson.build b/meson.build index dfed01ba..bd3246eb 100644 --- a/meson.build +++ b/meson.build @@ -17,7 +17,8 @@ project('libcamera', 'c', 'cpp', # git version tag, the build metadata (e.g. +211-c94a24f4) is omitted from # libcamera_git_version. libcamera_git_version = run_command('utils/gen-version.sh', - meson.build_root()).stdout().strip() + meson.build_root(), + meson.source_root()).stdout().strip() if libcamera_git_version == '' libcamera_git_version = meson.project_version() endif |