mirror of
https://github.com/swaywm/sway.git
synced 2024-11-22 07:51:28 +00:00
meson add version info
This commit is contained in:
parent
6924064766
commit
86d1ecf783
|
@ -24,8 +24,11 @@ pixman = dependency('pixman-1')
|
||||||
libcap = dependency('libcap')
|
libcap = dependency('libcap')
|
||||||
math = cc.find_library('m')
|
math = cc.find_library('m')
|
||||||
|
|
||||||
# TODO version
|
git_commit_hash = run_command(['git', 'describe', '--always', '--tags']).stdout().strip()
|
||||||
add_project_arguments('-DSWAY_VERSION="5"', language: 'c')
|
git_branch = run_command(['git', 'rev-parse', '--abbrev-ref', 'HEAD']).stdout().strip()
|
||||||
|
version = '"@0@ (" __DATE__ ", branch \'@1@\')"'.format(git_commit_hash, git_branch)
|
||||||
|
|
||||||
|
add_project_arguments('-DSWAY_VERSION=@0@'.format(version), language: 'c')
|
||||||
|
|
||||||
sway_inc = include_directories('include')
|
sway_inc = include_directories('include')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue