aboutsummaryrefslogtreecommitdiffhomepage
path: root/meson.build
diff options
context:
space:
mode:
authorVaxry <[email protected]>2023-10-10 20:21:57 +0100
committerGitHub <[email protected]>2023-10-10 20:21:57 +0100
commit914851b91aeb450592e2d62749169298ac48fb0c (patch)
treedc495cfd7cbb507462184c13fb2c66c8f6d407f7 /meson.build
parent3219c84433874c3b852a254b7b3047f0e19913d8 (diff)
downloadHyprland-914851b91aeb450592e2d62749169298ac48fb0c.tar.gz
Hyprland-914851b91aeb450592e2d62749169298ac48fb0c.zip
internal: better versioning (#3543)
* better versioning * meson: better versioning * nix: better versioning --------- Co-authored-by: Mihai Fufezan <[email protected]>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build12
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')