C++ Library Manager for Windows, Linux, and MacOS
Go to file
Alexander Neumann 35bfef7084
[Qt 6.2] Update Qt6 to 6.2 (#18687)
* [qt6] Update to 6.1.1

* version stuff

* fix empty dir

* update version

* fix casing in qtbase

* [libpq] add secure32.lib on windows

* add clang-cl fix

* version stuff

* fix flag removal by adding a space

* version stuff

* make qt6->Qt6 usage consistent since Qt6 refers to itself as Qt6 with uppercase Q

* fix libpq wrapper opensll linkage on linux

* use policy to fix dependent ports

* version stuff

* use upstream patch

* version stuff

* fix source_location with clang-cl

* version stuff

* add all new modules

* add all modules to the qt port

* push all the ports

* fix patch

* update ports

* split qt_install_submodule into smaller functions

* add qlitehtml submodule to qttools

* update a few ports before moving to beta

* update vcpkg.json and refs and fix issue with update

* fix dependencies

* remove patch

* update to 6.2

* add nodejs to vcpkg_find_acquire_program for qtwebengine

* format manifest.

* fix webengine and see if it builds.

* apply format diff

* add patch

* fix arm builds

* fix linux gcc 7.5 build error

* fix patch

* bump version in qtbase otherwise CI seems to resuse the wrong version

* fix webengine release build

* try fixing gcc 7.5 build

* revert gcc 7.5 fixes since they broke osx

* revert gcc 7.5 fixes since they broke osx

* fix qtimageformats.

* actually enable new qt6 builds.

* fix search path for nodejs.

* fix the webengine patch again.

* fix wrong binary name

* revisit all dependencies

* revisit webengine features and build settings

* more feature stuff

* remove qt6betablock and more features review for qt 6.2

* add missing qt prefix.

* format manifest

* fix ci issues

* format manifest.

* add node on osx.

* install node on linux

* fix a typo and a disable another find_package

* fix mingw build issues and switch to not using tag

* use CMAKE_HOST_WIN32 instead

* update ref

* fix core configure error

* fix mingw case.

* fix script installation

* remove qmake helper scrpt

* delete debug folder if empty

* add vcpkg-tool-nodejs

* revert changes in the pipeline scripts

* adjust qtwebengine to the changes

* format manifest and revert doc changes

* fix message and logic

* fix hashes and make host only port

* fix hash again?

* qttools add linguist feature for crossbuilds

* fix dependency

* add thread and future to concurrent feature

* add assistant as a required host feature
(somebody should tell Qt not to do that)

* fix dependency.

* [skip ci] not a host dep?!?

* [skip ci] debuging

* [skip ci] more debug messages

* [skip ci] try always redownloading

* [skip ci] fix hash und skip hash for redownloading once

* [skip ci] comment out skip sha and redownload

* add vcpkg_fixup_pkgconfig to libvpx

* qtwebengine requires qml and quick

* fix manifest format

* qtwebengine does not support static builds!

* remove unnecessary parts of the patch

* update to beta2

* add some " and a message in update mode

* [skip ci] remove old and reorder patches

* [skip ci] add qtpaths6

* [skip actions] fix webengine patch

* [skip actions] fix a few submodule refs

* [skip actions] fix qtwebengine

* [skip actions] remove qml feature from webengine in qt metaport

* qtdeclarative raise minimum cmake version

* use the tree id instead?

* [skip actions] raise minimum cmake version in qtquick3d

* fix fetching of unadvertised commit ids

* revert changes to vcpkg_from_git

* revert doc changes

* [skip actions] use the new FETCH_REF

* [skip actiosn] remove raise of minimum version to retry with new cmake version

* [skip actions] update to beta3

* revert removal of patch

* update to beta4
remove qtquickcontrols2 deps

* fix missing \

* [skip actions] fix gstreamer feature on windows

* [skip actions]
remove outdated patches
format qtmultimedia

* [skip actions] update to rc1

* [skip actions] remove patch for now

* update refs

* [skip actions] comment patch to try another patch in qtmultimedia

* x86 is not supported by qtwebengine (at least one of its internal third party deps fails due to x64 intrinsics.)

* Finalize for 6.2 release.
Open issues: QtWebengine and cross builds.

* version stuff

* fix semver in qtquickcontrols.

* version stuff

* revise qtwebengine supports expression

* update version
2021-09-30 13:03:56 -07:00
.github vcpkg ci: grep returns -1 when it finds nothing, use || true so that the term returns 0 (#20236) 2021-09-20 08:57:30 -07:00
docs [scripts-audit] vcpkg_fixup_pkgconfig (#19658) 2021-09-27 13:27:44 -07:00
ports [Qt 6.2] Update Qt6 to 6.2 (#18687) 2021-09-30 13:03:56 -07:00
scripts [Qt 6.2] Update Qt6 to 6.2 (#18687) 2021-09-30 13:03:56 -07:00
toolsrc [vcpkg] Download vcpkg.exe rather than building it in bootstrap on Windows. (#15474) 2021-02-04 10:15:44 -08:00
triplets [vcpkg] Add static triplet for arm-windows (#18300) 2021-06-30 13:16:16 -07:00
versions [Qt 6.2] Update Qt6 to 6.2 (#18687) 2021-09-30 13:03:56 -07:00
.gitattributes [vcpkg] Make C++ the primary github language (#12810) 2020-08-10 09:28:50 -07:00
.gitignore [docs registries] Add reference documentation (#17672) 2021-05-06 12:13:29 -07:00
.vcpkg-root Add .vcpkg-root file that signifies the root directory 2016-09-19 18:49:38 -07:00
bootstrap-vcpkg.bat bootstrap.bat now forwards args to ps1 2018-06-08 16:26:57 -07:00
bootstrap-vcpkg.sh [vcpkg] Update to CMake 3.14.0 2019-03-20 16:23:02 -07:00
CHANGELOG.md Actually remove policheck sensitive term. (#20332) 2021-09-27 11:48:53 -07:00
CONTRIBUTING.md Moved CONTRIBUTING.md to root. Fixes #54. 2016-09-21 13:35:51 -07:00
LICENSE.txt [vcpkg] remove text from license (#8082) 2019-09-06 14:24:19 -07:00
NOTICE.txt Add third party notices -- copied from chakracore (#7403) 2019-07-24 11:07:55 -07:00
README_es.md [vcpkg docs] Update Spanish readme (#18655) 2021-07-15 16:20:14 -07:00
README_fr.md [docs] Rename docs/index.md to docs/README.md (#16758) 2021-03-18 15:03:30 -07:00
README_ko_KR.md [README_ko_KR.md] Fix typo for korean doc (#18673) 2021-07-01 07:35:24 -07:00
README_zh_CN.md [docs] Rename docs/index.md to docs/README.md (#16758) 2021-03-18 15:03:30 -07:00
README.md [vcpkg docs] Make telemetry section of README.md clearer (#20412) 2021-09-29 08:41:39 -07:00
shell.nix [vcpkg] Add shell.nix for building on NixOS (#15906) 2021-02-03 11:20:35 -08:00

Vcpkg: Overview

中文总览 Español 한국어 Français

Vcpkg helps you manage C and C++ libraries on Windows, Linux and MacOS. This tool and ecosystem are constantly evolving, and we always appreciate contributions!

If you've never used vcpkg before, or if you're trying to figure out how to use vcpkg, check out our Getting Started section for how to start using vcpkg.

For short description of available commands, once you've installed vcpkg, you can run vcpkg help, or vcpkg help [command] for command-specific help.

Build Status

Table of Contents

Getting Started

First, follow the quick start guide for either Windows, or macOS and Linux, depending on what you're using.

For more information, see Installing and Using Packages. If a library you need is not present in the vcpkg catalog, you can open an issue on the GitHub repo where the vcpkg team and community can see it, and potentially add the port to vcpkg.

After you've gotten vcpkg installed and working, you may wish to add tab completion to your shell.

Finally, if you're interested in the future of vcpkg, check out the manifest guide! This is an experimental feature and will likely have bugs, so try it out and open all the issues!

Quick Start: Windows

Prerequisites:

  • Windows 7 or newer
  • Git
  • Visual Studio 2015 Update 3 or greater with the English language pack

First, download and bootstrap vcpkg itself; it can be installed anywhere, but generally we recommend using vcpkg as a submodule for CMake projects, and installing it globally for Visual Studio projects. We recommend somewhere like C:\src\vcpkg or C:\dev\vcpkg, since otherwise you may run into path issues for some port build systems.

> git clone https://github.com/microsoft/vcpkg
> .\vcpkg\bootstrap-vcpkg.bat

To install the libraries for your project, run:

> .\vcpkg\vcpkg install [packages to install]

Note: This will install x86 libraries by default. To install x64, run:

> .\vcpkg\vcpkg install [package name]:x64-windows

Or

> .\vcpkg\vcpkg install [packages to install] --triplet=x64-windows

You can also search for the libraries you need with the search subcommand:

> .\vcpkg\vcpkg search [search term]

In order to use vcpkg with Visual Studio, run the following command (may require administrator elevation):

> .\vcpkg\vcpkg integrate install

After this, you can now create a New non-CMake Project (or open an existing one). All installed libraries are immediately ready to be #include'd and used in your project without additional configuration.

If you're using CMake with Visual Studio, continue here.

In order to use vcpkg with CMake outside of an IDE, you can use the toolchain file:

> cmake -B [build directory] -S . -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake
> cmake --build [build directory]

With CMake, you will still need to find_package and the like to use the libraries. Check out the CMake section for more information, including on using CMake with an IDE.

For any other tools, including Visual Studio Code, check out the integration guide.

Quick Start: Unix

Prerequisites for Linux:

Prerequisites for macOS:

First, download and bootstrap vcpkg itself; it can be installed anywhere, but generally we recommend using vcpkg as a submodule for CMake projects.

$ git clone https://github.com/microsoft/vcpkg
$ ./vcpkg/bootstrap-vcpkg.sh

To install the libraries for your project, run:

$ ./vcpkg/vcpkg install [packages to install]

You can also search for the libraries you need with the search subcommand:

$ ./vcpkg/vcpkg search [search term]

In order to use vcpkg with CMake, you can use the toolchain file:

$ cmake -B [build directory] -S . -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake
$ cmake --build [build directory]

With CMake, you will still need to find_package and the like to use the libraries. Check out the CMake section for more information on how best to use vcpkg with CMake, and CMake Tools for VSCode.

For any other tools, check out the integration guide.

Installing Linux Developer Tools

Across the different distros of Linux, there are different packages you'll need to install:

  • Debian, Ubuntu, popOS, and other Debian-based distributions:
$ sudo apt-get update
$ sudo apt-get install build-essential tar curl zip unzip
  • CentOS
$ sudo yum install centos-release-scl
$ sudo yum install devtoolset-7
$ scl enable devtoolset-7 bash

For any other distributions, make sure you're installing g++ 6 or above. If you want to add instructions for your specific distro, please open a PR!

Installing macOS Developer Tools

On macOS 10.15, the only thing you should need to do is run the following in your terminal:

$ xcode-select --install

Then follow along with the prompts in the windows that comes up.

On macOS 10.14 and previous, you'll also need to install g++ from homebrew; follow the instructions in the following section.

Installing GCC for macOS before 10.15

This will only be necessary if you're using a macOS version from before 10.15. Installing homebrew should be very easy; check out <brew.sh> for more information, but at its simplest, run the following command:

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Then, in order to grab an up-to-date version of gcc, run the following:

$ brew install gcc

You'll then be able to bootstrap vcpkg along with the quick start guide

Using vcpkg with CMake

If you're using vcpkg with CMake, the following may help!

Visual Studio Code with CMake Tools

Adding the following to your workspace settings.json will make CMake Tools automatically use vcpkg for libraries:

{
  "cmake.configureSettings": {
    "CMAKE_TOOLCHAIN_FILE": "[vcpkg root]/scripts/buildsystems/vcpkg.cmake"
  }
}

Vcpkg with Visual Studio CMake Projects

Open the CMake Settings Editor, and under CMake toolchain file, add the path to the vcpkg toolchain file:

[vcpkg root]/scripts/buildsystems/vcpkg.cmake

Vcpkg with CLion

Open the Toolchains settings (File > Settings on Windows and Linux, CLion > Preferences on macOS), and go to the CMake settings (Build, Execution, Deployment > CMake). Finally, in CMake options, add the following line:

-DCMAKE_TOOLCHAIN_FILE=[vcpkg root]/scripts/buildsystems/vcpkg.cmake

Unfortunately, you'll have to add this to each profile.

Vcpkg as a Submodule

When using vcpkg as a submodule of your project, you can add the following to your CMakeLists.txt before the first project() call, instead of passing CMAKE_TOOLCHAIN_FILE to the cmake invocation.

set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake
  CACHE STRING "Vcpkg toolchain file")

This will still allow people to not use vcpkg, by passing the CMAKE_TOOLCHAIN_FILE directly, but it will make the configure-build step slightly easier.

Tab-Completion/Auto-Completion

vcpkg supports auto-completion of commands, package names, and options in both powershell and bash. To enable tab-completion in the shell of your choice, run:

> .\vcpkg integrate powershell

or

$ ./vcpkg integrate bash

depending on the shell you use, then restart your console.

Examples

See the documentation for specific walkthroughs, including installing and using a package, adding a new package from a zipfile, and adding a new package from a GitHub repo.

Our docs are now also available online at our website https://vcpkg.io/. We really appreciate any and all feedback! You can submit an issue in https://github.com/vcpkg/vcpkg.github.io/issues.

See a 4 minute video demo.

Contributing

Vcpkg is an open source project, and is thus built with your contributions. Here are some ways you can contribute:

Please refer to our Contributing Guide for more details.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or email opencode@microsoft.com with any additional questions or comments.

License

The code in this repository is licensed under the MIT License.

Telemetry

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

Read more about vcpkg telemetry at docs/about/privacy.md