StephanTLavavej / mingw-distro

MinGW distro build scripts.
492 stars 55 forks source link

Consider adding vcpkg #74

Closed StephanTLavavej closed 2 years ago

StephanTLavavej commented 4 years ago

Adding vcpkg would allow users to easily add additional libraries, instead of requesting them as part of the core distro.

cristianadam commented 4 years ago

https://github.com/microsoft/vcpkg/pull/9137 has the necessary changes to vcpkg, and it adds the tripplets, which would allow something like this to work:

set VCPKG_TARGET_TRIPLET=x64-mingw
vcpkg install zlib libpng double-conversion pcre2 freetype

and then you build your CMake project like:

cmake -GNinja ^
  -DVCPKG_TARGET_TRIPLET=x64-mingw ^
  -DCMAKE_TOOLCHAIN_FILE=c:/Projects/github/vcpkg/scripts/buildsystems/vcpkg.cmake
cristianadam commented 4 years ago

I tested the above with the standalone toolchain from https://gcc-mcf.lhmouse.com/.

cristianadam commented 4 years ago

I've updated my https://github.com/microsoft/vcpkg/pull/9137 and #72 is no longer blocking. Two tests are failing, but I was able to do a:

vcpkg install zlib:x64-mingw
StephanTLavavej commented 4 years ago

This has been merged upstream, so I should be able to add vcpkg to the distro now.

StephanTLavavej commented 2 years ago

Now that I have slightly more experience with vcpkg, I don't believe that adding vcpkg.exe to the distro would be useful.

What users need to do is use vcpkg as a submodule, bootstrap it, and then they can build current versions of their desired libraries ("ports") corresponding to their submodule commit.