From 8f2288c88ac212e58e40e3f8c744874051d7b78e Mon Sep 17 00:00:00 2001 From: Agent X <44549182+Agent-11@users.noreply.github.com> Date: Sat, 6 Jan 2024 09:48:58 -0500 Subject: [PATCH] Fix macOS ARM compilation --- Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0f10b074..9ccd2f59 100644 --- a/Makefile +++ b/Makefile @@ -386,8 +386,6 @@ endif ifeq ($(OSX_BUILD),0) USE_APP := 0 -else ifeq ($(shell uname -m),arm64) - DISCORD_SDK := 0 endif # Whether to hide commands or not @@ -576,7 +574,11 @@ ifeq ($(DISCORD_SDK), 1) # HACKY! Instead of figuring out all of the dynamic library linking madness... # I copied the library and gave it two names. # This really shouldn't be required, but I got tired of trying to do it the "right way" - DISCORD_SDK_LIBS := lib/discordsdk/discord_game_sdk.dylib lib/discordsdk/libdiscord_game_sdk.dylib + ifeq ($(shell uname -m),arm64) # A hacky way of determining if the user is running on Apple Silicon hardware + DISCORD_SDK_LIBS := lib/discordsdk/aarch64/discord_game_sdk.dylib lib/discordsdk/aarch64/libdiscord_game_sdk.dylib + else + DISCORD_SDK_LIBS := lib/discordsdk/discord_game_sdk.dylib lib/discordsdk/libdiscord_game_sdk.dylib + endif else DISCORD_SDK_LIBS := lib/discordsdk/libdiscord_game_sdk.so endif