2020-05-08 15:25:30 +03:00
|
|
|
# SPDX-FileCopyrightText: 2020 Jason Francis <jason@cycles.network>
|
|
|
|
# SPDX-License-Identifier: CC0-1.0
|
2019-07-06 05:51:52 +03:00
|
|
|
|
2020-05-09 20:37:18 +03:00
|
|
|
resources_xml = configure_file(
|
|
|
|
input: 'resources.xml.in',
|
|
|
|
output: 'resources.xml',
|
|
|
|
configuration: conf
|
|
|
|
)
|
|
|
|
|
2019-07-06 05:51:52 +03:00
|
|
|
gnome = import('gnome')
|
|
|
|
resources = gnome.compile_resources(
|
2020-05-09 20:37:18 +03:00
|
|
|
'wdisplays-resources', resources_xml,
|
2019-07-06 05:51:52 +03:00
|
|
|
source_dir : '.',
|
2020-05-08 15:45:41 +03:00
|
|
|
c_name : 'wdisplays_resources')
|
2019-07-06 05:51:52 +03:00
|
|
|
|
2019-12-10 00:32:55 +02:00
|
|
|
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, 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')
|