Sha256: 69ff39b0bdfe4f48b4f0240d4e1ed084e5d03e860826a353de328da0636eb484

Contents?: true

Size: 1.09 KB

Versions: 8

Compression:

Stored size: 1.09 KB

Contents

begin
  gem('rake-compiler')
  require 'rake/extensiontask'

  Rake::ExtensionTask.new('do_mysql_ext', GEM_SPEC) do |ext|

    mysql_lib = File.expand_path(File.join(File.dirname(__FILE__), '..', 'vendor', "mysql-#{BINARY_VERSION}-win32"))

    # automatically add build options to avoid need of manual input
    if RUBY_PLATFORM =~ /mswin|mingw/ then
      ext.config_options << "--with-mysql-include=#{mysql_lib}/include"
      ext.config_options << "--with-mysql-lib=#{mysql_lib}/lib/opt"
    else
      ext.cross_compile = true
      ext.cross_platform = ['x86-mingw32', 'x86-mswin32-60']
      ext.cross_config_options << "--with-mysql-include=#{mysql_lib}/include"
      ext.cross_config_options << "--with-mysql-lib=#{mysql_lib}/lib/opt"
    end

  end
rescue LoadError
  warn "To cross-compile, install rake-compiler (gem install rake-compiler)"

  if (tasks_dir = ROOT.parent + 'tasks').directory?
    require tasks_dir + 'ext_helper'
    require tasks_dir + 'ext_helper_java'

    setup_c_extension("#{GEM_SPEC.name}_ext", GEM_SPEC)
    setup_java_extension("#{GEM_SPEC.name}_ext", GEM_SPEC)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
do_mysql-0.10.0-x86-mswin32-60 tasks/native.rake
do_mysql-0.10.0-x86-mingw32 tasks/native.rake
do_mysql-0.10.0 tasks/native.rake
do_mysql-0.10.0-java tasks/native.rake
do_mysql-0.9.12-java tasks/native.rake
do_mysql-0.9.12-x86-mingw32 tasks/native.rake
do_mysql-0.9.12-x86-mswin32-60 tasks/native.rake
do_mysql-0.9.12 tasks/native.rake