2017-11-08 11:44:55 +00:00
|
|
|
project(
|
|
|
|
'fractal', 'rust',
|
|
|
|
version: '0.1.0',
|
|
|
|
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_datadir = join_paths(fractal_prefix, get_option('datadir'), 'fractal')
|
|
|
|
fractal_bindir = join_paths(fractal_prefix, get_option('bindir'))
|
|
|
|
|
|
|
|
install_data('res/app.css', install_dir : fractal_datadir)
|
|
|
|
install_data('res/fractal.svg', install_dir : fractal_datadir)
|
|
|
|
install_data('res/main_window.glade', install_dir : fractal_datadir)
|
|
|
|
|
|
|
|
install_data('res/fractal.svg', install_dir : get_option('datadir') + '/icons')
|
|
|
|
install_data('res/org.gnome.Fractal.desktop', install_dir : get_option('datadir') + '/applications')
|
|
|
|
|
2017-11-08 12:37:20 +00:00
|
|
|
cargo = find_program('cargo', required: false)
|
|
|
|
cargo_script = find_program('scripts/cargo.sh')
|
2017-11-08 11:44:55 +00:00
|
|
|
cargo_release = custom_target('cargo-build',
|
2017-11-08 12:37:20 +00:00
|
|
|
build_by_default: true,
|
2017-11-10 13:11:37 +00:00
|
|
|
build_always: true,
|
2017-11-08 11:44:55 +00:00
|
|
|
output: ['fractal'],
|
2017-11-08 12:37:20 +00:00
|
|
|
install: true,
|
|
|
|
install_dir: fractal_bindir,
|
|
|
|
command: ['FRACTAL_RES=' + fractal_datadir, cargo_script, '@CURRENT_SOURCE_DIR@', '@OUTPUT@'])
|
2017-11-09 19:57:21 +00:00
|
|
|
|
2017-11-09 19:59:40 +00:00
|
|
|
cargo = find_program('cargo-vendor', required: false)
|
2017-11-09 19:57:21 +00:00
|
|
|
run_target('release', command: ['scripts/release.sh',
|
|
|
|
meson.project_name() + '-' + fractal_version
|
2017-11-10 13:11:37 +00:00
|
|
|
])
|