Loupe/data/meson.build
Sophie Herold 4eae4503bf data: Generate list of mime types in meson
First, this format is more easy to maintain.
Second, future image decoder dependencies will be
opt-out via build options. This way we can also not
add the mime types in that case.

Closes #125

Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/181>
2023-04-19 01:17:24 +00:00

90 lines
1.7 KiB
Meson

mime_types = []
# image-rs
mime_types += [
'image/jpeg',
'image/png',
'image/gif',
'image/webp',
'image/tiff',
# TGA
'image/x-tga',
# DDS
'image/vnd-ms.dds',
'image/x-dds',
'image/bmp',
# .ico
'image/vnd.microsoft.icon',
# HDR
'image/vnd.radiance',
# OpenEXR
'image/x-exr',
# PNM
'image/x-portable-bitmap',
'image/x-portable-graymap',
'image/x-portable-pixmap',
'image/x-portable-anymap',
# Qoi's MIME type is being worked on.
# See: https://github.com/phoboslab/qoi/issues/167
'image/x-qoi',
]
# SVG
mime_types += [
'image/svg+xml',
'image/svg+xml-compressed',
]
# HEIF
mime_types += [
'image/avif',
'image/heic',
]
conf.set('MIME_TYPES', ';'.join(mime_types) + ';')
desktop_file = i18n.merge_file(
input: configure_file(
input: 'org.gnome.Loupe.desktop.in.in',
output: 'org.gnome.Loupe.desktop.in',
configuration: conf,
),
output: '@0@.desktop'.format(app_id),
type: 'desktop',
po_dir: '../po',
install: true,
install_dir: iv_datadir / 'applications'
)
configure_file(
input: 'org.gnome.Loupe.service.in',
output: '@0@.service'.format(app_id),
configuration: conf,
install: true,
install_dir: iv_datadir / 'dbus-1' / 'services'
)
desktop_utils = find_program('desktop-file-validate', required: false)
if desktop_utils.found()
test('Validate desktop file', desktop_utils,
args: [desktop_file]
)
endif
appstream_file = i18n.merge_file(
input: configure_file(
input: 'org.gnome.Loupe.metainfo.xml.in.in',
output: 'org.gnome.Loupe.metainfo.xml.in',
configuration: conf,
),
output: '@0@.metainfo.xml'.format(app_id),
po_dir: '../po',
install: true,
install_dir: iv_datadir / 'metainfo'
)
subdir('icons')
# Post install
gnome.post_install()