meson.build 1.46 KB
Newer Older
1 2
project(
  'fractal', 'rust',
3
  version: '0.1.4',
4 5 6 7 8 9 10 11 12 13 14 15
  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'))

16 17 18
install_data('fractal-gtk/res/org.gnome.Fractal.svg', install_dir : get_option('datadir') + '/icons')
install_data('fractal-gtk/res/org.gnome.Fractal.desktop', install_dir : get_option('datadir') + '/applications')
install_data('fractal-gtk/res/org.gnome.Fractal.appdata.xml', install_dir : get_option('datadir') + '/appdata')
19

20
cargo = find_program('cargo', required: false)
21 22
gresource = find_program('glib-compile-resources', required: false)
cargo_vendor = find_program('cargo-vendor', required: false)
23
cargo_script = find_program('scripts/cargo.sh')
24
cargo_release = find_program('scripts/release.sh')
25

26
cargo_release = custom_target('cargo-build',
27
                        build_by_default: true,
28
                        output: ['fractal'],
29 30
                        install: true,
                        install_dir: fractal_bindir,
31
                        command: [cargo_script, '@CURRENT_SOURCE_DIR@', '@OUTPUT@'])
32 33 34

run_target('release', command: ['scripts/release.sh',
                                meson.project_name() + '-' + fractal_version
35
                               ])