Commit 81461af1 authored by Tony Arcieri's avatar Tony Arcieri

Use a glob to find the location of libsodium's shared library

Apparently in some build environments (e.g. Windows) the "symlinked"
version is not always created. This should (hopefully) always find it.
parent 5f007d3e
......@@ -4,13 +4,13 @@ module RbNaCl
module Libsodium
sodiumlib_dir = File.expand_path("../../../vendor/libsodium/dist/lib/", __FILE__)
sodiumlib_filename = case RUBY_DESCRIPTION
when /darwin/ then "libsodium.dylib"
when /Windows|(win|mingw)32/ then "libsodium.dll"
else "libsodium.so"
sodiumlib_glob = case RUBY_DESCRIPTION
when /darwin/ then "libsodium*.dylib"
when /Windows|(win|mingw)32/ then "libsodium*.dll"
else "libsodium*.so"
end
::RBNACL_LIBSODIUM_GEM_LIB_PATH = File.join(sodiumlib_dir, sodiumlib_filename)
::RBNACL_LIBSODIUM_GEM_LIB_PATH = Dir.glob(File.join(sodiumlib_dir, sodiumlib_glob)).first
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment