Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix windows x86 discord integration #6893

Merged
merged 1 commit into from
Jan 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions 3rdParty/discord/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,21 @@ include(FetchContent)

find_package(Patch REQUIRED)

FetchContent_Declare(discordsrc
URL https://dl-game-sdk.discordapp.net/3.2.1/discord_game_sdk.zip
URL_HASH MD5=73e5e1b3f8413a2c7184ef17476822f2
PATCH_COMMAND "${Patch_EXECUTABLE}" -p1 -N < "${CMAKE_CURRENT_LIST_DIR}/fixes.patch" || true
)
set(Discord_SDK_URL "https://dl-game-sdk.discordapp.net/3.2.1/discord_game_sdk.zip")
set(Discord_SDK_HASH "73e5e1b3f8413a2c7184ef17476822f2")

if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
FetchContent_Declare(discordsrc
URL ${Discord_SDK_URL}
URL_HASH MD5=${Discord_SDK_HASH}
)
else()
FetchContent_Declare(discordsrc
URL ${Discord_SDK_URL}
URL_HASH MD5=${Discord_SDK_HASH}
PATCH_COMMAND "${Patch_EXECUTABLE}" -p1 -N < "${CMAKE_CURRENT_LIST_DIR}/fixes.patch" || true
)
endif()
FetchContent_MakeAvailableExcludeFromAll(discordsrc)

file(GLOB discord_SRCS ${discordsrc_SOURCE_DIR}/cpp/*.cpp)
Expand Down