From 8a07a836e11821ecb898c1ddfd938721cd85f0e4 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Thu, 5 Jan 2023 12:42:43 -0500 Subject: [PATCH] cmake: Set build target to Windows 10 --- CMakeLists.txt.in | 2 +- cmake/cef_variables.cmake.in | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt.in b/CMakeLists.txt.in index f98fd5102..facd8d3fc 100644 --- a/CMakeLists.txt.in +++ b/CMakeLists.txt.in @@ -54,7 +54,7 @@ # recommended. # # - Windows requirements: -# Visual Studio 2019 or newer building on Windows 7 or newer. Windows 10 +# Visual Studio 2019 or newer building on Windows 10 or newer. Windows 10 # 64-bit is recommended. Newer versions will likely also work but may not have # been tested. # diff --git a/cmake/cef_variables.cmake.in b/cmake/cef_variables.cmake.in index 00abdd9bd..b06ea6bc9 100644 --- a/cmake/cef_variables.cmake.in +++ b/cmake/cef_variables.cmake.in @@ -443,7 +443,12 @@ if(OS_WINDOWS) list(APPEND CEF_COMPILER_DEFINES WIN32 _WIN32 _WINDOWS # Windows platform UNICODE _UNICODE # Unicode build - WINVER=0x0601 _WIN32_WINNT=0x601 # Targeting Windows 7 + # Targeting Windows 10. We can't say `=_WIN32_WINNT_WIN10` here because + # some files do `#if WINVER < 0x0600` without including windows.h before, + # and then _WIN32_WINNT_WIN10 isn't yet known to be 0x0A00. + WINVER=0x0A00 + _WIN32_WINNT=0x0A00 + NTDDI_VERSION=NTDDI_WIN10_FE NOMINMAX # Use the standard's templated min/max WIN32_LEAN_AND_MEAN # Exclude less common API declarations _HAS_EXCEPTIONS=0 # Disable exceptions