Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CMake build on Apple Silicon #14

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/CMake-macOS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: CMake macOS

on: push

jobs:
build:
strategy:
matrix:
os: [macos-latest, macos-13]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install ninja & yasm
run: brew install ninja yasm
- name: Configure (CMake)
run: |
cmake -S ports/cmake -B build -GNinja
- name: Build (CMake)
run: |
cmake --build build
8 changes: 7 additions & 1 deletion ports/cmake/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,13 @@ if(NO_MESSAGES)
set(NO_ERETURN ON)
endif()

if(WIN32)
include(../cmake/CheckCPUArch.cmake)
check_cpu_arch_x86(ARCH_IS_X86)
check_cpu_arch_x64(ARCH_IS_X64)
check_cpu_arch_arm32(ARCH_IS_ARM32)
check_cpu_arch_arm64(ARCH_IS_ARM64)

if(WIN32 OR (ARCH_IS_ARM64 AND APPLE))
set(HAVE_FPU 1)
else()
cmake_host_system_information(RESULT HAVE_FPU QUERY HAS_FPU)
Expand Down
6 changes: 0 additions & 6 deletions ports/cmake/src/libmpg123/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ endif()

include_directories("${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/libmpg123/")

include(../../cmake/CheckCPUArch.cmake)

if(HAVE_STDLIB_H)
set(INCLUDE_STDLIB_H "#include <stdlib.h>")
else()
Expand All @@ -21,10 +19,6 @@ else()
endif()


check_cpu_arch_x86(ARCH_IS_X86)
check_cpu_arch_x64(ARCH_IS_X64)
check_cpu_arch_arm32(ARCH_IS_ARM32)
check_cpu_arch_arm64(ARCH_IS_ARM64)

# PPC with AltiVec is missing. But probably obsolete enough for CMake users.

Expand Down
Loading