diff --git a/build/cmake/init.cmake b/build/cmake/init.cmake index b0f7558ceb..b369e06b87 100644 --- a/build/cmake/init.cmake +++ b/build/cmake/init.cmake @@ -43,7 +43,11 @@ if(MSVC) endif() elseif(CMAKE_COMPILER_IS_GNUCC) if(wxBUILD_USE_STATIC_RUNTIME) - set(STATIC_LINKER_FLAGS " -static-libgcc -static-libstdc++") + if(MINGW) + set(STATIC_LINKER_FLAGS " -static -Wl,--allow-multiple-definition") + else() + set(STATIC_LINKER_FLAGS " -static-libgcc -static-libstdc++") + endif() wx_string_append(CMAKE_EXE_LINKER_FLAGS "${STATIC_LINKER_FLAGS}") wx_string_append(CMAKE_SHARED_LINKER_FLAGS "${STATIC_LINKER_FLAGS}") endif()