Merge branch 'develop'

pull/58/head
FlightlessMango 4 years ago
commit ae27b4b58e

@ -109,14 +109,14 @@ configure() {
dependencies
git submodule update --init --depth 50
if [[ ! -f "build/meson64/build.ninja" ]]; then
meson build/meson64 --libdir lib/mangohud/lib64 --prefix /usr -Dusing_build_sh=true
meson build/meson64 --libdir lib/mangohud/lib64 --prefix /usr -Dappend_libdir_mangohud=false
fi
if [[ ! -f "build/meson32/build.ninja" ]]; then
export CC="gcc -m32"
export CXX="g++ -m32"
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig:/usr/lib/i386-linux-gnu/pkgconfig:/usr/lib/pkgconfig:${PKG_CONFIG_PATH_32}"
export LLVM_CONFIG="/usr/bin/llvm-config32"
meson build/meson32 --libdir lib/mangohud/lib32 --prefix /usr -Dmangohud_prefix=lib32- -Dusing_build_sh=true
meson build/meson32 --libdir lib/mangohud/lib32 --prefix /usr -Dappend_libdir_mangohud=false
fi
}
@ -171,9 +171,10 @@ uninstall() {
rm -rfv "/usr/share/doc/mangohud"
rm -fv "/usr/share/vulkan/implicit_layer.d/mangohud.json"
rm -fv "/usr/share/vulkan/implicit_layer.d/MangoHud.json"
rm -fv "/etc/ld.so.conf.d/libmangohud.conf"
rm -fv "/etc/ld.so.conf.d/lib32-libmangohud.conf"
rm -fv "/usr/share/vulkan/implicit_layer.d/MangoHud.x86.json"
rm -fv "/usr/share/vulkan/implicit_layer.d/MangoHud.x86_64.json"
rm -fv "/usr/bin/mangohud"
rm -fv "/usr/bin/mangohud.x86"
}
for a in $@; do

@ -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,25 @@ vklayer_mesa_overlay = shared_library(
install : true
)
if get_option('using_build_sh')
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'),
)
else
configure_file(input : 'mangohud.json.in',
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()},
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'),
)
)
if target_machine.cpu_family() == 'x86_64'
mangohud_cpu_family = ''
else
mangohud_cpu_family = '.@0@'.format(target_machine.cpu_family())
endif
install_data(
files('../bin/run-mangohud-gl-pkg.sh'),
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