From 6fe64b90ee7c3f2c39e6add3ee60309b33a38591 Mon Sep 17 00:00:00 2001 From: ebbit1q Date: Sat, 11 Oct 2025 01:35:17 +0200 Subject: [PATCH] make script work for arm as well, might be useful --- .ci/compile.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.ci/compile.sh b/.ci/compile.sh index d5fdd90c3..6d445cf2c 100755 --- a/.ci/compile.sh +++ b/.ci/compile.sh @@ -156,14 +156,18 @@ if [[ $RUNNER_OS == macOS ]]; then # vcpkg dependencies need a vcpkg triplet file to compile to the target macOS version # an easy way is to copy the x64-osx.cmake file and modify it triplets_dir="/tmp/cmake/triplets" - triplet_version=${TARGET_MACOS_VERSION//./-} - triplet_file="$triplets_dir/x64-osx-$triplet_version.cmake" + triplet_version="custom_triplet" + triplet_file="$triplets_dir/$triplet_version.cmake" + arch=$(uname -m) + if [[ $arch == x86_64 ]]; then + arch="x64" + fi mkdir -p "$triplets_dir" - cp "../vcpkg/triplets/x64-osx.cmake" "$triplet_file" + cp "../vcpkg/triplets/$arch-osx.cmake" "$triplet_file" echo "set(VCPKG_CMAKE_SYSTEM_VERSION $TARGET_MACOS_VERSION)" >>"$triplet_file" echo "set(VCPKG_OSX_DEPLOYMENT_TARGET $TARGET_MACOS_VERSION)" >>"$triplet_file" flags+=("-DVCPKG_OVERLAY_TRIPLETS=$triplets_dir") - flags+=("-DVCPKG_TARGET_TRIPLET=x64-osx-$triplet_version") + flags+=("-DVCPKG_TARGET_TRIPLET=$triplet_version") echo "::group::Generated triplet $triplet_file" cat "$triplet_file" echo "::endgroup::"