Mangoapp: meson option

mangoapp
FlightlessMango 2 years ago
parent fb619147e4
commit cd215854ce

@ -223,11 +223,7 @@ util_files = files(
sizeof_ptr = cc.sizeof('void*')
if sizeof_ptr == 8
pre_args += '-DMANGOHUD_ARCH="64bit"'
elif sizeof_ptr == 4
pre_args += '-DMANGOHUD_ARCH="32bit"'
endif
dearimgui_sp = subproject('imgui', default_options: [
dearimgui_sp = subproject('imgui', default_options: [
'default_library=static',
# use 'auto_features=disabled' once available: https://github.com/mesonbuild/meson/issues/5320
'dx9=disabled',
@ -244,6 +240,27 @@ dearimgui_sp = subproject('imgui', default_options: [
'marmalade=disabled',
'allegro5=disabled',
])
elif sizeof_ptr == 4
pre_args += '-DMANGOHUD_ARCH="32bit"'
dearimgui_sp = subproject('imgui', default_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_dep = dearimgui_sp.get_variable('imgui_dep')
spdlog_dep = cpp.find_library('spdlog', required: get_option('use_system_spdlog'))

@ -15,3 +15,4 @@ option('with_dbus', type : 'feature', value : 'enabled')
option('with_dlsym', type : 'feature', value : 'disabled')
option('with_libdrm_amdgpu', type : 'feature', value : 'enabled', description: 'Get amdgpu sensor info through libdrm_amdgpu')
option('loglevel', type: 'combo', choices : ['trace', 'debug', 'info', 'warn', 'err', 'critical', 'off'], value : 'info', description: 'Max log level in non-debug build')
option('mangoapp', type: 'boolean', value : 'false')

@ -161,7 +161,7 @@ if is_unixy
endif
endif
link_args = cc.get_supported_link_arguments(['-Wl,-Bsymbolic-functions', '-Wl,-z,relro', '-Wl,--exclude-libs,ALL', '-lglfw', '-lGL'])
link_args = cc.get_supported_link_arguments(['-Wl,-Bsymbolic-functions', '-Wl,-z,relro', '-Wl,--exclude-libs,ALL', '-lGL'])
# meson fails to check version-script so just force add
link_args += '-Wl,--version-script,@0@'.format(join_paths(meson.current_source_dir(), 'mangohud.version'))
@ -224,7 +224,7 @@ if is_unixy
)
endif
if sizeof_ptr == 8
if get_option('mangoapp') and sizeof_ptr == 8
pre_args += '-DIMGUI_IMPL_OPENGL_LOADER_GLEW'
overlay_files = files(
'overlay.cpp',

Loading…
Cancel
Save