From 71c1eff69b28e3c92c74bbffbf661885114f5986 Mon Sep 17 00:00:00 2001 From: Simon Rodriguez Date: Tue, 5 Sep 2023 00:22:56 +0200 Subject: [PATCH] macOS: force universal binary release (#145) Using universal dependencies (ffmpeg). --- .github/workflows/CI.yml | 2 +- .github/workflows/release.yml | 6 +++--- CMakeLists.txt | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a639d2c..70ef803 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -16,7 +16,7 @@ jobs: - os: windows-2019 cmake-opts: -A x64 - os: macos-11 - cmake-opts: + cmake-opts: -G Xcode runs-on: ${{ matrix.os }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5a2b6bb..ca10573 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,10 +22,10 @@ jobs: asset_name: MIDIVisualizer-windows-64bits.zip ffmpeg-archive: ffmpeg-windows-64-static-lgpl.zip - os: macos-11 - cmake-opts: - artifact_name: build/MIDIVisualizer.app + cmake-opts: -G Xcode + artifact_name: build/Release/MIDIVisualizer.app asset_name: MIDIVisualizer-macos.zip - ffmpeg-archive: ffmpeg-osx-64-static-lgpl.zip + ffmpeg-archive: ffmpeg-osx-uni64-static-lgpl.zip runs-on: ${{ matrix.os }} diff --git a/CMakeLists.txt b/CMakeLists.txt index 2287722..a3bee32 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,8 @@ cmake_minimum_required(VERSION 3.8) + +# macOS specific settings (force Universal binary) set(CMAKE_OSX_DEPLOYMENT_TARGET "10.12" CACHE STRING "Minimum OS X deployment version") +set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD)" CACHE STRING "" FORCE) project(MIDIVisualizer) set(CMAKE_CXX_STANDARD 11)