mirror of
https://github.com/flightlessmango/MangoHud.git
synced 2024-10-31 15:20:13 +00:00
[meson] check void* size once and better-ish xnvctrl checks
This commit is contained in:
parent
cf5eb9e9a5
commit
efed107af6
@ -215,10 +215,10 @@ util_files = files(
|
|||||||
'src/mesa/util/os_time.c',
|
'src/mesa/util/os_time.c',
|
||||||
)
|
)
|
||||||
|
|
||||||
if cc.sizeof('void*') == 8
|
sizeof_ptr = cc.sizeof('void*')
|
||||||
|
if sizeof_ptr == 8
|
||||||
pre_args += '-DMANGOHUD_ARCH="64bit"'
|
pre_args += '-DMANGOHUD_ARCH="64bit"'
|
||||||
endif
|
elif sizeof_ptr == 4
|
||||||
if cc.sizeof('void*') == 4
|
|
||||||
pre_args += '-DMANGOHUD_ARCH="32bit"'
|
pre_args += '-DMANGOHUD_ARCH="32bit"'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -64,12 +64,17 @@ opengl_files = files(
|
|||||||
|
|
||||||
pre_args += '-DHOOK_DLSYM'
|
pre_args += '-DHOOK_DLSYM'
|
||||||
|
|
||||||
glimgui_glx_dep = null_dep
|
if get_option('with_xnvctrl').enabled()
|
||||||
glimgui_egl_dep = null_dep
|
|
||||||
|
if not get_option('with_x11').enabled()
|
||||||
|
error('XNVCtrl also needs \'with_x11\'')
|
||||||
|
endif
|
||||||
|
|
||||||
|
xnvctrl_h_found = cc.has_header('NVCtrl/NVCtrl.h')
|
||||||
|
if not xnvctrl_h_found
|
||||||
|
error('NVCtrl.h was not found. Disable with \'with_xnvctrl\' if this feature is not needed.')
|
||||||
|
endif
|
||||||
|
|
||||||
if get_option('with_x11').enabled() and \
|
|
||||||
get_option('with_xnvctrl').enabled()
|
|
||||||
xnvctrl_h_dep = cc.has_header('NVCtrl/NVCtrl.h')
|
|
||||||
pre_args += '-DHAVE_XNVCTRL'
|
pre_args += '-DHAVE_XNVCTRL'
|
||||||
vklayer_files += files(
|
vklayer_files += files(
|
||||||
'loaders/loader_nvctrl.cpp',
|
'loaders/loader_nvctrl.cpp',
|
||||||
@ -122,8 +127,6 @@ vklayer_mesa_overlay = shared_library(
|
|||||||
dependencies : [
|
dependencies : [
|
||||||
vulkan_wsi_deps,
|
vulkan_wsi_deps,
|
||||||
libimgui_core_dep,
|
libimgui_core_dep,
|
||||||
glimgui_glx_dep,
|
|
||||||
glimgui_egl_dep,
|
|
||||||
dbus_dep,
|
dbus_dep,
|
||||||
dep_dl,
|
dep_dl,
|
||||||
dep_pthread,
|
dep_pthread,
|
||||||
|
Loading…
Reference in New Issue
Block a user