Skip to content

Commit

Permalink
Make the CMake option lists more readable.
Browse files Browse the repository at this point in the history
  • Loading branch information
mosra committed Jun 26, 2020
1 parent 4a79ad4 commit 75ea765
Show file tree
Hide file tree
Showing 7 changed files with 111 additions and 7 deletions.
5 changes: 4 additions & 1 deletion Formula/corrade.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ class Corrade < Formula
def install
system "mkdir build"
cd "build" do
system "cmake", "-DCMAKE_BUILD_TYPE=Release", "-DCMAKE_INSTALL_PREFIX=#{prefix}", ".."
system "cmake",
"-DCMAKE_BUILD_TYPE=Release",
"-DCMAKE_INSTALL_PREFIX=#{prefix}",
".."
system "cmake", "--build", "."
system "cmake", "--build", ".", "--target", "install"
end
Expand Down
6 changes: 5 additions & 1 deletion Formula/magnum-bindings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ class MagnumBindings < Formula
def install
system "mkdir build"
cd "build" do
system "cmake", "-DCMAKE_BUILD_TYPE=Release", "-DCMAKE_INSTALL_PREFIX=#{prefix}", "-DWITH_PYTHON=ON", ".."
system "cmake",
"-DCMAKE_BUILD_TYPE=Release",
"-DCMAKE_INSTALL_PREFIX=#{prefix}",
"-DWITH_PYTHON=ON",
".."
system "cmake", "--build", "."
system "cmake", "--build", ".", "--target", "install"
cd "src/python" do
Expand Down
28 changes: 27 additions & 1 deletion Formula/magnum-examples.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,33 @@ def install
# Box2D is not enabled because of
# https://github.com/Homebrew/homebrew-core/pull/4482 and nothing
# happened with https://github.com/erincatto/Box2D/issues/431 yet
system "cmake", "-DCMAKE_BUILD_TYPE=Release", "-DCMAKE_INSTALL_PREFIX=#{prefix}", "-DWITH_ANIMATED_GIF_EXAMPLE=ON", "-DWITH_ARCBALL_EXAMPLE=ON", "-DWITH_AREALIGHTS_EXAMPLE=ON", "-DWITH_AUDIO_EXAMPLE=ON", "-DWITH_BOX2D_EXAMPLE=OFF", "-DWITH_BULLET_EXAMPLE=ON", "-DWITH_CUBEMAP_EXAMPLE=ON", "-DWITH_DART_EXAMPLE=ON", "-DWITH_FLUIDSIMULATION2D_EXAMPLE=OFF", "-DWITH_FLUIDSIMULATION3D_EXAMPLE=OFF", "-DWITH_IMGUI_EXAMPLE=OFF", "-DWITH_MOTIONBLUR_EXAMPLE=ON", "-DWITH_MOUSEINTERACTION_EXAMPLE=ON", "-DWITH_PICKING_EXAMPLE=ON", "-DWITH_PRIMITIVES_EXAMPLE=ON", "-DWITH_RAYTRACING_EXAMPLE=ON", "-DWITH_SHADOWS_EXAMPLE=ON", "-DWITH_TEXT_EXAMPLE=ON", "-DWITH_TEXTUREDTRIANGLE_EXAMPLE=ON", "-DWITH_TRIANGLE_EXAMPLE=ON", "-DWITH_TRIANGLE_PLAIN_GLFW_EXAMPLE=OFF", "-DWITH_TRIANGLE_SOKOL_EXAMPLE=OFF", "-DWITH_VIEWER_EXAMPLE=ON", ".."
system "cmake",
"-DCMAKE_BUILD_TYPE=Release",
"-DCMAKE_INSTALL_PREFIX=#{prefix}",
"-DWITH_ANIMATED_GIF_EXAMPLE=ON",
"-DWITH_ARCBALL_EXAMPLE=ON",
"-DWITH_AREALIGHTS_EXAMPLE=ON",
"-DWITH_AUDIO_EXAMPLE=ON",
"-DWITH_BOX2D_EXAMPLE=OFF",
"-DWITH_BULLET_EXAMPLE=ON",
"-DWITH_CUBEMAP_EXAMPLE=ON",
"-DWITH_DART_EXAMPLE=ON",
"-DWITH_FLUIDSIMULATION2D_EXAMPLE=OFF",
"-DWITH_FLUIDSIMULATION3D_EXAMPLE=OFF",
"-DWITH_IMGUI_EXAMPLE=OFF",
"-DWITH_MOTIONBLUR_EXAMPLE=ON",
"-DWITH_MOUSEINTERACTION_EXAMPLE=ON",
"-DWITH_PICKING_EXAMPLE=ON",
"-DWITH_PRIMITIVES_EXAMPLE=ON",
"-DWITH_RAYTRACING_EXAMPLE=ON",
"-DWITH_SHADOWS_EXAMPLE=ON",
"-DWITH_TEXT_EXAMPLE=ON",
"-DWITH_TEXTUREDTRIANGLE_EXAMPLE=ON",
"-DWITH_TRIANGLE_EXAMPLE=ON",
"-DWITH_TRIANGLE_PLAIN_GLFW_EXAMPLE=OFF",
"-DWITH_TRIANGLE_SOKOL_EXAMPLE=OFF",
"-DWITH_VIEWER_EXAMPLE=ON",
".."
system "cmake", "--build", "."
system "cmake", "--build", ".", "--target", "install"
end
Expand Down
8 changes: 7 additions & 1 deletion Formula/magnum-extras.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ class MagnumExtras < Formula
def install
system "mkdir build"
cd "build" do
system "cmake", "-DCMAKE_BUILD_TYPE=Release", "-DCMAKE_INSTALL_PREFIX=#{prefix}", "-DWITH_PLAYER=ON", "-DWITH_UI=ON", "-DWITH_UI_GALLERY=ON", ".."
system "cmake",
"-DCMAKE_BUILD_TYPE=Release",
"-DCMAKE_INSTALL_PREFIX=#{prefix}",
"-DWITH_PLAYER=ON",
"-DWITH_UI=ON",
"-DWITH_UI_GALLERY=ON",
".."
system "cmake", "--build", "."
system "cmake", "--build", ".", "--target", "install"
end
Expand Down
10 changes: 9 additions & 1 deletion Formula/magnum-integration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@ class MagnumIntegration < Formula
def install
system "mkdir build"
cd "build" do
system "cmake", "-DCMAKE_BUILD_TYPE=Release", "-DCMAKE_INSTALL_PREFIX=#{prefix}", "-DWITH_BULLET=ON", "-DWITH_DART=ON", "-DWITH_EIGEN=ON", "-DWITH_GLM=ON", "-DWITH_IMGUI=OFF", ".."
system "cmake",
"-DCMAKE_BUILD_TYPE=Release",
"-DCMAKE_INSTALL_PREFIX=#{prefix}",
"-DWITH_BULLET=ON",
"-DWITH_DART=ON",
"-DWITH_EIGEN=ON",
"-DWITH_GLM=ON",
"-DWITH_IMGUI=OFF",
".."
system "cmake", "--build", "."
system "cmake", "--build", ".", "--target", "install"
end
Expand Down
32 changes: 31 additions & 1 deletion Formula/magnum-plugins.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,37 @@ def install

system "mkdir build"
cd "build" do
system "cmake", "-DCMAKE_BUILD_TYPE=Release", "-DCMAKE_INSTALL_PREFIX=#{prefix}", "-DWITH_ASSIMPIMPORTER=ON", "-DWITH_BASISIMAGECONVERTER=#{basis}", "-DWITH_BASISIMPORTER=#{basis}", "-DWITH_DDSIMPORTER=ON", "-DWITH_DEVILIMAGEIMPORTER=ON", "-DWITH_DRFLACAUDIOIMPORTER=ON", "-DWITH_DRMP3AUDIOIMPORTER=ON", "-DWITH_DRWAVAUDIOIMPORTER=ON", "-DWITH_FAAD2AUDIOIMPORTER=ON", "-DWITH_FREETYPEFONT=ON", "-DWITH_HARFBUZZFONT=ON", "-DWITH_JPEGIMAGECONVERTER=ON", "-DWITH_JPEGIMPORTER=ON", "-DWITH_MESHOPTIMIZERSCENECONVERTER=ON", "-DWITH_MINIEXRIMAGECONVERTER=ON", "-DWITH_OPENGEXIMPORTER=ON", "-DWITH_PNGIMAGECONVERTER=ON", "-DWITH_PNGIMPORTER=ON", "-DWITH_PRIMITIVEIMPORTER=ON", "-DWITH_STANFORDIMPORTER=ON", "-DWITH_STANFORDSCENECONVERTER=ON", "-DWITH_STBIMAGECONVERTER=ON", "-DWITH_STBIMAGEIMPORTER=ON", "-DWITH_STBTRUETYPEFONT=ON", "-DWITH_STBVORBISAUDIOIMPORTER=ON", "-DWITH_STLIMPORTER=ON", "-DWITH_TINYGLTFIMPORTER=ON", ".."
system "cmake",
"-DCMAKE_BUILD_TYPE=Release",
"-DCMAKE_INSTALL_PREFIX=#{prefix}",
"-DWITH_ASSIMPIMPORTER=ON",
"-DWITH_BASISIMAGECONVERTER=#{basis}",
"-DWITH_BASISIMPORTER=#{basis}",
"-DWITH_DDSIMPORTER=ON",
"-DWITH_DEVILIMAGEIMPORTER=ON",
"-DWITH_DRFLACAUDIOIMPORTER=ON",
"-DWITH_DRMP3AUDIOIMPORTER=ON",
"-DWITH_DRWAVAUDIOIMPORTER=ON",
"-DWITH_FAAD2AUDIOIMPORTER=ON",
"-DWITH_FREETYPEFONT=ON",
"-DWITH_HARFBUZZFONT=ON",
"-DWITH_JPEGIMAGECONVERTER=ON",
"-DWITH_JPEGIMPORTER=ON",
"-DWITH_MESHOPTIMIZERSCENECONVERTER=ON",
"-DWITH_MINIEXRIMAGECONVERTER=ON",
"-DWITH_OPENGEXIMPORTER=ON",
"-DWITH_PNGIMAGECONVERTER=ON",
"-DWITH_PNGIMPORTER=ON",
"-DWITH_PRIMITIVEIMPORTER=ON",
"-DWITH_STANFORDIMPORTER=ON",
"-DWITH_STANFORDSCENECONVERTER=ON",
"-DWITH_STBIMAGECONVERTER=ON",
"-DWITH_STBIMAGEIMPORTER=ON",
"-DWITH_STBTRUETYPEFONT=ON",
"-DWITH_STBVORBISAUDIOIMPORTER=ON",
"-DWITH_STLIMPORTER=ON",
"-DWITH_TINYGLTFIMPORTER=ON",
".."
system "cmake", "--build", "."
system "cmake", "--build", ".", "--target", "install"
end
Expand Down
29 changes: 28 additions & 1 deletion Formula/magnum.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,34 @@ class Magnum < Formula
def install
system "mkdir build"
cd "build" do
system "cmake", "-DCMAKE_BUILD_TYPE=Release", "-DCMAKE_INSTALL_PREFIX=#{prefix}", "-DMAGNUM_PLUGINS_DIR=#{HOMEBREW_PREFIX}/lib/magnum", "-DWITH_AUDIO=ON", "-DWITH_GLFWAPPLICATION=ON", "-DWITH_SDL2APPLICATION=ON", "-DWITH_WINDOWLESSCGLAPPLICATION=ON", "-DWITH_CGLCONTEXT=ON", "-DWITH_OPENGLTESTER=ON", "-DWITH_ANYAUDIOIMPORTER=ON", "-DWITH_ANYIMAGECONVERTER=ON", "-DWITH_ANYIMAGEIMPORTER=ON", "-DWITH_ANYSCENECONVERTER=ON", "-DWITH_ANYSCENEIMPORTER=ON", "-DWITH_MAGNUMFONT=ON", "-DWITH_MAGNUMFONTCONVERTER=ON", "-DWITH_OBJIMPORTER=ON", "-DWITH_TGAIMAGECONVERTER=ON", "-DWITH_TGAIMPORTER=ON", "-DWITH_WAVAUDIOIMPORTER=ON", "-DWITH_DISTANCEFIELDCONVERTER=ON", "-DWITH_FONTCONVERTER=ON", "-DWITH_IMAGECONVERTER=ON", "-DWITH_SCENECONVERTER=ON", "-DWITH_GL_INFO=ON", "-DWITH_AL_INFO=ON", ".."
system "cmake",
"-DCMAKE_BUILD_TYPE=Release",
"-DCMAKE_INSTALL_PREFIX=#{prefix}",
"-DMAGNUM_PLUGINS_DIR=#{HOMEBREW_PREFIX}/lib/magnum",
"-DWITH_AUDIO=ON",
"-DWITH_GLFWAPPLICATION=ON",
"-DWITH_SDL2APPLICATION=ON",
"-DWITH_WINDOWLESSCGLAPPLICATION=ON",
"-DWITH_CGLCONTEXT=ON",
"-DWITH_OPENGLTESTER=ON",
"-DWITH_ANYAUDIOIMPORTER=ON",
"-DWITH_ANYIMAGECONVERTER=ON",
"-DWITH_ANYIMAGEIMPORTER=ON",
"-DWITH_ANYSCENECONVERTER=ON",
"-DWITH_ANYSCENEIMPORTER=ON",
"-DWITH_MAGNUMFONT=ON",
"-DWITH_MAGNUMFONTCONVERTER=ON",
"-DWITH_OBJIMPORTER=ON",
"-DWITH_TGAIMAGECONVERTER=ON",
"-DWITH_TGAIMPORTER=ON",
"-DWITH_WAVAUDIOIMPORTER=ON",
"-DWITH_DISTANCEFIELDCONVERTER=ON",
"-DWITH_FONTCONVERTER=ON",
"-DWITH_IMAGECONVERTER=ON",
"-DWITH_SCENECONVERTER=ON",
"-DWITH_GL_INFO=ON",
"-DWITH_AL_INFO=ON",
".."
system "cmake", "--build", "."
system "cmake", "--build", ".", "--target", "install"
end
Expand Down

0 comments on commit 75ea765

Please sign in to comment.