Allow system NVML to be used

Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
pull/122/head
Stephan Lachnit 4 years ago
parent 40c112b80c
commit f860418e7e
No known key found for this signature in database
GPG Key ID: B35B49EA5D563EFE

@ -212,5 +212,11 @@ util_files = files(
'src/mesa/util/os_time.c',
)
if get_option('use_system_nvml')
cpp_nvml_args = '-DUSE_SYSTEM_NVML'
else
cpp_nvml_args = []
endif
subdir('modules/ImGui')
subdir('src')

@ -1,5 +1,6 @@
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('use_system_nvml', type : 'boolean', value : false, description : 'Use system nvml headers instead of the provided ones')
option('mangohud_prefix', type : 'string', value : '', description: 'Add prefix to cross-compiled library, like "lib32-".')
option('append_libdir_mangohud', type : 'boolean', value : true, description: 'Append "mangohud" to libdir path or not.')
option('include_doc', type : 'boolean', value : true, description: 'Include the example config')

@ -4,7 +4,11 @@
#ifndef LIBRARY_LOADER_NVML_H
#define LIBRARY_LOADER_NVML_H
#if USE_SYSTEM_NVML
#include <nvml.h>
#else
#include "nvml.h"
#endif
#define LIBRARY_LOADER_NVML_H_DLOPEN
#include <string>

@ -82,6 +82,7 @@ vklayer_mesa_overlay = shared_library(
cpp_args : [
pre_args,
cpp_vis_args,
cpp_nvml_args,
vulkan_wsi_args
],
dependencies : [
@ -123,4 +124,4 @@ if get_option('include_doc')
install_dir : join_paths(get_option('datadir'), 'doc', 'mangohud'),
rename : ['MangoHud.conf.example']
)
endif
endif

Loading…
Cancel
Save