From e0ad857a2d972c7b162b7764670300bec77e7056 Mon Sep 17 00:00:00 2001 From: Deamhan Date: Wed, 10 Jul 2019 11:30:31 +0300 Subject: [PATCH] CMake: MinGW multiple definition issue has been fixed (wxBUILD_USE_STATIC_RUNTIME) --- build/cmake/init.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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()