From b8b6d61b25134e84c249a48e8c77ac32919b907b Mon Sep 17 00:00:00 2001 From: Stephan Lachnit Date: Tue, 5 Jul 2022 12:12:23 +0200 Subject: [PATCH] Build mangoapp and mangohudctl for any CPU architecture On 32-bit-only machines, building these for the 32-bit architecture makes sense. Signed-off-by: Simon McVittie --- meson.build | 13 +++++++------ src/meson.build | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/meson.build b/meson.build index e3e5813c..60749026 100644 --- a/meson.build +++ b/meson.build @@ -238,16 +238,17 @@ imgui_options = [ sizeof_ptr = cc.sizeof('void*') if sizeof_ptr == 8 pre_args += '-DMANGOHUD_ARCH="64bit"' - if get_option('mangoapp') - imgui_options += [ - 'opengl=enabled', - 'glfw=enabled', - ] - endif elif sizeof_ptr == 4 pre_args += '-DMANGOHUD_ARCH="32bit"' endif +if get_option('mangoapp') + imgui_options += [ + 'opengl=enabled', + 'glfw=enabled', + ] +endif + dearimgui_sp = subproject('imgui', default_options: imgui_options) dearimgui_dep = dearimgui_sp.get_variable('imgui_dep') diff --git a/src/meson.build b/src/meson.build index be9c91e1..6d039ed9 100644 --- a/src/meson.build +++ b/src/meson.build @@ -215,7 +215,7 @@ if is_unixy ) endif -if get_option('mangoapp') and sizeof_ptr == 8 +if get_option('mangoapp') pre_args += '-DIMGUI_IMPL_OPENGL_LOADER_GLEW' pre_args += '-DMANGOAPP' mangoapp = executable( @@ -254,7 +254,7 @@ if get_option('mangoapp') and sizeof_ptr == 8 ) endif -if get_option('mangohudctl') and sizeof_ptr == 8 +if get_option('mangohudctl') mangoapp = executable( 'mangohudctl', files('app/control.cpp'),