diff options
author | somini <dev@somini.xyz> | 2020-12-03 00:42:53 +0000 |
---|---|---|
committer | Harry Jeffery <harry@exec64.co.uk> | 2021-07-08 23:30:24 +0100 |
commit | ebef68aeceb6563aa7b1ce24aafa921087a68d0d (patch) | |
tree | 64cf8cd55b20b6daaa1a64499e836091026689c9 /meson.build | |
parent | 9557a4b1129d1578cafc3edffc4e72fa007a8e2f (diff) | |
download | imv-ebef68aeceb6563aa7b1ce24aafa921087a68d0d.tar.gz |
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.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 32 |
1 files changed, 24 insertions, 8 deletions
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( |