Browse Source

package/homebrew: make the 2020.06 version still work with CMake 4.

next
Vladimír Vondruš 1 year ago
parent
commit
4731ecd063
  1. 7
      package/homebrew/magnum-bindings.rb

7
package/homebrew/magnum-bindings.rb

@ -25,11 +25,16 @@ class MagnumBindings < Formula
# 2020.06 has the options unprefixed, current master has them prefixed. # 2020.06 has the options unprefixed, current master has them prefixed.
# Options not present in 2020.06 are prefixed always. # Options not present in 2020.06 are prefixed always.
option_prefix = build.head? ? 'MAGNUM_' : '' 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" system "mkdir build"
cd "build" do cd "build" do
system "cmake", system "cmake",
*std_cmake_args, *(std_cmake_args + extra_cmake_args),
# Without this, ARM builds will try to look for dependencies in # Without this, ARM builds will try to look for dependencies in
# /usr/local/lib and /usr/lib (which are the default locations) instead # /usr/local/lib and /usr/lib (which are the default locations) instead
# of /opt/homebrew/lib which is dedicated for ARM binaries. Please # of /opt/homebrew/lib which is dedicated for ARM binaries. Please

Loading…
Cancel
Save