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')