Skip to content

Commit

Permalink
Win32: Disable dynamic libgcc for MinGW DLL
Browse files Browse the repository at this point in the history
  • Loading branch information
elmindreda committed Oct 3, 2019
1 parent 243b1bc commit 3ec8f4a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ target_compile_options(glfw PRIVATE
if (BUILD_SHARED_LIBS)
if (WIN32)
if (MINGW)
# Remove the dependency on the shared version of libgcc
# NOTE: MinGW-w64 has the correct default but MinGW needs this
target_link_options(glfw PRIVATE "-static-libgcc")

# Remove the lib prefix on the DLL (but not the import library)
set_target_properties(glfw PROPERTIES PREFIX "")

Expand Down

0 comments on commit 3ec8f4a

Please sign in to comment.