Sha256: 998782d620c6e539a54321c8d1bbf4c1a639121f8cbea61e3f8b4156b7f220c8

Contents?: true

Size: 727 Bytes

Versions: 4

Compression:

Stored size: 727 Bytes

Contents

gem 'rake-compiler', '~> 0.7.1'
require "rake/extensiontask"

MYSQL_VERSION = "5.1.49"
MYSQL_MIRROR  = ENV['MYSQL_MIRROR'] || "http://mysql.localhost.net.ar"

Rake::ExtensionTask.new("mysql2", JEWELER.gemspec) do |ext|
  # reference where the vendored MySQL got extracted
  mysql_lib = File.expand_path(File.join(File.dirname(__FILE__), '..', 'vendor', "mysql-#{MYSQL_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"
  end

  ext.lib_dir = File.join 'lib', 'mysql2'
end
Rake::Task[:spec].prerequisites << :compile

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mysql2-0.2.3 tasks/compile.rake
mysql2-0.2.2 tasks/compile.rake
mysql2-0.2.1 tasks/compile.rake
mysql2-0.2.0 tasks/compile.rake