diff options
author | Michael Smith <michael.smith@puppetlabs.com> | 2015-02-06 20:21:51 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-02-10 14:54:21 (GMT) |
commit | e5ef9271a1bb1a0779132beba4cf2b0bae13d6cc (patch) | |
tree | b67cf20bb23d72605ded8e9074b139e84f170fec /Modules/FindRuby.cmake | |
parent | d46e1e3f0fa386638b5a50b45783f4ec4d94bf2c (diff) | |
download | CMake-e5ef9271a1bb1a0779132beba4cf2b0bae13d6cc.zip CMake-e5ef9271a1bb1a0779132beba4cf2b0bae13d6cc.tar.gz CMake-e5ef9271a1bb1a0779132beba4cf2b0bae13d6cc.tar.bz2 |
FindRuby: Fix finding 64-bit Ruby on Windows
Ruby 2.0.0 and 2.1.5 have 64-bit binaries for Windows, with "x64-"
prefix.
Diffstat (limited to 'Modules/FindRuby.cmake')
-rw-r--r-- | Modules/FindRuby.cmake | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Modules/FindRuby.cmake b/Modules/FindRuby.cmake index 4be16c9..e5ea210 100644 --- a/Modules/FindRuby.cmake +++ b/Modules/FindRuby.cmake @@ -234,11 +234,16 @@ if(WIN32) set( _RUBY_MSVC_RUNTIME "90" ) endif() + set(_RUBY_ARCH_PREFIX "") + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(_RUBY_ARCH_PREFIX "x64-") + endif() + list(APPEND _RUBY_POSSIBLE_LIB_NAMES - "msvcr${_RUBY_MSVC_RUNTIME}-ruby${_RUBY_NODOT_VERSION}" - "msvcr${_RUBY_MSVC_RUNTIME}-ruby${_RUBY_NODOT_VERSION}-static" - "msvcrt-ruby${_RUBY_NODOT_VERSION}" - "msvcrt-ruby${_RUBY_NODOT_VERSION}-static" ) + "${_RUBY_ARCH_PREFIX}msvcr${_RUBY_MSVC_RUNTIME}-ruby${_RUBY_NODOT_VERSION}" + "${_RUBY_ARCH_PREFIX}msvcr${_RUBY_MSVC_RUNTIME}-ruby${_RUBY_NODOT_VERSION}-static" + "${_RUBY_ARCH_PREFIX}msvcrt-ruby${_RUBY_NODOT_VERSION}" + "${_RUBY_ARCH_PREFIX}msvcrt-ruby${_RUBY_NODOT_VERSION}-static" ) endif() find_library(RUBY_LIBRARY NAMES ${_RUBY_POSSIBLE_LIB_NAMES} HINTS ${RUBY_POSSIBLE_LIB_DIR} ) |