From 9a9a18999df136a226b1696b65f9eeb9a2f191ed Mon Sep 17 00:00:00 2001 From: TheOliveOli <152160964+TheOliveOli38@users.noreply.github.com> Date: Sun, 22 Jun 2025 01:37:31 +0200 Subject: Build macOS release as Universal Binary (#267) * Update CMakeLists.txt * Edit output filename to reflect building as Universal binary --- .github/workflows/macos-compile.yml | 2 +- CMakeLists.txt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/macos-compile.yml b/.github/workflows/macos-compile.yml index d6259505b..864209387 100644 --- a/.github/workflows/macos-compile.yml +++ b/.github/workflows/macos-compile.yml @@ -24,6 +24,6 @@ jobs: - name: Publish packaged artifacts uses: actions/upload-artifact@v4 with: - name: spaghetti-mac-x64 + name: spaghetti-mac-universal path: spaghetti-release retention-days: 1 diff --git a/CMakeLists.txt b/CMakeLists.txt index f13562555..f77ecf401 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,9 @@ endif() # Set the minimum version of CMake and the deployment target for macOS set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version") +# Set CMake to build as Universal Binary for macOS +set(CMAKE_OSX_ARCHITECTURES=arm64;x86_64) + # Set the C++ standard and enable the MSVC parallel build option set(CMAKE_CXX_STANDARD 20 CACHE STRING "The C++ standard to use") set(CMAKE_C_STANDARD 11 CACHE STRING "The C standard to use") -- cgit v1.2.3