meson.build: add versioning
Added versioning to the binaries with configuration file in meson.
This commit is contained in:
parent
55c25299da
commit
a6de269de5
2 changed files with 12 additions and 18 deletions
12
meson.build
12
meson.build
|
|
@ -1,14 +1,8 @@
|
||||||
# Project definition
|
# Project definition
|
||||||
project('zlevis', license: 'GPL3')
|
project('zlevis', license: 'GPL3', version: '2.3')
|
||||||
|
|
||||||
# Define bindir
|
# Define bin dir
|
||||||
bindir = join_paths(get_option('prefix'), get_option('bindir'))
|
bin_dir = join_paths(get_option('prefix'), get_option('bindir'))
|
||||||
|
|
||||||
# Define bins list
|
|
||||||
bins = []
|
|
||||||
|
|
||||||
# Define subdir with bins
|
# Define subdir with bins
|
||||||
subdir('src')
|
subdir('src')
|
||||||
|
|
||||||
# Install bins in bindir
|
|
||||||
install_data(bins, install_dir: bindir)
|
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
# Find scripts
|
# Find the scripts
|
||||||
main = find_program('zlevis')
|
frontend = find_program('zlevis.in')
|
||||||
encrypt = find_program('zlevis-encrypt')
|
encrypt = find_program('zlevis-encrypt.in')
|
||||||
decrypt = find_program('zlevis-decrypt')
|
decrypt = find_program('zlevis-decrypt.in')
|
||||||
|
|
||||||
# Test the scripts
|
# Test the scripts
|
||||||
test('zlevis', main, args: '--summary')
|
test('zlevis', frontend, args: '--summary')
|
||||||
test('zlevis-encrypt', encrypt, args: '--summary')
|
test('zlevis-encrypt', encrypt, args: '--summary')
|
||||||
test('zlevis-decrypt', decrypt, args: '--summary')
|
test('zlevis-decrypt', decrypt, args: '--summary')
|
||||||
|
|
||||||
# Add paths of scripts to bins
|
# Configure the scripts
|
||||||
bins += join_paths(meson.current_source_dir(), 'zlevis')
|
configure_file(input: 'zlevis.in', output: 'zlevis', configuration: {'VERSION': meson.project_version()}, install: true, install_dir: bin_dir)
|
||||||
bins += join_paths(meson.current_source_dir(), 'zlevis-encrypt')
|
configure_file(input: 'zlevis-encrypt.in', output: 'zlevis-encrypt', configuration: {'VERSION': meson.project_version()}, install: true, install_dir: bin_dir)
|
||||||
bins += join_paths(meson.current_source_dir(), 'zlevis-decrypt')
|
configure_file(input: 'zlevis-decrypt.in', output: 'zlevis-decrypt', configuration: {'VERSION': meson.project_version()}, install: true, install_dir: bin_dir)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue