Skip to content

Commit

Permalink
cmake: build SDL2_ttf.dll with -static-libgcc when using MinGW toolchain
Browse files Browse the repository at this point in the history
This avoids a runtime dependency on libgcc_x_seh-1.dll (or a similarly named library)

(cherry picked from commit 3091df3)
  • Loading branch information
madebr authored and sezero committed Jan 4, 2025
1 parent c695524 commit 9d90ae6
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
Expand Up @@ -109,6 +109,9 @@ if(WIN32 AND SDL2TTF_BUILD_SHARED_LIBS)
target_sources(SDL2_ttf PRIVATE
version.rc
)
if(MINGW)
target_link_options(SDL2_ttf PRIVATE -static-libgcc)
endif()
endif()
set_target_properties(SDL2_ttf PROPERTIES
DEFINE_SYMBOL DLL_EXPORT
Expand Down

0 comments on commit 9d90ae6

Please sign in to comment.