arm mac platform

This commit is contained in:
qimiko 2024-06-01 20:05:54 -07:00
parent 2c6ffb6bdf
commit 888f6e8dac
No known key found for this signature in database
GPG key ID: D2D404DD810FE0E3
2 changed files with 14 additions and 4 deletions
cmake
loader/include/Geode/platform

View file

@ -17,12 +17,8 @@ if (GEODE_TARGET_PLATFORM STREQUAL "iOS")
elseif (GEODE_TARGET_PLATFORM STREQUAL "MacOS")
set_target_properties(${PROJECT_NAME} PROPERTIES
SYSTEM_NAME MacOS
APPLE_SILICON_PROCESSOR x86_64
)
# this should be set globally
set(CMAKE_OSX_ARCHITECTURES "x86_64")
# only exists as a global property
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.15)

View file

@ -39,6 +39,8 @@
#include <TargetConditionals.h>
#if TARGET_OS_IPHONE
#define GEODE_MACOS(...)
#define GEODE_INTEL_MAC(...)
#define GEODE_ARM_MAC(...)
#define GEODE_IOS(...) __VA_ARGS__
#define GEODE_IS_IOS
#define GEODE_IS_MOBILE
@ -55,11 +57,23 @@
#define GEODE_PLATFORM_EXTENSION ".dylib"
#define GEODE_PLATFORM_SHORT_IDENTIFIER "mac"
#define CC_TARGET_OS_MAC
#if TARGET_CPU_ARM64
#define GEODE_IS_ARM_MAC
#define GEODE_ARM_MAC(...) __VA_ARGS__
#define GEODE_INTEL_MAC(...)
#else
#define GEODE_IS_INTEL_MAC
#define GEODE_ARM_MAC(...)
#define GEODE_INTEL_MAC(...) __VA_ARGS__
#endif
#endif
#define GEODE_CALL
#else
#define GEODE_MACOS(...)
#define GEODE_IOS(...)
#define GEODE_INTEL_MAC(...)
#define GEODE_ARM_MAC(...)
#endif
// Android