meson.build 1.39 KB
Newer Older
1 2
project(
  'fractal', 'rust',
3
  version: '0.1.27',
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 19
datadir = get_option('datadir')
icondir = join_paths(datadir, 'icons')

subdir('fractal-gtk/res')
20

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

28 29 30
c = run_command(grabber)
sources = c.stdout().strip().split('\n')

31
cargo_release = custom_target('cargo-build',
32
                        build_by_default: true,
33
                        input: sources,
34
                        output: ['fractal'],
35 36
                        install: true,
                        install_dir: fractal_bindir,
37
                        command: [cargo_script, '@CURRENT_SOURCE_DIR@', '@OUTPUT@'])
38 39 40

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