Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RUBY_LIBRARY cmake variable when building Qpid

Tags:

ruby

cmake

qpid

Im trying to build Qpid. When running CMake this is printed to the log:

Could NOT find Ruby  (missing:  RUBY_LIBRARY)

[ ... more stuff cut for brevity ]

CMake Error at src/CMakeLists.txt:96 (include):
  include could not find load file:

    C:/qpid/0.6/qpid/build/src/rubygen.cmake

It seems to be failing because it couldnt find a file thats supposed to have been generated. But it hasn't since it couldn't locate Ruby.

But it seems to at least partially find Ruby since a bunch of other RUBY_* variables have been set in CMake like RUBY_EXECUTABLE and RUBY_INCLUDE_DIR.

What is RUBY_LIBRARY and what is it supposed to be set to? Ruby is installed in C:\Ruby192.

like image 241
Mizipzor Avatar asked Mar 04 '26 22:03

Mizipzor


1 Answers

According to /usr/share/cmake-2.8/Modules/FindRuby.cmake:

#  RUBY_LIBRARY      = full path to the ruby library

I see you're on Windows. I would guess that to link against the DLL, you'd either point at ${RUBY_DIR}\lib\msvcrt-ruby191.lib or ${RUBY_DIR}\bin\msvcrt-ruby191.dll (I'm using the names from a Ruby 1.9.1 binary I grabbed from ruby-lang.org). To link against the static library, you'll want ${RUBY_DIR}\lib\msvcrt-ruby-191-static.lib.

I have no idea if the fact that these libraries are built against msvcrt will cause problems when linking with the VS2008 compiler. I gave that hairball away long ago.

like image 186
Jack Kelly Avatar answered Mar 07 '26 16:03

Jack Kelly



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!