project('patricus utils', 'c', 'cpp', version: '4.0', default_options: ['cpp_std=c++20']) branch_name = run_command('git', 'rev-parse', '--abbrev-ref', 'HEAD', check: true).stdout().strip() if branch_name.startswith('stable/') full_version = meson.project_version() else git_hash = run_command('git', 'rev-parse', 'HEAD', check: true).stdout().strip() full_version = '@0@(@1@)'.format(meson.project_version(), git_hash) endif conf = configuration_data() conf.set('version', '"@0@"'.format(full_version)) configure_file( output: 'version.h', configuration: conf ) executable('cat', ['cat.c', 'stdin.c'], include_directories: '.') executable('cmpsize', ['cmpsize.c', 'bytes.c']) executable('nuke', ['nuke.cpp'], include_directories: '.')