From 38b959022cec1b865489d97a697eda84b49cc4e5 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Sat, 18 Jan 2020 00:36:08 +0100 Subject: 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 --- scripts/templates/portfile.in.cmake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'scripts/templates') diff --git a/scripts/templates/portfile.in.cmake b/scripts/templates/portfile.in.cmake index 62c53a6db..7ddf662e8 100644 --- a/scripts/templates/portfile.in.cmake +++ b/scripts/templates/portfile.in.cmake @@ -22,11 +22,12 @@ # VCPKG_TARGET_IS_OSX # VCPKG_TARGET_IS_FREEBSD # VCPKG_TARGET_IS_ANDROID +# VCPKG_TARGET_IS_MINGW # VCPKG_TARGET_EXECUTABLE_SUFFIX # VCPKG_TARGET_STATIC_LIBRARY_SUFFIX # VCPKG_TARGET_SHARED_LIBRARY_SUFFIX # -# See additional helpful variables in /docs/maintainers/vcpkg_common_definitions.md +# See additional helpful variables in /docs/maintainers/vcpkg_common_definitions.md # # Specifies if the port install should fail immediately given a condition # vcpkg_fail_port_install(MESSAGE "@PORT@ currently only supports Linux and Mac platforms" ON_TARGET "Windows") @@ -39,10 +40,10 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} + ARCHIVE ${ARCHIVE} # (Optional) A friendly name to use instead of the filename of the archive (e.g.: a version number or tag). # REF 1.0.0 - # (Optional) Read the docs for how to generate patches at: + # (Optional) Read the docs for how to generate patches at: # https://github.com/Microsoft/vcpkg/blob/master/docs/examples/patching.md # PATCHES # 001_port_fixes.patch -- cgit v1.2.3