require 'formula' class Cgal :build depends_on 'boost' depends_on 'gmp' depends_on 'mpfr' depends_on 'qt' if ARGV.include? '--imaging' def options [['--imaging', "Build ImageIO and QT compoments of CGAL"]] end def install args = ["-DCMAKE_INSTALL_PREFIX=#{prefix}", "-DCMAKE_BUILD_TYPE=Release"] unless ARGV.include? '--imaging' args << "-DWITH_CGAL_Qt3=OFF" << "-DWITH_CGAL_Qt4=OFF" << "-DWITH_CGAL_ImageIO=OFF" end system "cmake", ".", *args system "make install" end end