diff --git a/Formula/cgal.rb b/Formula/cgal.rb index 92bd43d204..10b76510cc 100644 --- a/Formula/cgal.rb +++ b/Formula/cgal.rb @@ -1,18 +1,29 @@ require 'formula' class Cgal :build depends_on 'boost' depends_on 'gmp' depends_on 'mpfr' - depends_on 'qt' => :optional + + depends_on 'qt' if ARGV.include? '--imaging' + + def options + [['--imaging', "Build ImageIO and QT compoments of CGAL"]] + end def install - system "cmake", ".", "-DCMAKE_INSTALL_PREFIX=#{prefix}", "-DCMAKE_BUILD_TYPE=Release" + 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