2017-11-08 11:44:55 +00:00
|
|
|
project(
|
|
|
|
'fractal', 'rust',
|
2019-11-30 09:51:52 +00:00
|
|
|
version: '4.2.2',
|
2017-11-08 11:44:55 +00:00
|
|
|
license: 'GPLv3',
|
|
|
|
)
|
|
|
|
|
2018-12-02 00:06:19 +00:00
|
|
|
dependency('openssl', version: '>= 1.0')
|
|
|
|
dependency('dbus-1')
|
|
|
|
|
|
|
|
dependency('glib-2.0', version: '>= 2.56')
|
|
|
|
dependency('gio-2.0', version: '>= 2.56')
|
|
|
|
dependency('cairo', version: '>= 1.16')
|
|
|
|
dependency('gdk-pixbuf-2.0')
|
2019-07-03 04:26:36 +00:00
|
|
|
dependency('gtk+-3.0', version: '>= 3.24.7')
|
2020-02-05 11:22:39 +00:00
|
|
|
dependency('libhandy-0.0', version: '>= 0.0.13')
|
2019-08-11 02:00:17 +00:00
|
|
|
dependency('gtksourceview-4', version: '>= 4.0')
|
2019-01-15 03:25:20 +00:00
|
|
|
dependency('gspell-1', version: '>= 1.8')
|
2018-12-02 00:06:19 +00:00
|
|
|
|
|
|
|
dependency('gstreamer-1.0', version: '>= 1.12')
|
|
|
|
dependency('gstreamer-base-1.0', version: '>= 1.12')
|
|
|
|
dependency('gstreamer-audio-1.0', version: '>= 1.12')
|
|
|
|
dependency('gstreamer-video-1.0', version: '>= 1.12')
|
|
|
|
dependency('gstreamer-player-1.0', version: '>= 1.12')
|
|
|
|
dependency('gstreamer-plugins-base-1.0', version: '>= 1.12')
|
|
|
|
dependency('gstreamer-plugins-bad-1.0', version: '>= 1.12')
|
|
|
|
dependency('gstreamer-bad-audio-1.0', version: '>= 1.12')
|
2020-01-27 16:17:57 +00:00
|
|
|
dependency('gstreamer-pbutils-1.0', version: '>= 1.14')
|
2019-06-08 09:06:43 +00:00
|
|
|
dependency('gst-editing-services-1.0', version: '>= 1.14.4')
|
2018-12-02 00:06:19 +00:00
|
|
|
|
|
|
|
cargo = find_program('cargo', required: true)
|
|
|
|
gresource = find_program('glib-compile-resources', required: true)
|
|
|
|
gschemas = find_program('glib-compile-schemas', required: true)
|
|
|
|
|
2018-08-23 21:46:36 +00:00
|
|
|
if get_option('profile') == 'development'
|
|
|
|
profile = 'Devel'
|
|
|
|
name_suffix = ' (Development)'
|
|
|
|
vcs_tag = run_command('git', 'rev-parse', '--short', 'HEAD').stdout().strip()
|
|
|
|
if vcs_tag == ''
|
|
|
|
version_suffix = '-devel'
|
|
|
|
else
|
|
|
|
version_suffix = '-@0@'.format (vcs_tag)
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
profile = ''
|
|
|
|
name_suffix = ''
|
|
|
|
version_suffix = ''
|
|
|
|
endif
|
|
|
|
|
|
|
|
application_id = 'org.gnome.Fractal@0@'.format(profile)
|
|
|
|
|
2017-11-08 11:44:55 +00:00
|
|
|
fractal_version = meson.project_version()
|
|
|
|
|
|
|
|
fractal_prefix = get_option('prefix')
|
|
|
|
fractal_bindir = join_paths(fractal_prefix, get_option('bindir'))
|
2018-05-18 08:34:17 +00:00
|
|
|
fractal_localedir = join_paths(fractal_prefix, get_option('localedir'))
|
2017-11-08 11:44:55 +00:00
|
|
|
|
2017-12-17 18:10:26 +00:00
|
|
|
datadir = get_option('datadir')
|
|
|
|
|
2018-05-17 17:52:35 +00:00
|
|
|
i18n = import('i18n')
|
2019-04-22 05:19:17 +00:00
|
|
|
gnome = import('gnome')
|
2018-05-17 17:52:35 +00:00
|
|
|
|
2018-08-23 18:13:14 +00:00
|
|
|
podir = join_paths (meson.source_root (), 'fractal-gtk', 'po')
|
|
|
|
|
2018-05-17 17:52:35 +00:00
|
|
|
subdir('fractal-gtk/po')
|
2017-12-17 18:10:26 +00:00
|
|
|
subdir('fractal-gtk/res')
|
2017-11-08 11:44:55 +00:00
|
|
|
|
2017-11-08 12:37:20 +00:00
|
|
|
cargo_script = find_program('scripts/cargo.sh')
|
2019-04-22 16:00:05 +00:00
|
|
|
test_script = find_program('scripts/test.sh')
|
2019-04-28 19:12:59 +00:00
|
|
|
doc_script = find_program('scripts/cargo-doc.sh')
|
2017-11-11 09:45:57 +00:00
|
|
|
|
2019-04-22 16:42:07 +00:00
|
|
|
cargo_manifests = files(
|
|
|
|
'Cargo.toml',
|
|
|
|
'Cargo.lock',
|
|
|
|
'fractal-gtk/Cargo.toml',
|
|
|
|
'fractal-matrix-api/Cargo.toml'
|
|
|
|
)
|
|
|
|
|
|
|
|
subdir('fractal-matrix-api/src')
|
2019-04-22 04:51:21 +00:00
|
|
|
subdir('fractal-gtk/src')
|
2017-11-09 19:57:21 +00:00
|
|
|
|
2019-04-22 05:40:42 +00:00
|
|
|
meson.add_dist_script(
|
|
|
|
'scripts/vendor.sh',
|
|
|
|
meson.source_root(),
|
|
|
|
join_paths(meson.build_root(), 'meson-dist', meson.project_name() + '-' + fractal_version)
|
|
|
|
)
|
2018-05-10 11:38:05 +00:00
|
|
|
|
2019-04-22 16:00:05 +00:00
|
|
|
test(
|
|
|
|
'cargo-test',
|
|
|
|
test_script,
|
|
|
|
args: meson.build_root(),
|
|
|
|
workdir: meson.source_root(),
|
|
|
|
timeout: 3000,
|
|
|
|
)
|
|
|
|
|
2018-11-29 17:32:33 +00:00
|
|
|
if get_option('profile') == 'development'
|
|
|
|
# Setup pre-commit hook for ensuring coding style is always consistent
|
|
|
|
message('Setting up git pre-commit hook..')
|
|
|
|
run_command('cp', '-f', 'hooks/pre-commit.hook', '.git/hooks/pre-commit')
|
|
|
|
endif
|
|
|
|
|
2018-05-10 11:38:05 +00:00
|
|
|
meson.add_install_script('scripts/meson_post_install.py')
|