summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-03-17 12:39:06 (GMT)
committerBrad King <brad.king@kitware.com>2020-03-17 12:39:06 (GMT)
commit675eaf3bd0c045058da7bb3112474c5f2a5c25e3 (patch)
tree1d43c8f4f3c3bf94f66bb09ddbaf31195b886dcb /Modules
parentb970e25d987f34592bbcddc3ea2d541c53d89a0e (diff)
downloadCMake-675eaf3bd0c045058da7bb3112474c5f2a5c25e3.zip
CMake-675eaf3bd0c045058da7bb3112474c5f2a5c25e3.tar.gz
CMake-675eaf3bd0c045058da7bb3112474c5f2a5c25e3.tar.bz2
FindRuby: Update MSVC runtime library selection
Use the `MSVC_TOOLSET_VERSION` variable computed by CMake to get the matching Ruby library name component. Inspired-by: Julien Marrec <julien.marrec@gmail.com>
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindRuby.cmake19
1 files changed, 4 insertions, 15 deletions
diff --git a/Modules/FindRuby.cmake b/Modules/FindRuby.cmake
index 9543284..296f05b 100644
--- a/Modules/FindRuby.cmake
+++ b/Modules/FindRuby.cmake
@@ -242,21 +242,10 @@ endif()
set(_Ruby_POSSIBLE_LIB_NAMES ruby ruby-static ruby${_Ruby_VERSION_SHORT} ruby${_Ruby_VERSION_SHORT_NODOT} ruby-${_Ruby_VERSION_SHORT} ruby-${Ruby_VERSION})
if(WIN32)
- set( _Ruby_MSVC_RUNTIME "" )
- if( MSVC_VERSION EQUAL 1200 )
- set( _Ruby_MSVC_RUNTIME "60" )
- endif()
- if( MSVC_VERSION EQUAL 1300 )
- set( _Ruby_MSVC_RUNTIME "70" )
- endif()
- if( MSVC_VERSION EQUAL 1310 )
- set( _Ruby_MSVC_RUNTIME "71" )
- endif()
- if( MSVC_VERSION EQUAL 1400 )
- set( _Ruby_MSVC_RUNTIME "80" )
- endif()
- if( MSVC_VERSION EQUAL 1500 )
- set( _Ruby_MSVC_RUNTIME "90" )
+ if(MSVC_TOOLSET_VERSION)
+ set(_Ruby_MSVC_RUNTIME "${MSVC_TOOLSET_VERSION}")
+ else()
+ set(_Ruby_MSVC_RUNTIME "")
endif()
set(_Ruby_ARCH_PREFIX "")