2021-02-04 19:25:29 +00:00
|
|
|
project('fractal',
|
|
|
|
'rust',
|
2022-09-24 17:21:32 +00:00
|
|
|
version: '5-alpha1',
|
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')
|
|
|
|
|
2022-03-29 09:12:08 +00:00
|
|
|
base_id = 'org.gnome.Fractal'
|
2023-04-29 12:25:59 +00:00
|
|
|
base_version = meson.project_version()
|
2021-02-04 19:25:29 +00:00
|
|
|
|
2023-03-26 15:29:26 +00:00
|
|
|
dependency('glib-2.0', version: '>= 2.72') # update when changing gtk version
|
|
|
|
dependency('gio-2.0', version: '>= 2.72') # always same version as glib
|
2023-03-16 10:37:51 +00:00
|
|
|
dependency('gtk4', version: '>= 4.10.0')
|
2021-05-04 12:49:07 +00:00
|
|
|
dependency(
|
2023-03-16 10:37:51 +00:00
|
|
|
'libadwaita-1', version: '>= 1.3.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']
|
|
|
|
)
|
2022-11-05 14:45:06 +00:00
|
|
|
dependency('gstreamer-1.0', version: '>= 1.20')
|
|
|
|
dependency('gstreamer-base-1.0', version: '>= 1.20')
|
2023-04-30 12:08:22 +00:00
|
|
|
dependency('gstreamer-pbutils-1.0', version: '>= 1.20')
|
|
|
|
dependency('gstreamer-play-1.0', version: '>= 1.20')
|
2022-11-05 14:45:06 +00:00
|
|
|
dependency('gstreamer-video-1.0', version: '>= 1.20')
|
2023-03-26 16:14:09 +00:00
|
|
|
dependency('openssl', version: '>= 1.0.1')
|
2023-04-30 12:08:22 +00:00
|
|
|
dependency('sqlite3', version: '>= 3.24.0')
|
|
|
|
dependency('libpipewire-0.3', version: '>= 0.3.0')
|
|
|
|
dependency('shumate-1.0', version: '>= 1.0.0')
|
|
|
|
dependency('xdg-desktop-portal', version: '>= 1.14.1')
|
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)
|
|
|
|
|
|
|
|
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()
|
|
|
|
|
2022-04-13 17:36:36 +00:00
|
|
|
if get_option('profile') == 'hack'
|
2023-04-29 12:25:59 +00:00
|
|
|
is_release = false
|
2022-04-13 17:36:36 +00:00
|
|
|
profile = 'Hack'
|
|
|
|
elif get_option('profile') == 'development'
|
2023-04-29 12:25:59 +00:00
|
|
|
is_release = false
|
2021-02-04 19:25:29 +00:00
|
|
|
profile = 'Devel'
|
2023-04-29 12:28:18 +00:00
|
|
|
elif get_option('profile') == 'beta'
|
|
|
|
is_release = true
|
|
|
|
profile = 'Beta'
|
2023-04-29 12:25:59 +00:00
|
|
|
else
|
|
|
|
is_release = true
|
2023-04-29 12:34:04 +00:00
|
|
|
profile = 'Stable'
|
2023-04-29 12:25:59 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
if is_release
|
|
|
|
version = base_version
|
2023-04-29 12:52:35 +00:00
|
|
|
release_date = '' # should be unused with released versions
|
2023-04-29 12:25:59 +00:00
|
|
|
application_id = base_id
|
|
|
|
else
|
2021-02-04 19:25:29 +00:00
|
|
|
vcs_tag = run_command('git', 'rev-parse', '--short', 'HEAD').stdout().strip()
|
|
|
|
if vcs_tag == ''
|
2023-05-05 10:04:25 +00:00
|
|
|
version = '@0@+@1@'.format(base_version, profile.to_lower())
|
2021-02-04 19:25:29 +00:00
|
|
|
else
|
2023-05-05 10:04:25 +00:00
|
|
|
version = '@0@+@1@'.format(base_version, vcs_tag)
|
2021-02-04 19:25:29 +00:00
|
|
|
endif
|
2023-04-29 12:52:35 +00:00
|
|
|
release_date = run_command('git', 'show', '-s', '--format=%cI').stdout().strip()
|
2021-02-25 08:07:23 +00:00
|
|
|
application_id = '@0@.@1@'.format(base_id, profile)
|
2021-02-04 19:25:29 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
meson.add_dist_script(
|
|
|
|
'build-aux/dist-vendor.sh',
|
2023-04-29 12:25:59 +00:00
|
|
|
meson.project_build_root() / 'meson-dist' / meson.project_name() + '-' + base_version,
|
2022-01-19 15:05:07 +00:00
|
|
|
meson.project_source_root()
|
2021-02-04 19:25:29 +00:00
|
|
|
)
|
|
|
|
|
2023-04-29 12:25:59 +00:00
|
|
|
if profile == 'Hack'
|
2021-02-04 19:25:29 +00:00
|
|
|
# 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,
|
|
|
|
)
|