homebrew-core/Formula/vrpn.rb

34 lines
798 B
Ruby
Raw Normal View History

require 'formula'
2011-03-10 05:11:03 +00:00
class Vrpn < Formula
homepage 'http://vrpn.org'
url 'ftp://ftp.cs.unc.edu/pub/packages/GRIP/vrpn/vrpn_07_30.zip'
sha1 '474f45d524ba959e93630f19666fd03d8f337d90'
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