build: only install some files when option is enabled

Fixes #16
This commit is contained in:
Christian Hergert
2019-10-15 14:49:57 -07:00
parent b7e2601a93
commit 189505be64
2 changed files with 36 additions and 27 deletions

View File

@ -1,33 +1,35 @@
install_data('sysprof-mime.xml',
install_dir: join_paths(datadir, 'mime/packages')
)
if get_option('enable_gtk') and get_option('libsysprof')
install_data('org.gnome.sysprof3.gschema.xml',
install_dir: join_paths(datadir, 'glib-2.0/schemas')
)
install_data('sysprof-mime.xml',
install_dir: join_paths(datadir, 'mime/packages')
)
i18n.merge_file(
input: 'org.gnome.Sysprof3.appdata.xml.in',
output: 'org.gnome.Sysprof3.appdata.xml',
po_dir: podir,
install: true,
install_dir: join_paths(datadir, 'metainfo')
)
install_data('org.gnome.sysprof3.gschema.xml',
install_dir: join_paths(datadir, 'glib-2.0/schemas')
)
i18n.merge_file(
input: 'org.gnome.Sysprof3.desktop.in',
output: 'org.gnome.Sysprof3.desktop',
type: 'desktop',
po_dir: podir,
install: true,
install_dir: join_paths(datadir, 'applications')
)
i18n.merge_file(
input: 'org.gnome.Sysprof3.appdata.xml.in',
output: 'org.gnome.Sysprof3.appdata.xml',
po_dir: podir,
install: true,
install_dir: join_paths(datadir, 'metainfo')
)
i18n.merge_file(
input: 'org.gnome.Sysprof3.desktop.in',
output: 'org.gnome.Sysprof3.desktop',
type: 'desktop',
po_dir: podir,
install: true,
install_dir: join_paths(datadir, 'applications')
)
if get_option('enable_gtk')
icon_sizes = ['scalable', 'symbolic']
foreach size: icon_sizes
install_subdir('icons/' + size,
install_dir: join_paths(datadir, 'icons/hicolor')
)
endforeach
endif