summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-io/mrbgem.rake
diff options
context:
space:
mode:
Diffstat (limited to 'mrbgems/mruby-io/mrbgem.rake')
-rw-r--r--mrbgems/mruby-io/mrbgem.rake18
1 files changed, 15 insertions, 3 deletions
diff --git a/mrbgems/mruby-io/mrbgem.rake b/mrbgems/mruby-io/mrbgem.rake
index bd20f6d20..80835df9c 100644
--- a/mrbgems/mruby-io/mrbgem.rake
+++ b/mrbgems/mruby-io/mrbgem.rake
@@ -7,9 +7,21 @@ MRuby::Gem::Specification.new('mruby-io') do |spec|
case RUBY_PLATFORM
when /mingw|mswin|msys/
- spec.linker.libraries += ['Ws2_32']
- #spec.cc.include_paths += ["C:/Windows/system/include"]
- spec.linker.library_paths += ["C:/Windows/system"]
+ really_for_window = true
+
+ if build.kind_of?(MRuby::CrossBuild)
+ if %w(x86_64-w64-mingw32 i686-w64-mingw32).include?(build.host_target)
+ really_for_window = true
+ else
+ really_for_window = false
+ end
+ end
+
+ if really_for_window
+ spec.linker.libraries += ['Ws2_32']
+ #spec.cc.include_paths += ["C:/Windows/system/include"]
+ spec.linker.library_paths += ["C:/Windows/system"]
+ end
end
if build.kind_of?(MRuby::CrossBuild) && %w(x86_64-w64-mingw32 i686-w64-mingw32).include?(build.host_target)
spec.linker.libraries += ['ws2_32']