Portfile variable reference
These are variables set automatically by vcpkg for use in any port. They should not be modified by the port.
Full list of variables is defined in the vcpkg_common_definitions module.
The name of the port that is currently being built.
The version of the port that is currently being built.
Does not contain the "port-version".
Defined to a true value if building for <system>.
Supported systems:
VCPKG_TARGET_IS_WINDOWS
(also true for UWP and MinGW)VCPKG_TARGET_IS_UWP
VCPKG_TARGET_IS_MINGW
VCPKG_TARGET_IS_LINUX
VCPKG_TARGET_IS_OSX
VCPKG_TARGET_IS_IOS
VCPKG_TARGET_IS_ANDROID
VCPKG_TARGET_IS_FREEBSD
VCPKG_TARGET_IS_OPENBSD
VCPKG_TARGET_IS_EMSCRIPTEN
Defined to a true value if building on <system>.
Supported systems:
VCPKG_HOST_IS_WINDOWS
VCPKG_HOST_IS_OSX
VCPKG_HOST_IS_LINUX
VCPKG_HOST_IS_FREEBSD
VCPKG_HOST_IS_OPENBSD
Host specific path separator.
Always use quotes when expanding VCPKG_HOST_PATH_SEPARATOR
since it may contain a semicolon. For example:
set(ENV{SOMEPATH} "$ENV{SOMEPATH}${VCPKG_HOST_PATH_SEPARATOR}${my_extra_path}")
Executable suffix for the building system.
This is set to ".exe"
on Windows and ""
on other platforms.
Executable suffix for the built-for system.
This is set to ".exe"
when VCPKG_TARGET_IS_WINDOWS
and ""
otherwise.
Bundle suffix of the building system.
Bundle suffix of the built-for system.
Static library prefix for the built-for system.
See also CMAKE_STATIC_LIBRARY_PREFIX
.
Static library suffix for the built-for system.
See also CMAKE_STATIC_LIBRARY_SUFFIX
.
Shared (dynamic) library prefix for the built-for system.
See also CMAKE_SHARED_LIBRARY_PREFIX
.
Shared (dynamic) library suffix for the built-for system.
See also CMAKE_SHARED_LIBRARY_SUFFIX
.
Import library prefix for the built-for system.
See also CMAKE_IMPORT_LIBRARY_PREFIX
.
Import library suffix for the built-for system.
See also CMAKE_IMPORT_LIBRARY_SUFFIX
.
Prefixes used for find_library()
calls in portfiles.
These are set to
Suffixes used for find_library()
calls in portfiles.
The name of the triplet being built for.
The absolute path to the installed files for the target triplet.
The name of the triplet that matches the building system.
The absolute path to the installed files for the host triplet.
Whether vcpkg is compiling for a different system than the building machine.
This is the same as comparing TARGET_TRIPLET
and HOST_TRIPLET
for equality. If the triplets are different, ports must not assume that they can run the results of a build.
For example, when compiling for Android from MacOS, VCPKG_CROSSCOMPILING
will be set to a true value.
vcpkg feedback
vcpkg is an open source project. Select a link to provide feedback: