2021-02-04 19:25:29 +00:00
|
|
|
project('fractal',
|
|
|
|
'rust',
|
|
|
|
version: '0.0.1',
|
2022-01-20 11:19:42 +00:00
|
|
|
license: 'GPL-3.0-or-later',
|
2022-01-24 12:18:20 +00:00
|
|
|
meson_version: '>= 0.59')
|
2021-02-04 19:25:29 +00:00
|
|
|
|
|
|
|
i18n = import('i18n')
|
|
|
|
gnome = import('gnome')
|
|
|
|
|
2021-02-04 23:21:16 +00:00
|
|
|
base_id = 'org.gnome.FractalNext'
|
2021-02-04 19:25:29 +00:00
|
|
|
|
|
|
|
dependency('glib-2.0', version: '>= 2.66')
|
|
|
|
dependency('gio-2.0', version: '>= 2.66')
|
2022-01-19 22:15:39 +00:00
|
|
|
dependency('gtk4', version: '>= 4.6.0')
|
2021-05-04 12:49:07 +00:00
|
|
|
dependency(
|
2022-01-19 22:15:39 +00:00
|
|
|
'libadwaita-1', version: '>= 1.0.0',
|
2021-05-04 12:49:07 +00:00
|
|
|
fallback: ['libadwaita', 'libadwaita_dep'],
|
|
|
|
default_options: ['tests=false', 'examples=false', 'vapi=false']
|
|
|
|
)
|
|
|
|
dependency(
|
|
|
|
'gtksourceview-5', version: '>= 5.0.0',
|
|
|
|
fallback: ['gtksourceview', 'gtksource_dep'],
|
|
|
|
default_options: ['gtk_doc=false', 'sysprof=false', 'gir=false', 'vapi=false', 'install_tests=false']
|
|
|
|
)
|
2021-11-25 11:15:47 +00:00
|
|
|
dependency('gstreamer-1.0', version: '>= 1.18')
|
|
|
|
dependency('gstreamer-base-1.0', version: '>= 1.18')
|
|
|
|
dependency('gstreamer-plugins-base-1.0', version: '>= 1.18')
|
|
|
|
dependency('gstreamer-video-1.0', version: '>= 1.18')
|
2022-02-14 20:53:11 +00:00
|
|
|
dependency('libsecret-1', version: '>= 0.19',
|
|
|
|
default_options: ['gtk_doc=false', 'gir=false', 'vapi=false'])
|
2021-02-04 19:25:29 +00:00
|
|
|
|
|
|
|
glib_compile_resources = find_program('glib-compile-resources', required: true)
|
|
|
|
glib_compile_schemas = find_program('glib-compile-schemas', required: true)
|
|
|
|
desktop_file_validate = find_program('desktop-file-validate', required: false)
|
|
|
|
appstream_util = find_program('appstream-util', required: false)
|
|
|
|
cargo = find_program('cargo', required: true)
|
|
|
|
|
|
|
|
version = meson.project_version()
|
|
|
|
version_array = version.split('.')
|
|
|
|
major_version = version_array[0].to_int()
|
|
|
|
minor_version = version_array[1].to_int()
|
|
|
|
version_micro = version_array[2].to_int()
|
|
|
|
|
|
|
|
prefix = get_option('prefix')
|
|
|
|
bindir = prefix / get_option('bindir')
|
|
|
|
localedir = prefix / get_option('localedir')
|
|
|
|
|
|
|
|
datadir = prefix / get_option('datadir')
|
|
|
|
pkgdatadir = datadir / meson.project_name()
|
|
|
|
iconsdir = datadir / 'icons'
|
2022-01-19 15:05:07 +00:00
|
|
|
podir = meson.project_source_root() / 'po'
|
2021-02-04 19:25:29 +00:00
|
|
|
gettext_package = meson.project_name()
|
|
|
|
|
|
|
|
if get_option('profile') == 'development'
|
|
|
|
profile = 'Devel'
|
|
|
|
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
|
2021-02-25 08:07:23 +00:00
|
|
|
application_id = '@0@.@1@'.format(base_id, profile)
|
2021-02-04 19:25:29 +00:00
|
|
|
else
|
|
|
|
profile = ''
|
|
|
|
version_suffix = ''
|
2021-02-25 08:07:23 +00:00
|
|
|
application_id = base_id
|
2021-02-04 19:25:29 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
meson.add_dist_script(
|
|
|
|
'build-aux/dist-vendor.sh',
|
2022-01-19 15:05:07 +00:00
|
|
|
meson.project_build_root() / 'meson-dist' / meson.project_name() + '-' + version,
|
|
|
|
meson.project_source_root()
|
2021-02-04 19:25:29 +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
|
|
|
|
|
|
|
|
subdir('data')
|
|
|
|
subdir('po')
|
|
|
|
subdir('src')
|
|
|
|
|
2022-01-24 12:18:20 +00:00
|
|
|
gnome.post_install(
|
|
|
|
gtk_update_icon_cache: true,
|
|
|
|
glib_compile_schemas: true,
|
|
|
|
update_desktop_database: true,
|
|
|
|
)
|