Add support for building with MinGW (#9137)

* Add support for building with MinGW

Tested with MSYS2 MinGW 8.3.0, gcc-mcf.lhmouse MinGW 9.2.1,
and StephanTLavavej/mingw-distro!

* Add MinGW toolchain

From your MinGW configured shell you could just use vcpkg to
configure packages.

An x64-mingw triplet would look like:
```
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_ENV_PASSTHROUGH PATH)

set(VCPKG_CMAKE_SYSTEM_NAME MinGW)
```

* Add MinGW community tripplets

x64 tested with https://github.com/StephanTLavavej/mingw-distro
x86, arm64, arm tested with https://github.com/mstorsjo/llvm-mingw
This commit is contained in:
Cristian Adam
2020-01-18 00:36:08 +01:00
committed by Victor Romero
parent f56645c3fd
commit 38b959022c
15 changed files with 148 additions and 21 deletions

4
.gitignore vendored
View File

@@ -294,8 +294,12 @@ __pycache__/
#ignore custom triplets
/triplets/*
#add vcpkg-designed triplets back in
!triplets/community/arm64-mingw.cmake
!triplets/community/arm64-uwp.cmake
!triplets/community/arm-mingw.cmake
!triplets/community/arm-windows.cmake
!triplets/community/x64-mingw.cmake
!triplets/community/x86-mingw.cmake
!triplets/community/x86-uwp.cmake
!triplets/community/x86-windows-static.cmake
!triplets/arm-uwp.cmake