From 80669ee317a0290e4b571c1302250c3f13a46540 Mon Sep 17 00:00:00 2001 From: kimci86 Date: Fri, 17 May 2024 19:22:01 +0200 Subject: [PATCH] Add CI job to build for both x64 and arm64 macOS --- .github/workflows/ci.yml | 11 ++++++++++- CMakeLists.txt | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ecddc24..cfee350 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,16 @@ jobs: matrix: platform: - { name: Ubuntu, os: ubuntu-latest } - - { name: MacOS, os: macos-latest } + - { + name: macOS x64, + os: macos-latest, + cmake-config: -DCMAKE_APPLE_SILICON_PROCESSOR=x86_64, + } + - { + name: macOS arm64, + os: macos-latest, + cmake-config: -DCMAKE_APPLE_SILICON_PROCESSOR=arm64, + } - { name: Windows 64-bit, os: windows-latest, cmake-config: -A x64 } - { name: Windows 32-bit, os: windows-latest, cmake-config: -A Win32 } diff --git a/CMakeLists.txt b/CMakeLists.txt index f66276b..8fffc80 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,4 +54,7 @@ if(WIN32) else() set(CPACK_GENERATOR "TGZ") endif() +if(APPLE) + set(CPACK_SYSTEM_NAME "macOS-${CMAKE_HOST_SYSTEM_PROCESSOR}") +endif() include(CPack)