summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-io
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-03-08 19:07:32 +0900
committerGitHub <[email protected]>2020-03-08 19:07:32 +0900
commit5bf5a2cc6e9e78cb84118c08dd9498bbe854e7cb (patch)
tree29dd4d453a56ab0a091b1996f11a8b92727e885f /mrbgems/mruby-io
parent1cc270f0ccad71356bc1cdee7ffc7db4bf106afa (diff)
parente15e6e761edc33d9e1b315738bdc788654e06428 (diff)
downloadmruby-5bf5a2cc6e9e78cb84118c08dd9498bbe854e7cb.tar.gz
mruby-5bf5a2cc6e9e78cb84118c08dd9498bbe854e7cb.zip
Merge pull request #4953 from Reckordp/BuildAndroid
Some rule to CrossBuild Android
Diffstat (limited to 'mrbgems/mruby-io')
-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']