From 4731ecd063d76f31594961b7880e5a9106da862c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 3 May 2025 17:12:57 +0200 Subject: [PATCH] package/homebrew: make the 2020.06 version still work with CMake 4. --- package/homebrew/magnum-bindings.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/package/homebrew/magnum-bindings.rb b/package/homebrew/magnum-bindings.rb index eda9cd2..4c5f5c2 100644 --- a/package/homebrew/magnum-bindings.rb +++ b/package/homebrew/magnum-bindings.rb @@ -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