77 lines
2.3 KiB
Ruby
77 lines
2.3 KiB
Ruby
class Pcl < Formula
|
|
desc "Library for 2D/3D image and point cloud processing"
|
|
homepage "http://www.pointclouds.org/"
|
|
url "https://github.com/PointCloudLibrary/pcl/archive/pcl-1.8.0.tar.gz"
|
|
sha256 "9e54b0c1b59a67a386b9b0f4acb2d764272ff9a0377b825c4ed5eedf46ebfcf4"
|
|
revision 8
|
|
|
|
head "https://github.com/PointCloudLibrary/pcl.git"
|
|
|
|
bottle do
|
|
sha256 "f34f770e7f9014946fd04599406565ca1cd34d42c6093bb01976805c1c39c4af" => :sierra
|
|
sha256 "d84a9afa86d1abb2f0b043c98b1acb8d61bd8fda29162603908f8acde51c7e86" => :el_capitan
|
|
sha256 "809907a035a020a691b14cc9150b0a065619abb00d64962a511bfac1417f5b46" => :yosemite
|
|
end
|
|
|
|
depends_on "cmake" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "boost"
|
|
depends_on "cminpack"
|
|
depends_on "eigen"
|
|
depends_on "flann"
|
|
depends_on "glew"
|
|
depends_on "libusb"
|
|
depends_on "qhull"
|
|
depends_on "vtk"
|
|
depends_on "homebrew/science/openni" => :optional
|
|
depends_on "homebrew/science/openni2" => :optional
|
|
|
|
def install
|
|
args = std_cmake_args + %w[
|
|
-DBUILD_SHARED_LIBS:BOOL=ON
|
|
-DBUILD_apps=AUTO_OFF
|
|
-DBUILD_apps_3d_rec_framework=AUTO_OFF
|
|
-DBUILD_apps_cloud_composer=AUTO_OFF
|
|
-DBUILD_apps_in_hand_scanner=AUTO_OFF
|
|
-DBUILD_apps_optronic_viewer=AUTO_OFF
|
|
-DBUILD_apps_point_cloud_editor=AUTO_OFF
|
|
-DBUILD_examples:BOOL=ON
|
|
-DBUILD_global_tests:BOOL=OFF
|
|
-DBUILD_outofcore:BOOL=AUTO_OFF
|
|
-DBUILD_people:BOOL=AUTO_OFF
|
|
-DBUILD_simulation:BOOL=AUTO_OFF
|
|
-DWITH_CUDA:BOOL=OFF
|
|
-DWITH_DOCS:BOOL=OFF
|
|
-DWITH_QT:BOOL=FALSE
|
|
-DWITH_TUTORIALS:BOOL=OFF
|
|
]
|
|
|
|
if build.head?
|
|
args << "-DBUILD_apps_modeler=AUTO_OFF"
|
|
else
|
|
args << "-DBUILD_apps_modeler:BOOL=OFF"
|
|
end
|
|
|
|
if build.with? "openni"
|
|
args << "-DOPENNI_INCLUDE_DIR=#{Formula["openni"].opt_include}/ni"
|
|
else
|
|
args << "-DCMAKE_DISABLE_FIND_PACKAGE_OpenNI:BOOL=TRUE"
|
|
end
|
|
|
|
if build.with? "openni2"
|
|
ENV.append "OPENNI2_INCLUDE", "#{Formula["openni2"].opt_include}/ni2"
|
|
ENV.append "OPENNI2_LIB", "#{Formula["openni2"].opt_lib}/ni2"
|
|
args << "-DBUILD_OPENNI2:BOOL=ON"
|
|
end
|
|
|
|
mkdir "build" do
|
|
system "cmake", "..", *args
|
|
system "make", "install"
|
|
prefix.install Dir["#{bin}/*.app"]
|
|
end
|
|
end
|
|
|
|
test do
|
|
assert_match "tiff files", shell_output("#{bin}/pcl_tiff2pcd -h", 255)
|
|
end
|
|
end
|