fractal/meson.build

42 lines
1.4 KiB
Meson
Raw Normal View History

2017-11-08 11:44:55 +00:00
project(
'fractal', 'rust',
version: '0.1.27',
2017-11-08 11:44:55 +00:00
license: 'GPLv3',
)
fractal_version = meson.project_version()
version_array = fractal_version.split('.')
fractal_major_version = version_array[0].to_int()
fractal_minor_version = version_array[1].to_int()
fractal_version_micro = version_array[2].to_int()
fractal_prefix = get_option('prefix')
fractal_bindir = join_paths(fractal_prefix, get_option('bindir'))
2017-12-17 18:10:26 +00:00
datadir = get_option('datadir')
icondir = join_paths(datadir, 'icons')
subdir('fractal-gtk/res')
2017-11-08 11:44:55 +00:00
cargo = find_program('cargo', required: false)
2017-11-11 09:45:57 +00:00
gresource = find_program('glib-compile-resources', required: false)
cargo_vendor = find_program('cargo-vendor', required: false)
cargo_script = find_program('scripts/cargo.sh')
grabber = find_program('scripts/grabber.sh')
2017-11-11 11:20:34 +00:00
cargo_release = find_program('scripts/release.sh')
2017-11-11 09:45:57 +00:00
c = run_command(grabber)
sources = c.stdout().strip().split('\n')
2017-11-08 11:44:55 +00:00
cargo_release = custom_target('cargo-build',
build_by_default: true,
input: sources,
2017-11-08 11:44:55 +00:00
output: ['fractal'],
install: true,
install_dir: fractal_bindir,
2017-11-11 09:45:57 +00:00
command: [cargo_script, '@CURRENT_SOURCE_DIR@', '@OUTPUT@'])
run_target('release', command: ['scripts/release.sh',
meson.project_name() + '-' + fractal_version
2017-11-10 13:11:37 +00:00
])