diff options
author | Yuhang Zhao <2546789017@qq.com> | 2021-10-17 11:19:48 +0800 |
---|---|---|
committer | Yuhang Zhao <2546789017@qq.com> | 2021-11-10 20:31:05 +0800 |
commit | 6652bf2353d807f724f398a15cb22c188830f57c (patch) | |
tree | f3728b8e582a49ab46b2417d1f28fb2f430c2dfa /cmake/QtBaseConfigureTests.cmake | |
parent | a8be40bd64b9258334d6936b1775bc6631fd158d (diff) |
Bump WINVER, _WIN32_WINNT and _WIN32_IE to _WIN32_WINNT_WIN10 (0x0A00)
And bump NTDDI_VERSION to 0x0A00000B (NTDDI_WIN10_CO) at the same time,
to unblock the developers from accessing the latest Windows APIs.
Pick-to: 6.2
Change-Id: Ifbc28c8f8b073866871685c020301f5f20dc9591
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'cmake/QtBaseConfigureTests.cmake')
-rw-r--r-- | cmake/QtBaseConfigureTests.cmake | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/cmake/QtBaseConfigureTests.cmake b/cmake/QtBaseConfigureTests.cmake index 717ea1248e..ae16e8e53b 100644 --- a/cmake/QtBaseConfigureTests.cmake +++ b/cmake/QtBaseConfigureTests.cmake @@ -138,9 +138,34 @@ VERS_1; set(TEST_ld_version_script "${HAVE_LD_VERSION_SCRIPT}" CACHE INTERNAL "linker version script support") endfunction() +function(qt_internal_ensure_latest_win_nt_api) + if(NOT WIN32) + return() + endif() + check_cxx_source_compiles([=[ + #include <windows.h> + #if !defined(_WIN32_WINNT) && !defined(WINVER) + #error "_WIN32_WINNT and WINVER are not defined" + #endif + #if defined(_WIN32_WINNT) && (_WIN32_WINNT < 0x0A00) + #error "_WIN32_WINNT version too low" + #endif + #if defined(WINVER) && (WINVER < 0x0A00) + #error "WINVER version too low" + #endif + int main() { return 0; } + ]=] HAVE_WIN10_WIN32_WINNT) + if(NOT HAVE_WIN10_WIN32_WINNT) + list(APPEND QT_PLATFORM_DEFINITIONS _WIN32_WINNT=0x0A00 WINVER=0x0A00) + set(QT_PLATFORM_DEFINITIONS ${QT_PLATFORM_DEFINITIONS} + CACHE STRING "Qt platform specific pre-processor defines" FORCE) + endif() +endfunction() + function(qt_run_qtbase_config_tests) qt_run_config_test_architecture() qt_run_linker_version_script_support() + qt_internal_ensure_latest_win_nt_api() endfunction() # The qmake build of android does not perform the right architecture tests and |