diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-11-30 04:29:32 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-11-30 04:30:45 -0500 |
commit | 86d1ecf783f8fd164ed63501c859b65cfc6bc022 (patch) | |
tree | 3a2ba06da73e7ea85972ab95a7268923b4903279 | |
parent | fix meson.build whitespace (diff) | |
download | sway-86d1ecf783f8fd164ed63501c859b65cfc6bc022.tar.gz sway-86d1ecf783f8fd164ed63501c859b65cfc6bc022.tar.zst sway-86d1ecf783f8fd164ed63501c859b65cfc6bc022.zip |
meson add version info
-rw-r--r-- | meson.build | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/meson.build b/meson.build index 6f2681af..af383fbf 100644 --- a/meson.build +++ b/meson.build | |||
@@ -24,8 +24,11 @@ pixman = dependency('pixman-1') | |||
24 | libcap = dependency('libcap') | 24 | libcap = dependency('libcap') |
25 | math = cc.find_library('m') | 25 | math = cc.find_library('m') |
26 | 26 | ||
27 | # TODO version | 27 | git_commit_hash = run_command(['git', 'describe', '--always', '--tags']).stdout().strip() |
28 | add_project_arguments('-DSWAY_VERSION="5"', language: 'c') | 28 | git_branch = run_command(['git', 'rev-parse', '--abbrev-ref', 'HEAD']).stdout().strip() |
29 | version = '"@0@ (" __DATE__ ", branch \'@1@\')"'.format(git_commit_hash, git_branch) | ||
30 | |||
31 | add_project_arguments('-DSWAY_VERSION=@0@'.format(version), language: 'c') | ||
29 | 32 | ||
30 | sway_inc = include_directories('include') | 33 | sway_inc = include_directories('include') |
31 | 34 | ||