It appears FindRuby fails to find 64-bit Ruby on Windows. Debug output is

-- --------FindRuby.cmake debug------------
-- _RUBY_POSSIBLE_EXECUTABLE_NAMES:
ruby1.9;ruby19;ruby;ruby2.1;ruby21;ruby2.0;ruby20;ruby1.8;ruby18
-- _RUBY_POSSIBLE_LIB_NAMES:
ruby;ruby-static;ruby2.1;ruby21;ruby-2.1;ruby-2.1.0;msvcr-ruby210;msvcr-ruby210-static;msvcrt-ruby210;msvcrt-ruby210-static
-- RUBY_ARCH_DIR: C:/tools/ruby215/lib/ruby/2.1.0/x64-mingw32
-- RUBY_HDR_DIR: C:/tools/ruby215/include/ruby-2.1.0
-- RUBY_POSSIBLE_LIB_DIR: C:/tools/ruby215/lib
-- Found RUBY_VERSION: "2.1.0" , short: "2.1", nodot: "21"
-- _RUBY_REQUIRED_VARS:
RUBY_EXECUTABLE;RUBY_INCLUDE_DIR;RUBY_LIBRARY;RUBY_CONFIG_INCLUDE_DIR
-- RUBY_EXECUTABLE: C:/tools/ruby215/bin/ruby.exe
-- RUBY_LIBRARY: RUBY_LIBRARY-NOTFOUND
-- RUBY_INCLUDE_DIR: C:/tools/ruby215/include/ruby-2.1.0
-- RUBY_CONFIG_INCLUDE_DIR: C:/tools/ruby215/include/ruby-2.1.0/x64-mingw32
-- --------------------
-- Could NOT find Ruby (missing:  RUBY_LIBRARY) (found suitable version
"2.1.0", minimum required is "1.9")

The 64-bit ruby library names are:
* lib/libx64-mscvrt-ruby210-static.a
* lib/libx64-mscvrt-ruby210.dll.a
* bin/x64-mscvrt-ruby210.dll

I've attached a patch that adds "x64-" prefixed lookup, that addresses the
issue in my environment. The new debug output is
-- --------FindRuby.cmake debug------------
-- _RUBY_POSSIBLE_EXECUTABLE_NAMES:
ruby1.9;ruby19;ruby;ruby2.1;ruby21;ruby2.0;ruby20;ruby1.8;ruby18
-- _RUBY_POSSIBLE_LIB_NAMES:
ruby;ruby-static;ruby2.1;ruby21;ruby-2.1;ruby-2.1.0;msvcr-ruby210;msvcr-ruby210-static;msvcrt-ruby210;msvcrt-ruby210-static;x64-msvcr-ruby210;x64-msvcr-ruby210-static;x64-msvcrt-ruby210;x64-msvcrt-ruby210-static
-- RUBY_ARCH_DIR: C:/tools/ruby215/lib/ruby/2.1.0/x64-mingw32
-- RUBY_HDR_DIR: C:/tools/ruby215/include/ruby-2.1.0
-- RUBY_POSSIBLE_LIB_DIR: C:/tools/ruby215/lib
-- Found RUBY_VERSION: "2.1.0" , short: "2.1", nodot: "21"
-- _RUBY_REQUIRED_VARS:
RUBY_EXECUTABLE;RUBY_INCLUDE_DIR;RUBY_LIBRARY;RUBY_CONFIG_INCLUDE_DIR
-- RUBY_EXECUTABLE: C:/tools/ruby215/bin/ruby.exe
-- RUBY_LIBRARY: C:/tools/ruby215/lib/libx64-msvcrt-ruby210.dll.a
-- RUBY_INCLUDE_DIR: C:/tools/ruby215/include/ruby-2.1.0
-- RUBY_CONFIG_INCLUDE_DIR: C:/tools/ruby215/include/ruby-2.1.0/x64-mingw32
-- --------------------
-- Found Ruby: C:/tools/ruby215/bin/ruby.exe (found suitable version
"2.1.0", minimum required is "1.9")

Attachment: 0001-Fix-finding-64-bit-Ruby-with-FindRuby-on-Windows.patch
Description: Binary data

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to