mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Helper for link window's library
This commit is contained in:
@@ -106,6 +106,15 @@ module MRuby
|
||||
define_gem_init_builder if @generate_functions
|
||||
end
|
||||
|
||||
def for_windows?
|
||||
if build.kind_of?(MRuby::CrossBuild)
|
||||
return %w(x86_64-w64-mingw32 i686-w64-mingw32).include?(build.host_target)
|
||||
elsif build.kind_of?(MRuby::Build)
|
||||
return ('A'..'Z').to_a.any? { |vol| Dir.exist?("#{vol}:") }
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
def add_dependency(name, *requirements)
|
||||
default_gem = requirements.last.kind_of?(Hash) ? requirements.pop : nil
|
||||
requirements = ['>= 0.0.0'] if requirements.empty?
|
||||
|
||||
Reference in New Issue
Block a user