From 9122ba00e13b8ced4a3d6531b3072e72c9588115 Mon Sep 17 00:00:00 2001 From: Daniel Cukier Date: Wed, 18 Dec 2024 09:55:27 -0300 Subject: [PATCH] Fix MacOS 15 issue with M3 --- build.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index ad501ce1..501d21d4 100755 --- a/build.sh +++ b/build.sh @@ -23,7 +23,18 @@ build() { JOBS="$(nproc)" fi ./get-msquic.sh "$MSQUIC_VERSION" - cmake -B c_build -G "${GENERATOR}" + + CMAKE_EXTRA_ARGS="-DCMAKE_OSX_ARCHITECTURES=arm64" + MIX_TARGET="${MIX_TARGET:-arm64-apple-darwin}" + + # Check if a MIX_TARGET is set. + case "$MIX_TARGET" in + "x86_64-apple-darwin") + CMAKE_EXTRA_ARGS="-DCMAKE_OSX_ARCHITECTURES=x86_64" + ;; + esac + + cmake -B c_build -G "${GENERATOR}" ${CMAKE_EXTRA_ARGS} $MakeCmd -C c_build -j "$JOBS" $MakeCmd -C c_build install ## MacOS