2024-07-03 09:42:09 -07:00
|
|
|
<!--
|
|
|
|
This document is a copy of the README file on the Microsoft/vcpkg-docs repository.
|
2020-07-07 10:53:14 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
To make changes modify this file instead:
|
|
|
|
https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/readme/vcpkg-README.md
|
|
|
|
-->
|
2020-07-07 10:53:14 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
[🌐 Read in a different language](https://learn.microsoft.com/locale/?target=https%3A%2F%2Flearn.microsoft.com%2Fvcpkg%2F)
|
2020-07-07 10:53:14 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
# vcpkg overview
|
2020-07-07 10:53:14 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
vcpkg is a free and open-source C/C++ package manager maintained by Microsoft
|
|
|
|
and the C++ community.
|
2020-07-07 10:53:14 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
Initially launched in 2016 as a tool for assisting developers in migrating their
|
|
|
|
projects to newer versions of Visual Studio, vcpkg has evolved into a
|
|
|
|
cross-platform tool used by developers on Windows, macOS, and Linux. vcpkg has a
|
|
|
|
large collection of open-source libraries and enterprise-ready features designed to
|
|
|
|
facilitate your development process with support for any build and project
|
|
|
|
systems. vcpkg is a C++ tool at heart and is written in C++ with scripts in
|
|
|
|
CMake. It is designed from the ground up to address the unique pain points C/C++
|
|
|
|
developers experience.
|
2020-07-07 10:53:14 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
This tool and ecosystem are constantly evolving, and we always appreciate
|
|
|
|
contributions! Learn how to start contributing with our [packaging
|
|
|
|
tutorial](https://learn.microsoft.com/vcpkg/get_started/get-started-adding-to-registry) and [maintainer
|
|
|
|
guide](https://learn.microsoft.com/vcpkg/contributing/maintainer-guide).
|
2020-07-07 10:53:14 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
# Get started
|
2020-07-07 10:53:14 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
First, follow one of our quick start guides.
|
2020-07-07 10:53:14 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
Whether you're using CMake, MSBuild, or any other build system, vcpkg has you covered:
|
2017-05-24 23:33:16 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
* [vcpkg with CMake](https://learn.microsoft.com/vcpkg/get_started/get-started)
|
|
|
|
* [vcpkg with MSBuild](https://learn.microsoft.com/vcpkg/get_started/get-started-msbuild)
|
|
|
|
* [vcpkg with other build systems](https://learn.microsoft.com/vcpkg/users/buildsystems/manual-integration)
|
2020-07-07 10:53:14 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
You can also use any editor:
|
2018-04-25 17:58:32 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
* [vcpkg with Visual Studio](https://learn.microsoft.com/vcpkg/get_started/get-started-vs)
|
2024-07-24 10:17:22 -07:00
|
|
|
* [vcpkg with Visual Studio Code](https://learn.microsoft.com/vcpkg/get_started/get-started-vscode)
|
2024-07-03 09:42:09 -07:00
|
|
|
* [vcpkg with
|
|
|
|
CLion](<https://www.jetbrains.com/help/clion/package-management.html>)
|
2024-07-24 10:17:22 -07:00
|
|
|
* [vcpkg with Qt Creator](<https://doc.qt.io/qtcreator/creator-vcpkg.html>)
|
2018-04-25 17:58:32 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
If a library you need is not present in the vcpkg registry, [open an issue on
|
|
|
|
the GitHub repository][contributing:submit-issue] or [contribute the package
|
|
|
|
yourself](https://learn.microsoft.com/vcpkg/get_started/get-started-adding-to-registry).
|
2018-04-25 17:58:32 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
After you've gotten vcpkg installed and working, you may wish to [add
|
|
|
|
tab completion to your terminal](https://learn.microsoft.com/vcpkg/commands/integrate#vcpkg-autocompletion).
|
2020-07-07 10:53:14 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
# Use vcpkg
|
2020-07-07 10:53:14 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
Create a [manifest for your project's dependencies](https://learn.microsoft.com/vcpkg/consume/manifest-mode):
|
2020-07-07 10:53:14 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
```Console
|
|
|
|
vcpkg new --application
|
|
|
|
vcpkg add port fmt
|
2020-07-07 10:53:14 -07:00
|
|
|
```
|
2017-12-04 17:01:16 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
Or [install packages through the command line](https://learn.microsoft.com/vcpkg/consume/classic-mode):
|
2020-07-07 10:53:14 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
```Console
|
|
|
|
vcpkg install fmt
|
2020-07-07 10:53:14 -07:00
|
|
|
```
|
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
Then use one of our available integrations for
|
|
|
|
[CMake](https://learn.microsoft.com/vcpkg/concepts/build-system-integration#cmake-integration),
|
|
|
|
[MSBuild](https://learn.microsoft.com/vcpkg/concepts/build-system-integration#msbuild-integration) or
|
|
|
|
[other build
|
|
|
|
systems](https://learn.microsoft.com/vcpkg/concepts/build-system-integration#manual-integration).
|
2020-07-07 10:53:14 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
For a short description of all available commands, run `vcpkg help`.
|
|
|
|
Run `vcpkg help [topic]` for details on a specific topic.
|
2020-07-07 10:53:14 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
# Key features
|
2016-09-18 20:50:08 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
vcpkg offers powerful features for your package management needs:
|
2017-06-06 11:40:47 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
* [easily integrate with your build system](https://learn.microsoft.com/vcpkg/concepts/build-system-integration)
|
|
|
|
* [control the versions of your dependencies](https://learn.microsoft.com/vcpkg/users/versioning)
|
|
|
|
* [package and publish your own packages](https://learn.microsoft.com/vcpkg/concepts/registries)
|
|
|
|
* [reuse your binary artifacts](https://learn.microsoft.com/vcpkg/users/binarycaching)
|
|
|
|
* [enable offline scenarios with asset caching](https://learn.microsoft.com/vcpkg/concepts/asset-caching)
|
2016-09-18 20:50:08 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
# Contribute
|
2020-07-07 10:53:14 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
vcpkg is an open source project, and is thus built with your contributions. Here
|
|
|
|
are some ways you can contribute:
|
2020-07-07 10:53:14 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
* [Submit issues][contributing:submit-issue] in vcpkg or existing packages
|
|
|
|
* [Submit fixes and new packages][contributing:submit-pr]
|
2016-09-18 20:50:08 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
Please refer to our [mantainer guide](https://learn.microsoft.com/vcpkg/contributing/maintainer-guide) and
|
|
|
|
[packaging tutorial](https://learn.microsoft.com/vcpkg/get_started/get-started-packaging) for more details.
|
2016-09-18 20:50:08 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
This project has adopted the [Microsoft Open Source Code of
|
|
|
|
Conduct][contributing:coc]. For more information see the [Code of Conduct
|
|
|
|
FAQ][contributing:coc-faq] or email
|
|
|
|
[opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional
|
|
|
|
questions or comments.
|
|
|
|
|
2020-07-07 10:53:14 -07:00
|
|
|
[contributing:submit-issue]: https://github.com/microsoft/vcpkg/issues/new/choose
|
|
|
|
[contributing:submit-pr]: https://github.com/microsoft/vcpkg/pulls
|
|
|
|
[contributing:coc]: https://opensource.microsoft.com/codeofconduct/
|
|
|
|
[contributing:coc-faq]: https://opensource.microsoft.com/codeofconduct/
|
2024-07-03 09:42:09 -07:00
|
|
|
|
|
|
|
# Resources
|
|
|
|
|
|
|
|
* Ports: [Microsoft/vcpkg](<https://github.com/microsoft/vcpkg>)
|
|
|
|
* Source code: [Microsoft/vcpkg-tool](<https://github.com/microsoft/vcpkg-tool>)
|
|
|
|
* Docs: [Microsoft Learn | vcpkg](https://learn.microsoft.com/vcpkg)
|
|
|
|
* Website: [vcpkg.io](<https://vcpkg.io>)
|
|
|
|
* Email: [vcpkg@microsoft.com](<mailto:vcpkg@microsoft.com>)
|
|
|
|
* Discord: [\#include \<C++\>'s Discord server](<https://www.includecpp.org>), in the #🌏vcpkg channel
|
|
|
|
* Slack: [C++ Alliance's Slack server](<https://cppalliance.org/slack/>), in the #vcpkg channel
|
2016-09-18 20:50:08 -07:00
|
|
|
|
2020-07-07 10:53:14 -07:00
|
|
|
# License
|
2016-09-18 20:50:08 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
The code in this repository is licensed under the MIT License. The libraries
|
|
|
|
provided by ports are licensed under the terms of their original authors. Where
|
|
|
|
available, vcpkg places the associated license(s) in the location
|
|
|
|
[`installed/<triplet>/share/<port>/copyright`](https://learn.microsoft.com/vcpkg/contributing/maintainer-guide#install-copyright-file).
|
2022-01-06 14:39:03 -07:00
|
|
|
|
|
|
|
# Security
|
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
Most ports in vcpkg build the libraries in question using the original build
|
|
|
|
system preferred by the original developers of those libraries, and download
|
|
|
|
source code and build tools from their official distribution locations. For use
|
|
|
|
behind a firewall, the specific access needed will depend on which ports are
|
|
|
|
being installed. If you must install it in an "air gapped" environment, consider
|
|
|
|
instaling once in a non-"air gapped" environment, populating an [asset
|
|
|
|
cache](https://learn.microsoft.com/vcpkg/users/assetcaching) shared with the otherwise "air gapped"
|
|
|
|
environment.
|
2020-05-05 12:34:48 -07:00
|
|
|
|
2020-07-07 10:53:14 -07:00
|
|
|
# Telemetry
|
2020-05-05 12:34:48 -07:00
|
|
|
|
2024-07-03 09:42:09 -07:00
|
|
|
vcpkg collects usage data in order to help us improve your experience. The data
|
|
|
|
collected by Microsoft is anonymous. You can opt-out of telemetry by:
|
|
|
|
|
|
|
|
- running the bootstrap-vcpkg script with `-disableMetrics`
|
|
|
|
- passing `--disable-metrics` to vcpkg on the command line
|
|
|
|
- setting the `VCPKG_DISABLE_METRICS` environment variable
|
2020-05-05 12:34:48 -07:00
|
|
|
|
2023-03-06 16:46:35 -07:00
|
|
|
Read more about vcpkg telemetry at [https://learn.microsoft.com/vcpkg/about/privacy](https://learn.microsoft.com/vcpkg/about/privacy).
|