19 lines
559 B
Meson
19 lines
559 B
Meson
project('patricus utils', 'c', version: '3.4')
|
|
|
|
# Get the short git commit hash
|
|
git_hash = run_command('git', 'rev-parse', 'HEAD', check: true).stdout().strip()
|
|
|
|
# Combine version and hash
|
|
full_version = '@0@(@1@)'.format(meson.project_version(), git_hash)
|
|
|
|
# Generate header
|
|
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'], include_directories: '.')
|