fractal/fractal-gtk/res/meson.build
Christopher Davis 7b1734af95 build: Build resources with meson instead of build.rs
Allows us to get rid of build.rs, which was only used to
compile resources. static_resource.rs is now created by
meson, and the meson path is used for include_bytes!.
2019-04-27 16:24:08 +00:00

58 lines
1.6 KiB
Meson

subdir('icons')
desktop_conf = configuration_data()
desktop_conf.set('icon', application_id)
desktop_file = i18n.merge_file ('desktop-file',
type: 'desktop',
input: configure_file(
input: files('org.gnome.Fractal.desktop.in.in'),
output: 'org.gnome.Fractal.desktop.in',
configuration: desktop_conf
),
output: '@0@.desktop'.format(application_id),
po_dir: podir,
install: true,
install_dir: join_paths (datadir, 'applications')
)
desktop_file_validate = find_program('desktop-file-validate', required: false)
if desktop_file_validate.found()
test(
'validate-desktop',
desktop_file_validate,
args: [
desktop_file.full_path()
]
)
endif
appdata_conf = configuration_data()
appdata_conf.set('appid', application_id)
appdata_file = i18n.merge_file ('appdata-file',
input: configure_file(
input: files('org.gnome.Fractal.appdata.xml.in.in'),
output: 'org.gnome.Fractal.appdata.xml.in',
configuration: appdata_conf
),
output: '@0@.appdata.xml'.format(application_id),
po_dir: podir,
install: true,
install_dir: join_paths (datadir, 'metainfo')
)
appstream_util = find_program('appstream-util', required: false)
if appstream_util.found()
test(
'validate-appdata', appstream_util,
args: [
'validate-relax', '--nonet', appdata_file.full_path()
]
)
endif
install_data('org.gnome.Fractal.gschema.xml', install_dir: join_paths(get_option('datadir'), 'glib-2.0', 'schemas'))
fractal_resources = gnome.compile_resources(
'resources',
'resources.xml',
gresource_bundle: true,
source_dir: meson.current_build_dir()
)