mirror of
https://git.citron-emu.org/citron/emulator
synced 2025-12-19 02:33:32 +00:00
add: Discord-RPC warning patch
This commit is contained in:
@@ -461,6 +461,30 @@ else()
|
||||
message(WARNING "Could not find stb_image.h to patch. It may not have been downloaded yet.")
|
||||
endif()
|
||||
|
||||
# Apply a patch to discord-rpc's CMakeLists.txt to suppress -Wclass-memaccess
|
||||
message(STATUS "Applying custom patch to submodule's discord-rpc CMakeLists.txt...")
|
||||
|
||||
# Define the path to the patch file and the target directory using unique names
|
||||
set(DISCORD_RPC_PATCH_FILE "${CMAKE_CURRENT_SOURCE_DIR}/patches/discord-rpc-wclass-memaccess-fix.patch")
|
||||
set(DISCORD_RPC_PATCH_TARGET_DIR "${CMAKE_CURRENT_SOURCE_DIR}/externals/discord-rpc")
|
||||
|
||||
# Check if the target directory exists before trying to patch
|
||||
if(EXISTS "${DISCORD_RPC_PATCH_TARGET_DIR}")
|
||||
execute_process(
|
||||
COMMAND git apply --ignore-whitespace "${DISCORD_RPC_PATCH_FILE}"
|
||||
WORKING_DIRECTORY "${DISCORD_RPC_PATCH_TARGET_DIR}"
|
||||
RESULT_VARIABLE PATCH_RESULT
|
||||
OUTPUT_QUIET
|
||||
ERROR_QUIET
|
||||
)
|
||||
|
||||
if(NOT PATCH_RESULT EQUAL 0)
|
||||
message(WARNING "Failed to apply discord-rpc CMakeLists.txt patch! This might be okay if it's already applied.")
|
||||
endif()
|
||||
else()
|
||||
message(WARNING "Could not find discord-rpc directory to patch. It may not have been downloaded yet.")
|
||||
endif()
|
||||
|
||||
if (ENABLE_QT)
|
||||
if (NOT USE_SYSTEM_QT)
|
||||
download_qt(6.7.3)
|
||||
|
||||
Reference in New Issue
Block a user