mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
meson.build: add rev-parse to version number
This commit is contained in:
parent
d839889972
commit
1cb8095bb7
1 changed files with 7 additions and 0 deletions
|
|
@ -27,6 +27,13 @@ add_project_arguments(cc.get_supported_arguments(
|
|||
)
|
||||
|
||||
version='"@0@"'.format(meson.project_version())
|
||||
git = find_program('git', native: true, required: false)
|
||||
if git.found()
|
||||
git_commit = run_command([git, 'describe', '--dirty'])
|
||||
if git_commit.returncode() == 0
|
||||
version = '"@0@"'.format(git_commit.stdout().strip())
|
||||
endif
|
||||
endif
|
||||
add_project_arguments('-DLABWC_VERSION=@0@'.format(version), language: 'c')
|
||||
|
||||
wlroots_proj = subproject(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue