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 <noreply@anthropic.com>
This commit is contained in:
Pacuka
2026-09-26 11:15:16 +02:00
parent 223777d3df
commit c6f2d98fdd
+3
View File
@@ -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)