vcpkg is a package manager for C and C++ by Microsoft, you can easily pick up hundreds of open source libraries and use it in your project with no worry about dependencies, building, compiling, or adding path. What’s more, you can export these libraries as zip, update, upgrade or remove it with one command.
To get start to use it, all you need is clone the repo from Github.
In windows, click on bootstrap-vcpkg.bat file, vcpkg.exe will be generated.
In Linux, run ./bootstrap-vcpkg.sh, it will download its requirements.
You can search for your favorite library with:
$ ./vcpkg search fmt fmt 5.1.0 Formatting library for C++. It can be used as a safe alternative to printf or ...
if the library you looking for not listed, you may open an issue on Github. The community is pretty fast and helpful.
You can install it:
$ ./vcpkg install fmt
You can integrate install to your development environment:
$ ./vcpkg integrate install
Now you can use the library headers in your project.
You may want to add vcpkg executable to path with:
echo 'export PATH=/path/to/vcpkg:$PATH' >> ~/.bashrc
To get latest library definitions and avoid possible bugs, don’t forget to go vcpkg root and shot a git pull :))