|
|
|
|
@ -25,11 +25,16 @@ class MagnumBindings < Formula
|
|
|
|
|
# 2020.06 has the options unprefixed, current master has them prefixed. |
|
|
|
|
# Options not present in 2020.06 are prefixed always. |
|
|
|
|
option_prefix = build.head? ? 'MAGNUM_' : '' |
|
|
|
|
# 2020.06 has CMake 3.5 as minimum required for backwards compatibility |
|
|
|
|
# purposes, but it works with any newer. CMake 4.0 removed compatibility |
|
|
|
|
# with it and suggests this as an override. |
|
|
|
|
# TODO remove once a new release is finally made |
|
|
|
|
extra_cmake_args = build.head? ? [] : ['-DCMAKE_POLICY_VERSION_MINIMUM=3.5'] |
|
|
|
|
|
|
|
|
|
system "mkdir build" |
|
|
|
|
cd "build" do |
|
|
|
|
system "cmake", |
|
|
|
|
*std_cmake_args, |
|
|
|
|
*(std_cmake_args + extra_cmake_args), |
|
|
|
|
# Without this, ARM builds will try to look for dependencies in |
|
|
|
|
# /usr/local/lib and /usr/lib (which are the default locations) instead |
|
|
|
|
# of /opt/homebrew/lib which is dedicated for ARM binaries. Please |
|
|
|
|
|