From 50720d2215de576ca24e6292ffca1dbf5cdf4736 Mon Sep 17 00:00:00 2001 From: jackun Date: Thu, 14 Jul 2022 15:30:26 +0300 Subject: [PATCH] Install data files only if `include_doc` option is set --- {bin => data}/MangoHud.conf | 0 data/meson.build | 6 ++++++ meson.build | 5 ++++- meson_options.txt | 2 +- src/meson.build | 8 -------- 5 files changed, 11 insertions(+), 10 deletions(-) rename {bin => data}/MangoHud.conf (100%) diff --git a/bin/MangoHud.conf b/data/MangoHud.conf similarity index 100% rename from bin/MangoHud.conf rename to data/MangoHud.conf diff --git a/data/meson.build b/data/meson.build index 6ea3ff48..a1e40e7b 100644 --- a/data/meson.build +++ b/data/meson.build @@ -38,3 +38,9 @@ if get_option('mangoapp') install_dir: man1dir, ) endif + +install_data( + files('MangoHud.conf'), + install_dir : join_paths(get_option('datadir'), 'doc', 'mangohud'), + rename : ['MangoHud.conf.example'] +) diff --git a/meson.build b/meson.build index 7a9d62c2..5b98c37f 100644 --- a/meson.build +++ b/meson.build @@ -280,4 +280,7 @@ if get_option('mangoapp') or get_option('mangoapp_layer') endif subdir('src') -subdir('data') + +if get_option('include_doc') + subdir('data') +endif diff --git a/meson_options.txt b/meson_options.txt index f07abec2..093e47af 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -6,7 +6,7 @@ option('append_libdir_mangohud', type : 'boolean', value : true, description: 'A option('ld_libdir_prefix', type : 'boolean', value : false, description: 'Set ld libdir to "$prefix/lib/mangohud/\$LIB"') option('ld_libdir_abs', type : 'boolean', value : false, description: 'Use absolute path in LD_PRELOAD') option('prepend_libdir_vk', type : 'boolean', value : true, description: 'Prepend libdir to library path in vulkan manifest') -option('include_doc', type : 'boolean', value : true, description: 'Include the example config') +option('include_doc', type : 'boolean', value : true, description: 'Include the example config, man pages, appstream files etc.') option('with_nvml', type : 'combo', value : 'enabled', choices: ['enabled', 'system', 'disabled'], description: 'Enable NVML support') option('with_xnvctrl', type : 'feature', value : 'enabled', description: 'Enable XNVCtrl support') option('with_x11', type : 'feature', value : 'enabled') diff --git a/src/meson.build b/src/meson.build index 63cfdad7..193f6e53 100644 --- a/src/meson.build +++ b/src/meson.build @@ -301,14 +301,6 @@ configure_file(input : '../bin/mangohud.in', install_dir : get_option('bindir'), ) -if get_option('include_doc') - install_data( - files('../bin/MangoHud.conf'), - install_dir : join_paths(get_option('datadir'), 'doc', 'mangohud'), - rename : ['MangoHud.conf.example'] - ) -endif - configure_file(input : 'app/layer.json.in', output : 'libMangoApp.json', configuration : {'ld_libdir_mangohud' : ld_libdir_mangohud_vk},