From 4d76ad516117e60ad2ab2437763779023dd49dc7 Mon Sep 17 00:00:00 2001 From: FlightlessMango Date: Mon, 18 Oct 2021 19:19:59 +0200 Subject: [PATCH] Fix some uglyness in meson build --- meson.build | 68 +++++++++++++++-------------------------------------- 1 file changed, 19 insertions(+), 49 deletions(-) diff --git a/meson.build b/meson.build index 60a1b65..e5cf395 100644 --- a/meson.build +++ b/meson.build @@ -220,65 +220,35 @@ util_files = files( 'src/mesa/util/os_time.c', ) +imgui_options = [ + 'default_library=static', + # use 'auto_features=disabled' once available: https://github.com/mesonbuild/meson/issues/5320 + 'dx9=disabled', + 'dx10=disabled', + 'dx11=disabled', + 'dx12=disabled', + 'metal=disabled', + 'opengl=disabled', + 'vulkan=disabled', + 'glfw=disabled', + 'sdl2=disabled', + 'osx=disabled', + 'win=disabled', + 'marmalade=disabled', + 'allegro5=disabled', +] + sizeof_ptr = cc.sizeof('void*') if sizeof_ptr == 8 pre_args += '-DMANGOHUD_ARCH="64bit"' if get_option('mangoapp') - imgui_options = [ - 'default_library=static', - # use 'auto_features=disabled' once available: https://github.com/mesonbuild/meson/issues/5320 - 'dx9=disabled', - 'dx10=disabled', - 'dx11=disabled', - 'dx12=disabled', - 'metal=disabled', + imgui_options += [ 'opengl=enabled', - 'vulkan=disabled', 'glfw=enabled', - 'sdl2=disabled', - 'osx=disabled', - 'win=disabled', - 'marmalade=disabled', - 'allegro5=disabled', - ] - else - imgui_options = [ - 'default_library=static', - # use 'auto_features=disabled' once available: https://github.com/mesonbuild/meson/issues/5320 - 'dx9=disabled', - 'dx10=disabled', - 'dx11=disabled', - 'dx12=disabled', - 'metal=disabled', - 'opengl=disabled', - 'vulkan=disabled', - 'glfw=disabled', - 'sdl2=disabled', - 'osx=disabled', - 'win=disabled', - 'marmalade=disabled', - 'allegro5=disabled', ] endif elif sizeof_ptr == 4 pre_args += '-DMANGOHUD_ARCH="32bit"' - imgui_options = [ - 'default_library=static', - # use 'auto_features=disabled' once available: https://github.com/mesonbuild/meson/issues/5320 - 'dx9=disabled', - 'dx10=disabled', - 'dx11=disabled', - 'dx12=disabled', - 'metal=disabled', - 'opengl=disabled', - 'vulkan=disabled', - 'glfw=disabled', - 'sdl2=disabled', - 'osx=disabled', - 'win=disabled', - 'marmalade=disabled', - 'allegro5=disabled', - ] endif dearimgui_sp = subproject('imgui', default_options: imgui_options)