summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2023-11-27 15:51:38 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-12-11 14:54:50 +0000
commit5f7e2217590637392142aa3a592c19bdc897ebbe (patch)
treeb119cdbbce0f91601835020015f4434cfab37eec
parent82676b4262e2d43dfb39dd096bb48f229b1f4204 (diff)
Fix required msvc versions
In 3d4ac6d06 we added back msvc2019 support, however required version are not correct. For 2019 we should require version at least 19.29, however for 2022 19.36. Pick-to: 6.6 Change-Id: Ia15f2d68c109ff507f32b49c24c333a4a3e2c6ef Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 9aeda15eba80ea424519fe7868a668953ae4e152) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--configure.cmake37
1 files changed, 15 insertions, 22 deletions
diff --git a/configure.cmake b/configure.cmake
index f23c08a7b..9841693df 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -198,18 +198,6 @@ int main(void) {
}"
)
-qt_config_compile_test(winversion
- LABEL "winversion"
- CODE
-"
-#if !defined(__clang__) && _MSC_VER < 1922
-#error unsupported Visual Studio version
-#endif
-int main(void){
- return 0;
-}"
-)
-
qt_config_compile_test(libavformat
LABEL "libavformat"
LIBRARIES
@@ -609,11 +597,21 @@ add_check_for_support(
)
if(WIN32)
if(MSVC)
- add_check_for_support(
- MODULES QtWebEngine QtPdf
- CONDITION NOT MSVC_VERSION LESS 1922
- MESSAGE "VS compiler version must be at least 14.22"
- )
+ if(MSVC_TOOLSET_VERSION EQUAL 142) # VS 2019 (16.0)
+ add_check_for_support(
+ MODULES QtWebEngine QtPdf
+ CONDITION NOT MSVC_VERSION LESS 1929
+ MESSAGE "VS compiler version must be at least 14.29"
+ )
+ elseif(MSVC_TOOLSET_VERSION EQUAL 143) # VS 2022 (17.0)
+ add_check_for_support(
+ MODULES QtWebEngine QtPdf
+ CONDITION NOT MSVC_VERSION LESS 1936
+ MESSAGE "VS compiler version must be at least 14.36"
+ )
+ else()
+ message(FATAL_ERROR "Build requires Visual Studio 2019 or higher.")
+ endif()
endif()
set(windowsSdkVersion $ENV{WindowsSDKVersion})
string(REGEX REPLACE "([0-9.]+).*" "\\1" windowsSdkVersion "${windowsSdkVersion}")
@@ -625,11 +623,6 @@ if(WIN32)
MESSAGE "Build requires Windows 11 SDK at least version 10.0.22621.0"
)
endif()
-add_check_for_support(
- MODULES QtWebEngine QtPdf
- CONDITION NOT MSVC OR TEST_winversion
- MESSAGE "Build requires Visual Studio 2019 or higher."
-)
#### Summary