1class Gem::Ext::CmakeBuilder < Gem::Ext::Builder
2  def self.build(extension, directory, dest_path, results)
3    unless File.exist?('Makefile') then
4      cmd = "cmake . -DCMAKE_INSTALL_PREFIX=#{dest_path}"
5      cmd << " #{Gem::Command.build_args.join ' '}" unless Gem::Command.build_args.empty?
6
7      run cmd, results
8    end
9
10    make dest_path, results
11
12    results
13  end
14end
15