Skip to content

Commit

Permalink
cmake: build SDL3_image.dll with -static-libgcc using a MingW toolchain
Browse files Browse the repository at this point in the history
This avoids a runtime dependency on libgcc_s_seh-1.dll (or a similarly named library).
madebr committed Jan 3, 2025
1 parent 979f017 commit fd53ea2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -299,6 +299,9 @@ if(WIN32 AND SDLIMAGE_BUILD_SHARED_LIBS)
target_sources(${sdl3_image_target_name} PRIVATE
src/version.rc
)
if(MINGW)
target_link_options(${sdl3_image_target_name} PRIVATE -static-libgcc)
endif()
endif()
set_target_properties(${sdl3_image_target_name} PROPERTIES
OUTPUT_NAME "SDL3_image"

0 comments on commit fd53ea2

Please sign in to comment.