replaced makefile with meson
This commit is contained in:
parent
46ccebf956
commit
bf27804a4d
8 changed files with 23 additions and 90 deletions
19
meson.build
Normal file
19
meson.build
Normal file
|
@ -0,0 +1,19 @@
|
|||
project('myproject', 'c', version: '3.4')
|
||||
|
||||
# Get the short git commit hash
|
||||
git_hash = run_command('git', 'rev-parse', '--short', '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: '.')
|
Loading…
Add table
Add a link
Reference in a new issue