From c0e15614eafd7ab5feeaca33699d841a7ab1ed0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 11 Jun 2024 15:46:01 +0200 Subject: [PATCH] modules: update FindGLFW for MSVC 2022 17.10+. Microsoft should fire all versioning scheme managers and then start over. Why a single product needs - a marketing version that's just a year number - a major.minor.patch marketing version because the year was too coarse to be meaningful for anything, and that version being also completely unrelated to the year for good measure - a runtime library version that used to match the major.minor marketing version a decade ago but then it somehow got out of sync - a _MSC_VER macro that was in sync with the short marketing version last time in 1989 and never again - an internal build number that feels like a countermeasure to "sorry, can't have reproducible builds so be sure to ship the artifact number 194033811, that one we tested" --- modules/FindGLFW.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/FindGLFW.cmake b/modules/FindGLFW.cmake index 1d383cc12..8cf9a54bc 100644 --- a/modules/FindGLFW.cmake +++ b/modules/FindGLFW.cmake @@ -87,7 +87,9 @@ if(CORRADE_TARGET_WINDOWS) set(_GLFW_LIBRARY_PATH_SUFFIX lib-vc2017) elseif(MSVC_VERSION VERSION_LESS 1930) set(_GLFW_LIBRARY_PATH_SUFFIX lib-vc2019) - elseif(MSVC_VERSION VERSION_LESS 1940) + # MSVC 2022 17.10 overflowed the 1930 range to 1940, so assume a + # hypothetical MSVC 2025 will start with 1950. + elseif(MSVC_VERSION VERSION_LESS 1950) set(_GLFW_LIBRARY_PATH_SUFFIX lib-vc2022) else() message(FATAL_ERROR "Unsupported MSVC version")