From 7fd472bed522d104fe8914acedf357e921171c19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 26 Jun 2020 17:10:00 +0200 Subject: [PATCH] =?UTF-8?q?magnum-integration:=C2=A0bundle=20ImGui.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit And enable the example also. --- Formula/magnum-examples.rb | 2 +- Formula/magnum-integration.rb | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Formula/magnum-examples.rb b/Formula/magnum-examples.rb index cebf886..cb79b29 100644 --- a/Formula/magnum-examples.rb +++ b/Formula/magnum-examples.rb @@ -31,7 +31,7 @@ def install "-DWITH_DART_EXAMPLE=ON", "-DWITH_FLUIDSIMULATION2D_EXAMPLE=OFF", "-DWITH_FLUIDSIMULATION3D_EXAMPLE=OFF", - "-DWITH_IMGUI_EXAMPLE=OFF", + "-DWITH_IMGUI_EXAMPLE=ON", "-DWITH_MOTIONBLUR_EXAMPLE=ON", "-DWITH_MOUSEINTERACTION_EXAMPLE=ON", "-DWITH_PICKING_EXAMPLE=ON", diff --git a/Formula/magnum-integration.rb b/Formula/magnum-integration.rb index 374d42b..a1c2238 100644 --- a/Formula/magnum-integration.rb +++ b/Formula/magnum-integration.rb @@ -14,6 +14,13 @@ class MagnumIntegration < Formula depends_on "dartsim" def install + # Bundle ImGui + system "curl", "-L", "https://github.com/ocornut/imgui/archive/v1.76.tar.gz", "-o", "src/MagnumExternal/imgui.tar.gz" + cd "src/MagnumExternal" do + system "mkdir", "ImGui" + system "tar", "xzvf", "imgui.tar.gz", "-C", "ImGui", "--strip-components=1" + end + system "mkdir build" cd "build" do system "cmake", @@ -23,7 +30,7 @@ def install "-DWITH_DART=ON", "-DWITH_EIGEN=ON", "-DWITH_GLM=ON", - "-DWITH_IMGUI=OFF", + "-DWITH_IMGUI=ON", ".." system "cmake", "--build", "." system "cmake", "--build", ".", "--target", "install"