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('zlevis', license: 'GPL3')
|
||||
project('zlevis', license: 'GPL3', version: '2.3')
|
||||
|
||||
# Define bindir
|
||||
bindir = join_paths(get_option('prefix'), get_option('bindir'))
|
||||
|
||||
# Define bins list
|
||||
bins = []
|
||||
# Define bin dir
|
||||
bin_dir = join_paths(get_option('prefix'), get_option('bindir'))
|
||||
|
||||
# Define subdir with bins
|
||||
subdir('src')
|
||||
|
||||
# Install bins in bindir
|
||||
install_data(bins, install_dir: bindir)
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
# Find scripts
|
||||
main = find_program('zlevis')
|
||||
encrypt = find_program('zlevis-encrypt')
|
||||
decrypt = find_program('zlevis-decrypt')
|
||||
# Find the scripts
|
||||
frontend = find_program('zlevis.in')
|
||||
encrypt = find_program('zlevis-encrypt.in')
|
||||
decrypt = find_program('zlevis-decrypt.in')
|
||||
|
||||
# Test the scripts
|
||||
test('zlevis', main, args: '--summary')
|
||||
test('zlevis', frontend, args: '--summary')
|
||||
test('zlevis-encrypt', encrypt, args: '--summary')
|
||||
test('zlevis-decrypt', decrypt, args: '--summary')
|
||||
|
||||
# Add paths of scripts to bins
|
||||
bins += join_paths(meson.current_source_dir(), 'zlevis')
|
||||
bins += join_paths(meson.current_source_dir(), 'zlevis-encrypt')
|
||||
bins += join_paths(meson.current_source_dir(), 'zlevis-decrypt')
|
||||
# Configure the scripts
|
||||
configure_file(input: 'zlevis.in', output: 'zlevis', configuration: {'VERSION': meson.project_version()}, install: true, install_dir: bin_dir)
|
||||
configure_file(input: 'zlevis-encrypt.in', output: 'zlevis-encrypt', configuration: {'VERSION': meson.project_version()}, install: true, install_dir: bin_dir)
|
||||
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