Sha256: 4296b71b9113f2992f2f1f452b0cfc6bfab3d73f2e4fc0f6432f322f561ac3e1

Contents?: true

Size: 1.03 KB

Versions: 8

Compression:

Stored size: 1.03 KB

Contents

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

  # compile the extension
  if JRUBY
    # XXX: is it necessary to run this everytime?
    Rake::Task['compile:jruby'].invoke
  end

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

    sqlite3_lib = File.expand_path(File.join(File.dirname(__FILE__), '..', 'vendor', 'sqlite3'))

    ext.cross_compile = true
    ext.cross_platform = ['x86-mingw32', 'x86-mswin32-60']
    ext.cross_config_options << "--with-sqlite3-dir=#{sqlite3_lib}"

    # automatically add build options to avoid need of manual input
    if RUBY_PLATFORM =~ /mswin|mingw/ then
      ext.config_options << "--with-sqlite3-dir=#{sqlite3_lib}"
    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_sqlite3-0.10.0-x86-mswin32-60 tasks/native.rake
do_sqlite3-0.10.0-x86-mingw32 tasks/native.rake
do_sqlite3-0.10.0 tasks/native.rake
do_sqlite3-0.10.0-java tasks/native.rake
do_sqlite3-0.9.12-x86-mswin32-60 tasks/native.rake
do_sqlite3-0.9.12-x86-mingw32 tasks/native.rake
do_sqlite3-0.9.12-java tasks/native.rake
do_sqlite3-0.9.12 tasks/native.rake