meson: error on MSVCRT builds

MSVCRT requires wide string APIs, which were removed. Instead of dealing
with this, just error out on it. MSVCRT is deprecated anyway.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
main
Rosen Penev 2 years ago
parent 8588024a66
commit e61e3d5a8b

@ -17,12 +17,10 @@ else
endif
if host_machine.system() == 'windows'
if cpp.get_argument_syntax() == 'gcc'
if cpp.compiles('#include <time.h>\n#ifdef _UCRT\n#error\n#endif')
add_project_arguments('-D__USE_MINGW_ANSI_STDIO', '-D__MINGW_USE_VC2005_COMPAT', language: 'cpp')
endif
else
if cpp.get_argument_syntax() == 'msvc'
add_project_arguments('-DNOMINMAX', language: 'cpp')
elif cpp.compiles('#include <time.h>\n#ifdef _UCRT\n#error\n#endif')
error('Non UCRT MinGW is unsupported. Please update toolchain')
endif
endif

Loading…
Cancel
Save