Skip to content

FindRuby: Move unversioned lib names to the end of the list

Heiko Becker requested to merge heirecka/cmake:FindRuby-fix into master

My distro has tooling to select a ruby version via symlinks for ruby's binaries, libraries and man-pages. When ruby-2.2 is selected find_package(Ruby 2.3) sets all variables but RUBY_LIBRARY to correct, versioned values. RUBY_LIBRARY holds libruby.so, which is a symlink to libruby-2.2.so, leading to errors because of incompatible ruby versions later on. Even if I ignore our tooling, it seems wrong to find the unversioned libraries first, when asked for a specific version. Thus move them to the end of the list.

Merge request reports