build(windows): specify Windows 8 as the minimum version (#22173)

This will allow MSVC to use newer features not available in Vista and
Windows 7.
This commit is contained in:
dundargoc 2023-02-08 17:37:15 +01:00 committed by GitHub
parent 0fc9a232e0
commit f4c836ad70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -135,8 +135,7 @@ if(MINGW)
target_compile_definitions(main_lib INTERFACE __USE_MINGW_ANSI_STDIO)
endif()
if(WIN32)
# Windows Vista is the minimum supported version
target_compile_definitions(main_lib INTERFACE _WIN32_WINNT=0x0600 MSWIN)
target_compile_definitions(main_lib INTERFACE _WIN32_WINNT=0x0602 MSWIN)
endif()
# OpenBSD's GCC (4.2.1) doesn't have -Wvla