Skip to content

Commit

Permalink
Fixes per review
Browse files Browse the repository at this point in the history
  • Loading branch information
tresf committed May 30, 2024
1 parent df0011d commit 20e5b4f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,16 @@ jobs:
CCACHE_MAXSIZE: 500M
macos:
strategy:
fail-fast: false
matrix:
arch: [ x86_64, arm64 ]
include:
- arch: x86_64
os: macos-12
xcode: 13.1
xcode: "13.1"
- arch: arm64
os: macos-14
xcode: 14.3.1
xcode: "14.3.1"
name: macos-${{ matrix.arch }}
runs-on: ${{ matrix.os }}
env:
Expand Down Expand Up @@ -125,7 +126,6 @@ jobs:
-B build \
-DCMAKE_INSTALL_PREFIX="../target" \
-DCMAKE_PREFIX_PATH="$(brew --prefix qt@5)" \
-DCMAKE_APPLE_SILICON_PROCESSOR=${{ matrix.arch }} \
-DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} \
$CMAKE_OPTS \
-DUSE_WERROR=OFF
Expand Down
13 changes: 5 additions & 8 deletions cmake/apple/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,18 @@ CONFIGURE_FILE("lmms.plist.in" "${CMAKE_BINARY_DIR}/Info.plist")
CONFIGURE_FILE("install_apple.sh.in" "${CMAKE_BINARY_DIR}/install_apple.sh" @ONLY)
CONFIGURE_FILE("package_apple.json.in" "${CMAKE_BINARY_DIR}/package_apple.json" @ONLY)

IF(CMAKE_APPLE_SILICON_PROCESSOR)
# Target arch is provided to cmake (M-series only)
SET(DMG_ARCH "-${CMAKE_APPLE_SILICON_PROCESSOR}")
ELSEIF(CMAKE_OSX_ARCHITECTURES)
SET(DMG_ARCH "-${CMAKE_OSX_ARCHITECTURES}")
IF(CMAKE_OSX_ARCHITECTURES)
SET(DMG_ARCH "${CMAKE_OSX_ARCHITECTURES}")
ELSEIF(IS_ARM64)
# Target arch is host arch
SET(DMG_ARCH "-arm64")
SET(DMG_ARCH "arm64")
ELSE()
# Fallback to Intel
SET(DMG_ARCH "-x86_64")
SET(DMG_ARCH "x86_64")
ENDIF()

# DMG creation target
SET(DMG_FILE "${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}-mac${APPLE_OS_VER}${DMG_ARCH}.dmg")
SET(DMG_FILE "${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}-mac${APPLE_OS_VER}-${DMG_ARCH}.dmg")

FILE(REMOVE "${DMG_FILE}")
ADD_CUSTOM_TARGET(removedmg
Expand Down

0 comments on commit 20e5b4f

Please sign in to comment.