[meson] check void* size once and better-ish xnvctrl checks

pull/131/head
jackun 4 years ago
parent cf5eb9e9a5
commit efed107af6
No known key found for this signature in database
GPG Key ID: 119DB3F1D05A9ED3

@ -215,10 +215,10 @@ util_files = files(
'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"'
endif
if cc.sizeof('void*') == 4
elif sizeof_ptr == 4
pre_args += '-DMANGOHUD_ARCH="32bit"'
endif

@ -64,12 +64,17 @@ opengl_files = files(
pre_args += '-DHOOK_DLSYM'
glimgui_glx_dep = null_dep
glimgui_egl_dep = null_dep
if get_option('with_xnvctrl').enabled()
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'
vklayer_files += files(
'loaders/loader_nvctrl.cpp',
@ -122,8 +127,6 @@ vklayer_mesa_overlay = shared_library(
dependencies : [
vulkan_wsi_deps,
libimgui_core_dep,
glimgui_glx_dep,
glimgui_egl_dep,
dbus_dep,
dep_dl,
dep_pthread,

Loading…
Cancel
Save