From 05c8ce4c526de6e37523ded25f6104f66f0be02d Mon Sep 17 00:00:00 2001 From: Luis Lavena Date: Tue, 7 Jul 2009 04:24:07 -0300 Subject: [PATCH] Complete cross compilation tweaks. --- tasks/native.rake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tasks/native.rake b/tasks/native.rake index ca88606e..c34392cc 100644 --- a/tasks/native.rake +++ b/tasks/native.rake @@ -4,10 +4,16 @@ require 'rake/extensiontask' # build http11 C extension Rake::ExtensionTask.new('http11', HOE.spec) do |ext| # define target for extension (supporting fat binaries) - if RUBY_PLATFORM =~ /mingw/ then + if RUBY_PLATFORM =~ /mingw|mswin/ then RUBY_VERSION =~ /(\d+\.\d+)/ ext.lib_dir = "lib/#{$1}" end + + # define cross-compilation tasks when not on Windows. + unless RUBY_PLATFORM =~ /mingw|mswin/ then + ext.cross_compile = true + ext.cross_platform = ['i386-mswin32', 'i386-mingw32'] + end end # ensure things are built prior testing