Common command options
Most vcpkg commands accept a group of common options that control cross-cutting aspects of the tool. Not all options affect every command. For example, a command that does not download any files will be unaffected by changing the downloads directory.
Note
This section covers an experimental feature of vcpkg which may change or be removed at any time.
Specify the cache configuration for Asset Caching.
Add a source for Binary Caching.
This option can be specified multiple times; see the Binary Caching documentation for how multiple binary sources interact.
Note
This section covers an experimental feature of vcpkg which may change or be removed at any time.
Specifies the temporary path to store intermediate build files, such as objects or unpacked source code.
Defaults to buildtrees/
under the vcpkg root folder.
Forces classic mode even if a manifest file is detected.
Note
This section covers an experimental feature of vcpkg which may change or be removed at any time.
Enables CMake's --debugger
within upstream build systems' CMakeLists.txt
, such as within
vcpkg_cmake_configure
.
The <debugger-pipe>
value is passed as
--debugger-pipe
on the CMake
command line.
If there is a semicolon-separated port list, the debugger is only used for ports in that list. Otherwise, it is used for all ports.
The triplet variable VCPKG_CMAKE_CONFIGURE_OPTIONS
is used to pass the options to the internal CMake configure call.
As such it will not work for custom triplets overwriting VCPKG_CMAKE_CONFIGURE_OPTIONS
.
Either manually pass the debugging options or append your options to VCPKG_CMAKE_CONFIGURE_OPTIONS
instead.
Unlike --x-cmake-debug
there will be no output indicating that the build is waiting for a debugger to connect. The output will simply stall at Configuring <triplet>
.
Although all ports should be calling CMake inside of the portfile to obtain compile flags from the CMake toolchain. This command is mainly useful for ports actually using CMake as their build system.
Note
This section covers an experimental feature of vcpkg which may change or be removed at any time.
Enables CMake's --debugger
while
running directly-invoked CMake scripts like triplet files (for example: x64-windows.cmake
) or portfile.cmake
files.
The <debugger-pipe>
value is passed as
--debugger-pipe
on the CMake
command line.
If there is a semicolon-separated port list, the debugger is only used for ports in that list. Otherwise, it is used for all ports.
Note: The debugger can be attached if Waiting for debugger client to connect...
can be observed in the output of vcpkg and execution is halted until a debugger is connected.
Specify where downloaded tools and source code archives should be kept.
Defaults to the VCPKG_DOWNLOADS
environment variable. If that is unset, defaults to downloads/
under the vcpkg root folder.
This variable can be set to a list of feature flags to opt-in to experimental behavior.
Specify the host triplet.
Defaults to the VCPKG_DEFAULT_HOST_TRIPLET
environment variable. If that is also unset, the value is deduced based on the host architecture and operating system.
Note
This section covers an experimental feature of vcpkg which may change or be removed at any time.
Specifies the path to lay out installed packages.
In Classic mode, defaults to installed/
under
the vcpkg root folder.
In Manifest mode, defaults to vcpkg_installed/
under the manifest folder.
Note
This section covers an experimental feature of vcpkg which may change or be removed at any time.
Specifies the directory containing vcpkg.json
.
Defaults to searching upwards from the current working directory for the nearest
vcpkg.json
.
Specifies a directory either an overlay port, or subdirectories that are themselves overlay-ports. If <path>
is a directory containing a CONTROL
or vcpkg.json
, it is treated as an overlay port directory, and subdirectories will not be considered as additional overlay ports.
This option can be specified multiple times; ports will resolve to the first match.
Specifies a directory containing overlay triplets.
This option can be specified multiple times to add multiple directories; triplets will resolve to the first match by name.
Note
This section covers an experimental feature of vcpkg which may change or be removed at any time.
Specifies the temporary path to stage intermediate package files before final install.
Defaults to packages/
under the vcpkg root folder.
Specify the target architecture triplet.
Defaults to the VCPKG_DEFAULT_TRIPLET
environment variable. If that is unset, deduced based on the host architecture and operating system.
On Windows operating systems, the architecture is always deduced as x86 for legacy reasons.
Note
All releases made in and after September 2023 will default to the host triplet on Windows instead of x86-windows.
Specifies the vcpkg root folder.
Defaults to the directory containing the vcpkg program. The directory must be a valid vcpkg instance, such as a git clone
of https://github.com/microsoft/vcpkg
. This option can be used to run a custom-built copy of the tool directly from the build folder.
The vcpkg command line accepts text files containing newline-separated command line parameters.
The tool will act as though the items in the file were spliced into the command line in place of the @
reference. Response files cannot contain additional response files.
vcpkg feedback
vcpkg is an open source project. Select a link to provide feedback: