diff --git a/meson.build b/meson.build index 1554c13..4b415ed 100644 --- a/meson.build +++ b/meson.build @@ -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 diff --git a/src/meson.build b/src/meson.build index f4ee3f7..a769d14 100644 --- a/src/meson.build +++ b/src/meson.build @@ -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,