From c6f2d98fddf88ecadbff411582792958acfb75df Mon Sep 17 00:00:00 2001 From: Pacuka <69674426+Pacuka@users.noreply.github.com> Date: Sat, 26 Sep 2026 11:15:16 +0200 Subject: [PATCH] fix(build): configure bundled SDL2 without static executable linking Distributions without static X11 libraries (such as Arch-based ones) fail SDL2's X11 feature checks because the global -static linker flag also applies to its try_compile probes. Restore the flag after SDL2 is added. Co-Authored-By: Claude Opus 5.5 --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 98a1b94b4..8308a7613 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,10 @@ set(SDL_HAPTIC OFF CACHE BOOL "" FORCE) set(SDL_HIDAPI OFF CACHE BOOL "" FORCE) set(SDL_SENSOR OFF CACHE BOOL "" FORCE) set(SDL_STATIC_PIC ON CACHE BOOL "" FORCE) +set(ANYPS5_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}") +set(CMAKE_EXE_LINKER_FLAGS "") add_subdirectory(3rdparty/SDL2) +set(CMAKE_EXE_LINKER_FLAGS "${ANYPS5_EXE_LINKER_FLAGS}") add_subdirectory(core/shader/recompiler) add_subdirectory(core/libs)