Commit 2e4f719a authored by Tony Arcieri's avatar Tony Arcieri

Merge pull request #7 from shirosaki/windows

Fix issues for Windows MinGW
parents f66e4c47 07f850af
......@@ -19,9 +19,14 @@ LIBSODIUM_DIR = File.expand_path(File.join(CWD, '..', '..', 'vendor', 'libsodium
MAKE = ENV['MAKE'] || ENV['make'] || "make"
Dir.chdir(LIBSODIUM_DIR) do
sys("./configure --prefix=#{LIBSODIUM_DIR}/dist")
# sh is required to run configure on Windows
sys("sh -c \"./configure --prefix=#{LIBSODIUM_DIR}/dist\"")
sys(MAKE)
sys("#{MAKE} install")
if !Dir.glob('dist/bin/libsodium*.dll').empty?
# copy dll to make it loadable on Windows
sys("cp dist/bin/libsodium*.dll dist/lib/libsodium.so")
end
end
File.open("Makefile", "w") do |f|
......
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