summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-io/mrbgem.rake
diff options
context:
space:
mode:
authorReckordp <[email protected]>2020-03-08 14:23:55 +0700
committerReckordp <[email protected]>2020-03-08 14:23:55 +0700
commit7c85a1ff073dabb2495e4146032ea54930308623 (patch)
tree80cf59e23bb9b600a77e4a2eb355a7ccc00b7ff3 /mrbgems/mruby-io/mrbgem.rake
parentdd6f5e4607a9a411d1246b9223d46009c29c2219 (diff)
downloadmruby-7c85a1ff073dabb2495e4146032ea54930308623.tar.gz
mruby-7c85a1ff073dabb2495e4146032ea54930308623.zip
Increase flexibility of CrossBuild
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']