class Dartsim < Formula desc "Dynamic Animation and Robotics Toolkit" homepage "https://dartsim.github.io/" url "https://github.com/dartsim/dart/archive/v6.9.2.tar.gz" sha256 "7d46d23c04d74d3b78331f9fa7deb5ab32fd4b0c03b93548cd84a2d67771d816" revision 2 bottle do sha256 "1280e9a05942de27ab47f14e17ce4eacbe0fb3de30e6cb5f1e5e39e083a19ddc" => :catalina sha256 "cd5a445789d10b562e8afde5ea6edd4dd1b2967ed3a214d8e7c5cb5a210965b7" => :mojave sha256 "b2a464c6093bddcff2906fa5d05fbd48971fed7d3f0727a40666cf227fc27e6d" => :high_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 "ipopt" 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