diff Resources/CMake/Compiler.cmake @ 495:5bb96a6100c0

fixes for mingw64
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 19 Jul 2013 16:11:13 +0200
parents a1b9d1e1497b
children b2b56b4e33b0
line wrap: on
line diff
--- a/Resources/CMake/Compiler.cmake	Wed Jul 17 13:45:28 2013 +0200
+++ b/Resources/CMake/Compiler.cmake	Fri Jul 19 16:11:13 2013 +0200
@@ -74,6 +74,12 @@
     -D_CRT_SECURE_NO_WARNINGS=1
     )
   link_libraries(rpcrt4 ws2_32)
+
+  if (${CMAKE_COMPILER_IS_GNUCXX})
+    # This is a patch for MinGW64
+    SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--allow-multiple-definition -static-libgcc -static-libstdc++")
+  endif()
+
 endif()