class Dartsim < Formula desc "Dynamic Animation and Robotics Toolkit" homepage "https://dartsim.github.io/" url "https://github.com/dartsim/dart/archive/v6.9.0.tar.gz" sha256 "8351c3fe53bd5251235d28ce15cc2796e529125b7990e49a715f4f567021aaed" bottle do sha256 "37df8adbabfd3f9675eb484de13c8a04285e0dc8628b6ebcde76f856f6b65810" => :mojave sha256 "3acde88f851ff977d4bbcdfe9c5671bc3b213cd184e22e10ef0b2b7305f873ee" => :high_sierra sha256 "8b9c430cc7530aabef01cdfb756a398bf82c42b020a84ef1ed70f8689a4e345f" => :sierra end depends_on "cmake" => :build depends_on "pkg-config" => :build depends_on "assimp" depends_on "boost" depends_on "bullet" depends_on "eigen" depends_on "fcl" depends_on "flann" depends_on "libccd" depends_on "nlopt" depends_on "ode" depends_on "open-scene-graph" depends_on "tinyxml2" depends_on "urdfdom" def install ENV.cxx11 # Force to link to system GLUT (see: https://cmake.org/Bug/view.php?id=16045) system "cmake", ".", "-DGLUT_glut_LIBRARY=/System/Library/Frameworks/GLUT.framework", *std_cmake_args system "make", "install" end test do (testpath/"test.cpp").write <<~EOS #include int main() { auto world = std::make_shared(); assert(world != nullptr); return 0; } EOS system ENV.cxx, "test.cpp", "-I#{Formula["eigen"].include}/eigen3", "-I#{include}", "-L#{lib}", "-ldart", "-L#{Formula["assimp"].opt_lib}", "-lassimp", "-L#{Formula["boost"].opt_lib}", "-lboost_system", "-std=c++14", "-o", "test" system "./test" end end