From 71f4b875ce4e792aba8016d8550fab5d332b3e65 Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Sat, 1 Oct 2022 10:56:17 +0100 Subject: [PATCH] Only install gamemoderun if shared libgamemodeauto is built Otherwise emit a warning. --- data/meson.build | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/data/meson.build b/data/meson.build index 22e300e..8b824e1 100644 --- a/data/meson.build +++ b/data/meson.build @@ -70,12 +70,27 @@ if with_privileged_group != '' ) endif -# Install the helper run script -install_data( - files('gamemoderun'), - install_dir: path_bindir, - install_mode: 'rwxr-xr-x', -) +# Install the helper run script and man page +if get_option('default_library') == 'static' + warning('gamemoderun will not be installed as a shared libgamemodeauto library is required') +else + install_data( + files('gamemoderun'), + install_dir: path_bindir, + install_mode: 'rwxr-xr-x', + ) + + gamemoderun_manpage = configure_file( + input: files('gamemoderun.1.in'), + output: 'gamemoderun.1', + configuration: data_conf, + ) + + install_man( + gamemoderun_manpage, + install_dir: join_paths(path_mandir, 'man1') + ) +endif # Install script to find processes with gamemode lib in runtime install_data( @@ -96,17 +111,6 @@ install_man( install_dir: join_paths(path_mandir, 'man8') ) -gamemoderun_manpage = configure_file( - input: files('gamemoderun.1.in'), - output: 'gamemoderun.1', - configuration: data_conf, -) - -install_man( - gamemoderun_manpage, - install_dir: join_paths(path_mandir, 'man1') -) - gamemodelist_manpage = configure_file( input: files('gamemodelist.1.in'), output: 'gamemodelist.1',