From 422c7865a3b3afe3dabc766e5ffbe10204bcbbd8 Mon Sep 17 00:00:00 2001 From: OpenSauce04 Date: Wed, 15 Apr 2026 20:42:59 +0100 Subject: [PATCH] For Linux --> Windows cross-compilation, copy all cross-compiled DLLs during build As per the comment, this is just to get the build functioning pending a real solution --- src/citra_meta/CMakeLists.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/citra_meta/CMakeLists.txt b/src/citra_meta/CMakeLists.txt index b19238a9c..fc589f5f1 100644 --- a/src/citra_meta/CMakeLists.txt +++ b/src/citra_meta/CMakeLists.txt @@ -48,6 +48,22 @@ if (APPLE) endif() endif() +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND WIN32 AND MINGW) + # TODO: This is placeholder bullshit, we need to find out a way to do actual dependency resolution. + # Can we use Wine maybe? -OS + set(EXTRA_LIBS /mxe/usr/x86_64-w64-mingw32.shared/bin/*.dll ) + add_custom_command(TARGET citra_meta POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy $ ${EXTRA_LIBS} $ + COMMAND ${CMAKE_COMMAND} -E make_directory "$/plugins/" + COMMAND ${CMAKE_COMMAND} -E copy_directory /mxe/usr/x86_64-w64-mingw32.shared/qt6/plugins/ "$/plugins/" + COMMAND_EXPAND_LISTS + ) + add_custom_command(TARGET citra_meta POST_BUILD + COMMAND_EXPAND_LISTS + ) + unset(EXTRA_LIBS) +endif() + target_link_libraries(citra_meta PRIVATE citra_common fmt) if (ENABLE_QT)