Merge pull request #122 from stephanlachnit/patch/nvml-dfsg

Make used NVML optional
pull/129/head
jackun 4 years ago committed by GitHub
commit 27cf8230d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

11
.gitignore vendored

@ -1,11 +1,12 @@
build/
builddir/
__pycache__/
.vscode/
build
builddir
__pycache__
.vscode
MangoHud*.tar.gz
pkg/*
pkg
mangohud*.tar.*
lib32-mangohud*.tar.*
v*.tar.gz
# Prerequisites
*.d

@ -0,0 +1,8 @@
#!/bin/sh
VERSION=$(git describe --long --tags --always | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//')
EXCLUDE_PATTERN="--exclude-vcs --exclude-vcs-ignores"
tar -cf v$VERSION.tar.gz $EXCLUDE_PATTERN .
tar -cf v$VERSION-DFSG.tar.gz $EXCLUDE_PATTERN --exclude=include/nvml.h .

@ -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