Skip to content

Commit 3da5b6d

Browse files
committed
cmake: build SDL3_net.dll with -static-libgcc using a MingW toolchain
This avoids a runtime dependency on libgcc_s_seh-1.dll (or a similarly named library).
1 parent 8dc3258 commit 3da5b6d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ if(WIN32)
131131
target_sources(${sdl3_net_target_name} PRIVATE
132132
src/version.rc
133133
)
134+
if(MINGW)
135+
target_link_options(${sdl3_net_target_name} PRIVATE -static-libgcc)
136+
endif()
134137
endif()
135138
target_link_libraries(${sdl3_net_target_name} PRIVATE iphlpapi ws2_32)
136139
list(APPEND PC_LIBS -liphlpapi -lws2_32)

0 commit comments

Comments
 (0)