From 5ecd402811e1c36c596aed3b3eb4b2f414e9ac3f Mon Sep 17 00:00:00 2001 From: OpenSauce04 Date: Wed, 6 May 2026 12:03:33 +0100 Subject: [PATCH] cmake: Explicitly use `gcc-ar` instead of `ar` for MXE builds --- CMakeLists.txt | 5 +++++ src/citra_meta/CMakeLists.txt | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6bfebe132..42664571b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,11 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR CMAKE_SYSTEM_NAME STREQUAL "iOS") enable_language(OBJC OBJCXX) endif() +if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND MINGW) + string(TOLOWER ${LIBTYPE} LIBTYPE_LOWER) + set(CMAKE_AR x86_64-w64-mingw32.${LIBTYPE_LOWER}-gcc-ar) +endif() + if (BSD STREQUAL "OpenBSD") add_link_options(-z wxneeded) endif() diff --git a/src/citra_meta/CMakeLists.txt b/src/citra_meta/CMakeLists.txt index baffd0639..a2398b5d6 100644 --- a/src/citra_meta/CMakeLists.txt +++ b/src/citra_meta/CMakeLists.txt @@ -48,7 +48,7 @@ if (APPLE) endif() endif() -if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND WIN32 AND MINGW) +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND MINGW) # TODO: Do this for all executables, not just citra_meta # TODO: Don't hardcode MXE directory to root? set(dllwalker_command "${CMAKE_SOURCE_DIR}/externals/dllwalker/dllwalker.rb"