It may seem like Microsoft didn't know about Meson subprojects, and created vcpkg. But maybe it would be mutually beneficial if we could leverage their repository of cross-platform packages anyway.
I don't think it's possible without making too many assumptions (https://github.com/Microsoft/vcpkg/issues/3380) right now. Well, it is possible: Just git clone vcpkg in-place, so you know where it will install the files to…
It would be great getting these tools working together.
Finally, this should be possible now!
I have a proof of concept. Via a new wrap file type (wrap-vcpkg), I now have meson able to invoke vcpkg and have it install a package of the name of the wrap file. I'm even able to persuade vcpkg (via a bunch of symlinks) to install into the build directory, if that's something we want.
But now, it feels like a pointless exercise, as the whole vcpkg ecosystem seems invested and infested with CMake. I haven't found any package that ships as much as a .pc file (let alone meson.build) necessary for making the package useful to meson.
Making use of any current vcpkg package would take more patching and effort than their upstream repositories. Vcpkg offers nothing!!
Time to give up?
This sounds like the same approach as https://github.com/mesonbuild/meson/pull/6920, it should be possible to do that independently to the underlying build system.
But now, it feels like a pointless exercise, as the whole vcpkg ecosystem seems invested and infested with CMake. I haven't found any package that ships as much as a .pc file (let alone meson.build) necessary for making the package useful to meson.
Well, if the upstream project which vcpkg wraps, produces a pkg-config file, then I'd hope vcpkg ensures it is installed. :/
Do you think the vcpkg developers would be interested in a suggestion to provide pkg-config integration in addition to cmake integration?
conan.io serves a similar role to vcpkg and seems to have better support and recommendation for pkg-config files.
Well, if the upstream project which vcpkg wraps produces a pkg-config file, then I'd hope vcpkg ensures it is installed. :/
Do you think the vcpkg developers would be interested in a suggestion to provide pkg-config integration in addition to cmake integration?
That was also my assumption, until I couldn't find any. But I found a couple of positively received requests:
And, as linked there, _fribidi_ and _freetype2_ (GTK dependency) are packages that now ship .pc files.
Most helpful comment
It would be great getting these tools working together.