THRIFT-2850 CMake: mingw32-toolchain, set static linker flags
fixes: libgcc_s dependencies on Windows
Now we have an installer and the compiler as executable
diff --git a/build/cmake/mingw32-toolchain.cmake b/build/cmake/mingw32-toolchain.cmake
index 0fc1efa..864c0eb 100644
--- a/build/cmake/mingw32-toolchain.cmake
+++ b/build/cmake/mingw32-toolchain.cmake
@@ -17,3 +17,8 @@
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+
+set(BUILD_SHARED_LIBS OFF)
+SET(CMAKE_EXE_LINKER_FLAGS "-static")
+set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} "-static-libgcc")
+set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-static-libstdc++")