mirror of
https://github.com/flightlessmango/MangoHud.git
synced 2024-10-31 15:20:13 +00:00
Add x11/wayland feature switches, rename 'use_xnvctrl' to 'with_xnvctrl'
This commit is contained in:
parent
59113b3ae2
commit
0373383581
15
meson.build
15
meson.build
@ -92,20 +92,23 @@ endforeach
|
||||
vulkan_wsi_args = []
|
||||
vulkan_wsi_deps = []
|
||||
|
||||
with_platform_x11 = true
|
||||
with_platform_wayland = false
|
||||
dep_x11 = dependency('x11', required: get_option('with_x11'))
|
||||
dep_wayland_client = dependency('wayland-client',
|
||||
required: get_option('with_wayland'), version : '>=1.11')
|
||||
|
||||
if with_platform_x11
|
||||
dep_x11 = dependency('x11')
|
||||
if dep_x11.found()
|
||||
vulkan_wsi_args += ['-DVK_USE_PLATFORM_XLIB_KHR']
|
||||
vulkan_wsi_deps += dep_x11
|
||||
endif
|
||||
if with_platform_wayland
|
||||
dep_wayland_client = dependency('wayland-client', version : '>=1.11')
|
||||
if dep_wayland_client.found()
|
||||
vulkan_wsi_args += ['-DVK_USE_PLATFORM_WAYLAND_KHR']
|
||||
vulkan_wsi_deps += dep_wayland_client
|
||||
endif
|
||||
|
||||
if not dep_x11.found() and not dep_wayland_client.found()
|
||||
error('At least one of "with_x11" and "with_wayland" should be enabled')
|
||||
endif
|
||||
|
||||
inc_common = [
|
||||
include_directories('include'),
|
||||
]
|
||||
|
@ -3,4 +3,6 @@ option('use_system_vulkan', type : 'feature', value : 'disabled', description: '
|
||||
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')
|
||||
option('use_xnvctrl', type : 'feature', value : 'enabled', description: 'Enable XNVCtrl support')
|
||||
option('with_xnvctrl', type : 'feature', value : 'enabled', description: 'Enable XNVCtrl support')
|
||||
option('with_x11', type : 'feature', value : 'enabled')
|
||||
option('with_wayland', type : 'feature', value : 'disabled')
|
||||
|
@ -63,7 +63,7 @@ opengl_files = files(
|
||||
'gl/gl3w/GL/gl3w.c',
|
||||
)
|
||||
|
||||
if get_option('use_xnvctrl').enabled()
|
||||
if get_option('with_xnvctrl').enabled()
|
||||
pre_args += '-DHAVE_XNVCTRL'
|
||||
vklayer_files += files(
|
||||
'loaders/loader_nvctrl.cpp',
|
||||
|
Loading…
Reference in New Issue
Block a user