mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 22:42:14 -07:00
make script work for arm as well, might be useful
This commit is contained in:
parent
6e5eef6082
commit
6fe64b90ee
1 changed files with 8 additions and 4 deletions
|
|
@ -156,14 +156,18 @@ if [[ $RUNNER_OS == macOS ]]; then
|
||||||
# vcpkg dependencies need a vcpkg triplet file to compile to the target macOS version
|
# 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
|
# an easy way is to copy the x64-osx.cmake file and modify it
|
||||||
triplets_dir="/tmp/cmake/triplets"
|
triplets_dir="/tmp/cmake/triplets"
|
||||||
triplet_version=${TARGET_MACOS_VERSION//./-}
|
triplet_version="custom_triplet"
|
||||||
triplet_file="$triplets_dir/x64-osx-$triplet_version.cmake"
|
triplet_file="$triplets_dir/$triplet_version.cmake"
|
||||||
|
arch=$(uname -m)
|
||||||
|
if [[ $arch == x86_64 ]]; then
|
||||||
|
arch="x64"
|
||||||
|
fi
|
||||||
mkdir -p "$triplets_dir"
|
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_CMAKE_SYSTEM_VERSION $TARGET_MACOS_VERSION)" >>"$triplet_file"
|
||||||
echo "set(VCPKG_OSX_DEPLOYMENT_TARGET $TARGET_MACOS_VERSION)" >>"$triplet_file"
|
echo "set(VCPKG_OSX_DEPLOYMENT_TARGET $TARGET_MACOS_VERSION)" >>"$triplet_file"
|
||||||
flags+=("-DVCPKG_OVERLAY_TRIPLETS=$triplets_dir")
|
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"
|
echo "::group::Generated triplet $triplet_file"
|
||||||
cat "$triplet_file"
|
cat "$triplet_file"
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue