1
0
mirror of https://github.com/artizirk/wdisplays.git synced 2024-11-25 17:50:58 +02:00
wdisplays/resources/meson.build
somini f4cf935e49
Install icon to the app_id location
This is so that the desktop files picks it up correctly.

Thanks, @WhyNotHugo and @jbeich.
2023-04-02 11:57:39 +01:00

51 lines
1.3 KiB
Meson

# SPDX-FileCopyrightText: 2020 Jason Francis <jason@cycles.network>
# SPDX-License-Identifier: CC0-1.0
resources_xml = configure_file(
input: 'resources.xml.in',
output: 'resources.xml',
configuration: conf
)
gnome = import('gnome')
resources = gnome.compile_resources(
'wdisplays-resources', resources_xml,
source_dir : '.',
c_name : 'wdisplays_resources')
scour = find_program('scour', required: false)
icon = 'wdisplays.svg'
icondir = get_option('datadir') / 'icons' / 'hicolor' / 'scalable' / 'apps'
if scour.found()
custom_target('optimize-icon',
input: icon,
output: '@0@.svg'.format(meson.project_name()),
command: [scour,
'--enable-viewboxing',
'--enable-comment-stripping',
'--remove-descriptive-elements',
'--enable-id-stripping',
'--shorten-ids',
'--create-groups',
'--strip-xml-space',
'--strip-xml-prolog',
'--indent=none',
'--no-line-breaks',
'@INPUT@', '@OUTPUT@'],
install: true,
install_dir: icondir)
else
install_data(icon,
rename: '@0@.svg'.format(meson.project_name()),
install_dir: icondir
)
endif
install_data(
configure_file(input: 'wdisplays.desktop.in',
output: '@0@.desktop'.format(meson.project_name()),
configuration: conf),
install_dir: get_option('datadir') / 'applications')