Add option to prepend libdir to library's path in vulkan manifest

"\$LIB" technically breaks json but on the other hand vulkan loader
currently doesn't handle "\\$LIB"
Help with issue #468
pull/517/head
jackun 3 years ago
parent 765024227c
commit 47865573a8
No known key found for this signature in database
GPG Key ID: 119DB3F1D05A9ED3

@ -3,6 +3,7 @@ option('use_system_vulkan', type : 'feature', value : 'disabled', description: '
option('append_libdir_mangohud', type : 'boolean', value : true, description: 'Append "mangohud" to libdir path or not.')
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('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')

@ -25,6 +25,11 @@ else
conf_data.set('ld_libdir_mangohud', ld_libdir_mangohud)
endif
ld_libdir_mangohud_vk = ''
if get_option('prepend_libdir_vk')
ld_libdir_mangohud_vk = ld_libdir_mangohud
endif
overlay_shaders = [
'overlay.frag',
'overlay.vert',
@ -207,7 +212,7 @@ endif
configure_file(input : 'mangohud.json.in',
output : '@0@.json'.format(meson.project_name()),
configuration : {'ld_libdir_mangohud' : ld_libdir_mangohud,
configuration : {'ld_libdir_mangohud' : ld_libdir_mangohud_vk,
'PROJECT_NAME' : meson.project_name().to_upper()},
install : true,
install_dir : join_paths(get_option('datadir'), 'vulkan', 'implicit_layer.d'),

Loading…
Cancel
Save