Update build scripts, again

Install to $prefix$libdir/mangohud by default.
pull/58/head
jackun 4 years ago
parent f73ea2e3ce
commit ad64bf345d
No known key found for this signature in database
GPG Key ID: 119DB3F1D05A9ED3

@ -30,12 +30,6 @@ cpp = meson.get_compiler('cpp')
prog_python = import('python').find_installation('python3')
null_dep = dependency('', required : false)
# Needs prefix for configure_file()
libdir_mangohud = join_paths(get_option('prefix'), get_option('libdir'), 'mangohud')
if get_option('using_build_sh')
libdir_mangohud = join_paths(get_option('prefix'), get_option('libdir'))
endif
pre_args = [
'-D__STDC_CONSTANT_MACROS',
'-D__STDC_FORMAT_MACROS',
@ -212,13 +206,6 @@ vk_enum_to_str = custom_target(
'--outdir', meson.current_build_dir()
],
)
if get_option('using_build_sh')
configure_file(input : 'libmangohud.conf.in',
output : get_option('mangohud_prefix') + 'libmangohud.conf',
configuration : { 'libdir_mangohud' : libdir_mangohud },
install_dir : join_paths(get_option('sysconfdir'), 'ld.so.conf.d'),
)
endif
util_files = files(
'src/mesa/util/os_socket.c',

@ -1,4 +1,4 @@
option('glibcxx_asserts', type : 'boolean', value : false)
option('use_system_vulkan', type : 'feature', value : 'disabled', description: 'Use system vulkan headers instead of the provided ones')
option('mangohud_prefix', type : 'string', value : '', description: 'Add prefix to cross-compiled library, like "lib32-".')
option('using_build_sh', type : 'boolean', value : false, description: 'Add "mangohud" suffix to libdir or not.')
option('append_libdir_mangohud', type : 'boolean', value : true, description: 'Append "mangohud" to libdir path or not.')

@ -20,6 +20,13 @@
glslang = find_program('glslangValidator')
# Needs prefix for configure_file()
if get_option('append_libdir_mangohud')
libdir_mangohud = join_paths(get_option('prefix'), get_option('libdir'), 'mangohud')
else
libdir_mangohud = join_paths(get_option('prefix'), get_option('libdir'))
endif
overlay_shaders = [
'overlay.frag',
'overlay.vert',
@ -87,31 +94,36 @@ vklayer_mesa_overlay = shared_library(
install : true
)
if get_option('using_build_sh')
if get_option('append_libdir_mangohud')
configure_file(input : 'mangohud.json.in',
output : '@0@.json'.format(meson.project_name()),
configuration : {'PROJECT_NAME' : meson.project_name(),
'libdir_mangohud' : '',
'LAYER_SUFFIX' : ''},
install : true,
install_dir : join_paths(get_option('datadir'), 'vulkan', 'implicit_layer.d'),
output : '@0@.@1@.json'.format(meson.project_name(), target_machine.cpu_family()),
configuration : {'libdir_mangohud' : libdir_mangohud + '/',
'PROJECT_NAME' : meson.project_name() + ' ',
'LAYER_SUFFIX' : target_machine.cpu_family()},
install : true,
install_dir : join_paths(get_option('datadir'), 'vulkan', 'implicit_layer.d'),
)
else
configure_file(input : 'mangohud.json.in',
output : '@0@.@1@.json'.format(meson.project_name(), target_machine.cpu_family()),
configuration : {'libdir_mangohud' : join_paths(get_option('prefix'), get_option('libdir'), 'mangohud') + '/',
'PROJECT_NAME' : meson.project_name() + ' ',
'LAYER_SUFFIX' : target_machine.cpu_family()},
install : true,
install_dir : join_paths(get_option('datadir'), 'vulkan', 'implicit_layer.d'),
output : '@0@.json'.format(meson.project_name()),
configuration : {'PROJECT_NAME' : meson.project_name(),
'libdir_mangohud' : '',
'LAYER_SUFFIX' : ''},
install : true,
install_dir : join_paths(get_option('datadir'), 'vulkan', 'implicit_layer.d'),
)
endif
install_data(
files('../bin/run-mangohud-gl-pkg.sh'),
if target_machine.cpu_family() == 'x86_64'
mangohud_cpu_family = ''
else
mangohud_cpu_family = '.@0@'.format(target_machine.cpu_family())
endif
configure_file(input : '../bin/mangohud.in',
output : 'mangohud@0@'.format(mangohud_cpu_family),
configuration : {'libdir_mangohud' : libdir_mangohud},
install_dir : get_option('bindir'),
install_mode: 'rwxr-xr-x',
rename : ['mangohud']
)
install_data(

Loading…
Cancel
Save