16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 01:59:19 +02:00

Add macOS ARM64 build support

Three small source tweaks that let the OpenGL renderer build and run
on Apple Silicon without affecting the Windows/Linux paths:

- stdafx.h: use GLM_FORCE_NEON on ARM64 instead of GLM_FORCE_AVX2.
  AVX2 pulls <immintrin.h>, which clang on ARM64 rejects because
  the x86 intrinsics are unimplemented.
- utilities/utilities.cpp: provide an Apple libc++ fallback for
  Now() using localtime_r + strftime, since
  std::chrono::current_zone() is not yet implemented there.
- audio/audio.h: prefer Khronos-style <AL/al.h> headers when they
  are on the include path (brew openal-soft) and fall back to the
  deprecated Apple OpenAL.framework's <OpenAL/al.h> only otherwise.
This commit is contained in:
Mateusz Włodarczyk
2026-05-19 10:45:18 +02:00
parent df5a8a897f
commit dd412894bb
3 changed files with 14 additions and 1 deletions

View File

@@ -89,7 +89,11 @@
#define glfwFocusWindow(w)
#endif
#if defined(__aarch64__) || defined(__arm64__)
#define GLM_FORCE_NEON
#else
#define GLM_FORCE_AVX2
#endif
#define GLM_FORCE_SWIZZLE
#define GLM_ENABLE_EXPERIMENTAL
#define GLM_FORCE_CTOR_INIT