Choose platform more reliably. (Works with Jruby.)

This commit is contained in:
John Hume 2011-10-21 15:55:08 -04:00 committed by Matthew Mongeau
parent 7f907a0099
commit 0979db4675
1 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
require "fileutils"
require "rbconfig"
module CapybaraWebkitBuilder
extend self
@ -11,7 +12,7 @@ module CapybaraWebkitBuilder
def makefile
qmake_binaries = ['qmake', 'qmake-qt4']
qmake = qmake_binaries.detect { |qmake| system("which #{qmake}") }
case RUBY_PLATFORM
case RbConfig::CONFIG['host_os']
when /linux/
system("#{qmake} -spec linux-g++")
when /freebsd/