From ebef68aeceb6563aa7b1ce24aafa921087a68d0d Mon Sep 17 00:00:00 2001 From: somini Date: Thu, 3 Dec 2020 00:42:53 +0000 Subject: Add a contrib-commands option This includes the commands available in contrib/. It's enabled by default. I moved the manpage and desktop file to their regular locations to avoid complicating the meson file too much. They won't be installed when you disable the contrib commands. --- meson.build | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 41a4616..15ec491 100644 --- a/meson.build +++ b/meson.build @@ -155,11 +155,13 @@ foreach ws : ['wayland', 'x11'] endif endforeach -install_data( - files('files/imv-folder'), - install_dir: get_option('bindir'), - install_mode: 'rwxr-xr-x', -) +if get_option('contrib-commands') + install_data( + files('contrib/imv-folder'), + install_dir: get_option('bindir'), + install_mode: 'rwxr-xr-x', + ) +endif if not target_single_ws install_data( @@ -169,7 +171,15 @@ if not target_single_ws ) endif -foreach desktop: ['imv', 'imv-folder'] +desktop_list = [ + 'imv', +] +if get_option('contrib-commands') + desktop_list += [ + 'imv-folder', + ] +endif +foreach desktop: desktop_list install_data( files('files/@0@.desktop'.format(desktop)), install_dir: '@0@/applications'.format(get_option('datadir')), @@ -202,12 +212,18 @@ endif prog_a2x = find_program('a2x', required: get_option('man')) if prog_a2x.found() - foreach man : [ + man_list = [ [1, 'imv'], - [1, 'imv-folder'], [1, 'imv-msg'], [5, 'imv'], ] + if get_option('contrib-commands') + man_list += [ + [1, 'imv-folder'], + ] + endif + + foreach man : man_list _section = man[0] _topic = man[1] custom_target( -- cgit v1.2.3