homebrew-core/Formula/vrpn.rb

34 lines
800 B
Ruby
Raw Normal View History

require 'formula'
2011-03-10 05:11:03 +00:00
class Vrpn < Formula
homepage 'http://vrpn.org'
url 'http://www.cs.unc.edu/Research/vrpn/downloads/vrpn_07_31.zip'
sha1 'a78dd36cd301a7def2d54576cfa63604a8729ace'
head 'git://git.cs.unc.edu/vrpn.git'
2012-08-23 04:02:35 +00:00
option 'clients', 'Build client apps and tests'
option 'docs', 'Build doxygen-based API documentation'
depends_on 'cmake' => :build
2012-08-25 16:41:33 +00:00
depends_on 'libusb' # for HID support
2012-08-23 04:02:35 +00:00
depends_on 'doxygen' if build.include? 'docs'
def install
args = std_cmake_args
2012-08-23 04:02:35 +00:00
if build.include? 'clients'
args << "-DVRPN_BUILD_CLIENTS:BOOL=ON"
else
args << "-DVRPN_BUILD_CLIENTS:BOOL=OFF"
end
args << ".."
2012-02-22 04:48:36 +00:00
mkdir "build" do
system "cmake", *args
2012-08-25 16:41:33 +00:00
system "make doc" if build.include? 'docs'
system "make install"
end
end
end