Fix macOS ARM compilation

This commit is contained in:
Agent X 2024-01-06 09:48:58 -05:00
parent 8939bdba3b
commit 8f2288c88a

View file

@ -386,8 +386,6 @@ endif
ifeq ($(OSX_BUILD),0) ifeq ($(OSX_BUILD),0)
USE_APP := 0 USE_APP := 0
else ifeq ($(shell uname -m),arm64)
DISCORD_SDK := 0
endif endif
# Whether to hide commands or not # 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... # HACKY! Instead of figuring out all of the dynamic library linking madness...
# I copied the library and gave it two names. # 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" # 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 else
DISCORD_SDK_LIBS := lib/discordsdk/libdiscord_game_sdk.so DISCORD_SDK_LIBS := lib/discordsdk/libdiscord_game_sdk.so
endif endif