From c972050ff5fb6555315c263b399dac183f4dfb2b Mon Sep 17 00:00:00 2001 From: cfis Date: Sun, 11 May 2025 19:38:57 -0700 Subject: [PATCH] FindRuby: Improve logic populating MSVC runtime alternatives Ruby (mswin) links to vcruntime140, but future proof by using MSVC toolset version. --- Modules/FindRuby.cmake | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Modules/FindRuby.cmake b/Modules/FindRuby.cmake index 8c567c4de8..18b9e35855 100644 --- a/Modules/FindRuby.cmake +++ b/Modules/FindRuby.cmake @@ -398,13 +398,7 @@ set(_Ruby_POSSIBLE_LIB_NAMES ) if (WIN32) - set(_Ruby_POSSIBLE_RUNTIMES "ucrt;msvcrt;vcruntime140;vcruntime140_1") - if (MSVC_TOOLSET_VERSION) - list(APPEND _Ruby_POSSIBLE_RUNTIMES "msvcr${MSVC_TOOLSET_VERSION}") - else () - list(APPEND _Ruby_POSSIBLE_RUNTIMES "msvcr") - endif () - + set(_Ruby_POSSIBLE_RUNTIMES "ucrt;msvcrt;vcruntime140;vcruntime140_1;vcruntime${MSVC_TOOLSET_VERSION}") set(_Ruby_POSSIBLE_VERSION_SUFFIXES "${_Ruby_VERSION_NODOT};${_Ruby_VERSION_NODOT_ZERO_PATCH}") if (CMAKE_SIZEOF_VOID_P EQUAL 8)