Skip to content

Commit

Permalink
Fix windows x86 discord integration
Browse files Browse the repository at this point in the history
  • Loading branch information
obligaron authored and AJenbo committed Jan 10, 2024
1 parent b32cc11 commit 607737e
Showing 1 changed file with 15 additions and 5 deletions.
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

0 comments on commit 607737e

Please sign in to comment.