2024-07-17 13:26:01 +02:00
|
|
|
project(
|
|
|
|
|
'loupe',
|
|
|
|
|
'rust',
|
|
|
|
|
version: '47.alpha',
|
|
|
|
|
meson_version: '>= 0.59.0',
|
|
|
|
|
default_options: [
|
|
|
|
|
'warning_level=2',
|
|
|
|
|
],
|
2020-12-26 02:05:34 -08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
i18n = import('i18n')
|
|
|
|
|
gnome = import('gnome')
|
|
|
|
|
|
2024-02-11 15:47:38 +01:00
|
|
|
dependency('gtk4', version: '>=4.13.6')
|
2024-07-17 13:26:01 +02:00
|
|
|
dependency('libadwaita-1', version: '>=1.6.alpha')
|
decoder: Use image-rs, libheif-rs, librsvg
This adds proper support for a lot of image formats including SVGs.
It will be the basis for many features to come. The technical core
is an asynchronous renderer that can arrange textures in smaller tiles
which might be generated on demand.
Closes #34, #40, #41, #49
Basis for fixing the following issues #7, #27, #36, #43, #68, #71
2023-03-04 03:14:52 +01:00
|
|
|
dependency('gweather4', version: '>=4.0.0')
|
2023-07-12 22:25:59 +02:00
|
|
|
# Required by glycin crate
|
2023-04-12 04:13:30 +02:00
|
|
|
dependency('lcms2', version: '>=2.12.0')
|
2024-02-11 15:21:25 +01:00
|
|
|
dependency('libseccomp', version: '>= 2.5.0')
|
2020-12-26 02:05:34 -08:00
|
|
|
|
2023-11-30 21:27:52 +01:00
|
|
|
# Optional dependencies
|
|
|
|
|
gtk4_x11 = dependency('gtk4-x11', required: get_option('x11'))
|
|
|
|
|
|
2022-08-05 00:13:59 -04:00
|
|
|
cargo = find_program('cargo', required: true)
|
2023-12-05 17:24:53 +01:00
|
|
|
glib_compile_schemas = find_program('glib-compile-schemas', required: true)
|
2022-08-05 00:13:59 -04:00
|
|
|
|
2020-12-26 02:05:34 -08:00
|
|
|
iv_prefix = get_option('prefix')
|
2022-08-05 00:21:23 -04:00
|
|
|
iv_bindir = iv_prefix / get_option('bindir')
|
|
|
|
|
iv_localedir = iv_prefix / get_option('localedir')
|
|
|
|
|
iv_datadir = iv_prefix / get_option('datadir')
|
|
|
|
|
iv_pkgdatadir = iv_datadir / meson.project_name()
|
2020-12-26 02:05:34 -08:00
|
|
|
|
|
|
|
|
profile = ''
|
|
|
|
|
version_suffix = ''
|
|
|
|
|
|
2023-03-01 08:42:22 -05:00
|
|
|
if get_option('profile') != 'release'
|
2020-12-26 02:05:34 -08:00
|
|
|
profile = '.Devel'
|
2022-11-07 16:19:27 +01:00
|
|
|
vcs_tag = run_command('git', 'rev-parse', '--short', 'HEAD', check: false).stdout().strip()
|
2020-12-26 02:05:34 -08:00
|
|
|
if vcs_tag == ''
|
|
|
|
|
version_suffix = '-devel'
|
|
|
|
|
else
|
|
|
|
|
version_suffix = '-@0@'.format(vcs_tag)
|
|
|
|
|
endif
|
|
|
|
|
endif
|
|
|
|
|
|
2023-12-05 17:24:53 +01:00
|
|
|
base_id = 'org.gnome.Loupe'
|
2021-09-28 17:44:26 -07:00
|
|
|
app_id = 'org.gnome.Loupe@0@'.format(profile)
|
2020-12-26 02:05:34 -08:00
|
|
|
iv_version = meson.project_version() + version_suffix
|
|
|
|
|
|
|
|
|
|
conf = configuration_data()
|
|
|
|
|
conf.set('APP_ID', app_id)
|
|
|
|
|
conf.set('PROFILE', profile)
|
|
|
|
|
conf.set('VERSION', iv_version)
|
2022-11-23 17:44:04 +01:00
|
|
|
conf.set('BIN_NAME', meson.project_name())
|
2020-12-26 02:05:34 -08:00
|
|
|
conf.set('bindir', iv_bindir)
|
|
|
|
|
conf.set('localedir', iv_localedir)
|
|
|
|
|
conf.set('pkgdatadir', iv_pkgdatadir)
|
|
|
|
|
|
|
|
|
|
subdir('data')
|
2023-06-21 09:15:37 -04:00
|
|
|
subdir('help')
|
2020-12-26 02:05:34 -08:00
|
|
|
subdir('src')
|
|
|
|
|
subdir('po')
|
|
|
|
|
|
2022-08-04 23:49:20 -04:00
|
|
|
gnome.post_install(
|
|
|
|
|
gtk_update_icon_cache: true,
|
|
|
|
|
update_desktop_database: true,
|
2023-12-05 17:24:53 +01:00
|
|
|
glib_compile_schemas: true,
|
2022-08-04 23:49:20 -04:00
|
|
|
)
|
2023-04-02 17:45:51 -04:00
|
|
|
|
|
|
|
|
meson.add_dist_script(
|
|
|
|
|
'build-aux/meson/dist-vendor.sh',
|
2024-07-17 13:26:01 +02:00
|
|
|
join_paths(
|
|
|
|
|
meson.project_build_root(),
|
|
|
|
|
'meson-dist',
|
|
|
|
|
meson.project_name() + '-' + meson.project_version(),
|
|
|
|
|
),
|
|
|
|
|
meson.project_source_root(),
|
|
|
|
|
)
|