Issue
We have some libraries written in Visual Studio that we would like to share with other projects in different solutions in different repos.
I liked the idea of using an internal vcpkg
registry to distribute those libraries to those other solutions/projects.
My concern here is that the libraries we'd like to share are vcxproj
projects, and I believe vcpkg
requires "ports" (packages) to be Cmake
projects.
Is my understanding correct? If we want to expose those libraries via an internal vcpkg
registry we'd have to convert those projects to Cmake
projects?
Solution
Vcpkg has built-in support for wrapping MSBuild (ie. sln/vcxproj) projects. See the function vcpkg_install_msbuild
Many projects still use the deprecated vcpkg_build_msbuild
, though.
Using git grep
I can find a few portfiles that will work as examples:
- gsoap: https://github.com/microsoft/vcpkg/tree/master/ports/gsoap
- winpcap: https://github.com/microsoft/vcpkg/tree/master/ports/winpcap
- unrar: https://github.com/microsoft/vcpkg/tree/master/ports/unrar
- libfabric: https://github.com/microsoft/vcpkg/tree/master/ports/libfabric (this one uses the new helper)
Answered By - Alex Reinking Answer Checked By - Pedro (WPSolving Volunteer)