diff options
author | Michael Riesch <michael.riesch@wolfvision.net> | 2023-03-01 22:18:00 +0100 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2023-03-09 18:41:16 +0200 |
commit | f852b7fbc4960ea83bab49b75408fb13462db8ba (patch) | |
tree | b787cd9eaf4544ca2cbe6f79f15638e36666e6b8 /meson.build | |
parent | 16546269aa2a725d5fd187eef2dc812bbba43b7a (diff) |
meson: Align handling of build metadata
The build metadata is split off correctly from the version string
obtained with utils/gen-version.sh, but for the meson project version
this step is not carried out. However, since libcamera uses Semantic
Versioning, it should be possible to add build metadata to the meson
project version. Align the handling of the build metadata to resolve
this mismatch.
Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.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 | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/meson.build b/meson.build index 9eee9d39..0f89b45a 100644 --- a/meson.build +++ b/meson.build @@ -25,13 +25,14 @@ if libcamera_git_version == '' endif libcamera_version = libcamera_git_version.split('+')[0] +project_version = meson.project_version().split('+')[0] # A shallow clone, or a clone without a reachable tag equivalent to the # meson.project_version() could leave the project in a mis-described state. # Produce a warning in this event, and fix to a best effort. -if libcamera_version != meson.project_version() +if libcamera_version != project_version warning('The sources disagree about the version: ' - + libcamera_version + ' != ' + meson.project_version()) + + libcamera_version + ' != ' + project_version) summary({'libcamera git version' : libcamera_git_version, 'Source version match' : false, @@ -40,9 +41,9 @@ if libcamera_version != meson.project_version() # Replace the version components reported by git with the release version, # but keep all trailing information supplied by git. - libcamera_git_version = (meson.project_version() + + libcamera_git_version = (project_version + libcamera_git_version.strip(libcamera_version)) - libcamera_version = meson.project_version() + libcamera_version = project_version # Append a marker to show we have modified this version string libcamera_git_version += '-nvm' |