Skip to content

Commit

Permalink
magnum-integration: bundle ImGui.
Browse files Browse the repository at this point in the history
And enable the example also.
  • Loading branch information
mosra committed Jun 26, 2020
1 parent 75ea765 commit 7fd472b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Formula/magnum-examples.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
9 changes: 8 additions & 1 deletion Formula/magnum-integration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
Expand Down

0 comments on commit 7fd472b

Please sign in to comment.