From 6be4f7a3214bbcec8deb33a0c25414f54e016804 Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Wed, 31 Aug 2022 09:05:32 +0900 Subject: [PATCH] CMake: Use FindPatch CMake's built-in FindPatch will look in the Git installation directory on Windows, eliminating the need for Windows users to modify PATH. See https://github.com/Kitware/CMake/blob/master/Modules/FindPatch.cmake --- 3rdParty/discord/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/3rdParty/discord/CMakeLists.txt b/3rdParty/discord/CMakeLists.txt index c7cd33dce..917543384 100644 --- a/3rdParty/discord/CMakeLists.txt +++ b/3rdParty/discord/CMakeLists.txt @@ -1,10 +1,12 @@ include(functions/FetchContent_MakeAvailableExcludeFromAll) include(FetchContent) +find_package(Patch REQUIRED) + FetchContent_Declare(discordsrc URL https://dl-game-sdk.discordapp.net/2.5.6/discord_game_sdk.zip URL_HASH MD5=f86f15957cc9fbf04e3db10462027d58 - PATCH_COMMAND patch -p0 < "${CMAKE_CURRENT_LIST_DIR}/fix-types-h.patch" + PATCH_COMMAND "${Patch_EXECUTABLE}" -p0 -N < "${CMAKE_CURRENT_LIST_DIR}/fix-types-h.patch" || true ) FetchContent_MakeAvailableExcludeFromAll(discordsrc)