mpg123: cmake: assume apple silicon CPU's have a FPU

From 5a09273541050480e84881426e84e619c629baa7 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Thu, 2 May 2024 00:57:31 +0200
Subject: [PATCH] cmake: assume apple silicon CPU's have a FPU

cmake_host_system_information returns false currently
---
 ports/cmake/src/CMakeLists.txt           | 8 +++++++-
 ports/cmake/src/libmpg123/CMakeLists.txt | 6 ------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/ports/cmake/src/CMakeLists.txt b/ports/cmake/src/CMakeLists.txt
index 5066ee3..d068e89 100644
--- a/ports/cmake/src/CMakeLists.txt
+++ b/ports/cmake/src/CMakeLists.txt
@@ -190,7 +190,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)
diff --git a/ports/cmake/src/libmpg123/CMakeLists.txt b/ports/cmake/src/libmpg123/CMakeLists.txt
index 4e9e34e..44e0ee0 100644
--- a/ports/cmake/src/libmpg123/CMakeLists.txt
+++ b/ports/cmake/src/libmpg123/CMakeLists.txt
@@ -5,8 +5,6 @@ option(NO_LFS_ALIAS "disable alias wrappers for largefile bitness (mpg123_seek_3
 
 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()
@@ -19,10 +17,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.