cmake: Explicitly use gcc-ar instead of ar for MXE builds

This commit is contained in:
OpenSauce04 2026-05-06 12:03:33 +01:00 committed by OpenSauce
parent 0ce2a30d20
commit 5ecd402811
2 changed files with 6 additions and 1 deletions

View File

@ -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()

View File

@ -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"