Code generation messes with the actual source directory and makes it impossible to use tools like clippy without having generated the config via meson.
69 lines
No EOL
1.6 KiB
Meson
69 lines
No EOL
1.6 KiB
Meson
project(
|
|
'loupe',
|
|
'rust',
|
|
version: '47.0',
|
|
meson_version: '>= 0.59.0',
|
|
default_options: [
|
|
'warning_level=2',
|
|
],
|
|
)
|
|
|
|
i18n = import('i18n')
|
|
gnome = import('gnome')
|
|
|
|
dependency('gtk4', version: '>=4.15.3')
|
|
dependency('libadwaita-1', version: '>=1.6.alpha')
|
|
dependency('gweather4', version: '>=4.0.0')
|
|
# Required by glycin crate
|
|
dependency('lcms2', version: '>=2.12.0')
|
|
dependency('libseccomp', version: '>= 2.5.0')
|
|
|
|
# Optional dependencies
|
|
gtk4_x11 = dependency('gtk4-x11', required: get_option('x11'))
|
|
|
|
cargo = find_program('cargo', required: true)
|
|
glib_compile_schemas = find_program('glib-compile-schemas', required: true)
|
|
|
|
profile = ''
|
|
version_suffix = ''
|
|
|
|
if get_option('profile') != 'release'
|
|
profile = '.Devel'
|
|
vcs_tag = run_command('git', 'rev-parse', '--short', 'HEAD', check: false).stdout().strip()
|
|
if vcs_tag == ''
|
|
version_suffix = '-devel'
|
|
else
|
|
version_suffix = '-@0@'.format(vcs_tag)
|
|
endif
|
|
endif
|
|
|
|
prefix = get_option('prefix')
|
|
|
|
base_id = 'org.gnome.Loupe'
|
|
app_id = 'org.gnome.Loupe@0@'.format(profile)
|
|
version = meson.project_version() + version_suffix
|
|
localedir = prefix / get_option('localedir')
|
|
bindir = prefix / get_option('bindir')
|
|
datadir = prefix / get_option('datadir')
|
|
pkgdatadir = datadir / meson.project_name()
|
|
|
|
subdir('data')
|
|
subdir('help')
|
|
subdir('src')
|
|
subdir('po')
|
|
|
|
gnome.post_install(
|
|
gtk_update_icon_cache: true,
|
|
update_desktop_database: true,
|
|
glib_compile_schemas: true,
|
|
)
|
|
|
|
meson.add_dist_script(
|
|
'build-aux/meson/dist-vendor.sh',
|
|
join_paths(
|
|
meson.project_build_root(),
|
|
'meson-dist',
|
|
meson.project_name() + '-' + meson.project_version(),
|
|
),
|
|
meson.project_source_root(),
|
|
) |