diff options
author | Mihai Fufezan <[email protected]> | 2023-10-10 21:37:22 +0300 |
---|---|---|
committer | Mihai Fufezan <[email protected]> | 2023-10-10 21:37:22 +0300 |
commit | 0a908acc05ed8c163beacfb0f0004c01a8d6dd4f (patch) | |
tree | bf347952af9c1c6b6640e2f73ae79deabaf16213 | |
parent | d39e531e7516a35d41ee8766de6b15edb2e71c6c (diff) | |
download | Hyprland-0a908acc05ed8c163beacfb0f0004c01a8d6dd4f.tar.gz Hyprland-0a908acc05ed8c163beacfb0f0004c01a8d6dd4f.zip |
meson: better versioning
-rw-r--r-- | meson.build | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/meson.build b/meson.build index d515621e..726933bc 100644 --- a/meson.build +++ b/meson.build @@ -20,22 +20,12 @@ else error('Could not configure current C++ compiler (' + cpp_compiler.get_id() + ' ' + cpp_compiler.version() + ') with required C++ standard (C++23)') endif -GIT_BRANCH = run_command('git', 'rev-parse', '--abbrev-ref', 'HEAD', check: false).stdout().strip() -GIT_COMMIT_HASH = run_command('git', 'rev-parse', 'HEAD', check: false).stdout().strip() -GIT_COMMIT_MESSAGE = run_command('sh', '-c', 'git show | head -n 5 | tail -n 1', check: false).stdout().strip() -GIT_DIRTY = run_command('sh', '-c', 'git diff-index --quiet HEAD -- || echo "dirty"', check: false).stdout().strip() - add_project_arguments( [ '-Wno-unused-parameter', '-Wno-unused-value', '-Wno-missing-field-initializers', '-Wno-narrowing', - - f'-DGIT_BRANCH="@GIT_BRANCH@"', - f'-DGIT_COMMIT_HASH="@GIT_COMMIT_HASH@"', - f'-DGIT_COMMIT_MESSAGE="@GIT_COMMIT_MESSAGE@"', - f'-DGIT_DIRTY="@GIT_DIRTY@"', ], language: 'cpp') @@ -81,6 +71,8 @@ foreach file : headers install_headers(file, subdir: 'hyprland', preserve_path: true) endforeach +version_h = run_command('sh', '-c', 'scripts/generateVersion.sh') + subdir('protocols') subdir('src') subdir('hyprctl') |