2019-08-29 04:49:29 +08:00
# vcpkg_common_definitions
2021-03-11 01:56:07 +08:00
The latest version of this document lives in the [vcpkg repo ](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_common_definitions.md ).
2021-03-01 05:17:19 +08:00
This file defines the following variabls which are commonly needed or used in portfiles:
2019-08-29 04:49:29 +08:00
```cmake
2020-11-24 01:43:23 +08:00
VCPKG_TARGET_IS_< target > with < target > being one of the following: WINDOWS, UWP, LINUX, OSX, ANDROID, FREEBSD, OPENBSD. only defined if < target >
VCPKG_HOST_IS_< target > with < host > being one of the following: WINDOWS, LINUX, OSX, FREEBSD, OPENBSD. only defined if < host >
2019-12-23 22:10:12 +08:00
VCPKG_HOST_PATH_SEPARATOR Host specific path separator (USAGE: "< something > ${VCPKG_HOST_PATH_SEPARATOR}< something > "; only use and pass variables with VCPKG_HOST_PATH_SEPARATOR within "")
VCPKG_HOST_EXECUTABLE_SUFFIX executable suffix of the host
VCPKG_TARGET_EXECUTABLE_SUFFIX executable suffix of the target
2019-08-29 04:49:29 +08:00
VCPKG_TARGET_STATIC_LIBRARY_PREFIX static library prefix for target (same as CMAKE_STATIC_LIBRARY_PREFIX)
VCPKG_TARGET_STATIC_LIBRARY_SUFFIX static library suffix for target (same as CMAKE_STATIC_LIBRARY_SUFFIX)
VCPKG_TARGET_SHARED_LIBRARY_PREFIX shared library prefix for target (same as CMAKE_SHARED_LIBRARY_PREFIX)
VCPKG_TARGET_SHARED_LIBRARY_SUFFIX shared library suffix for target (same as CMAKE_SHARED_LIBRARY_SUFFIX)
2019-12-23 22:10:12 +08:00
VCPKG_TARGET_IMPORT_LIBRARY_PREFIX import library prefix for target (same as CMAKE_IMPORT_LIBRARY_PREFIX)
VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX import library suffix for target (same as CMAKE_IMPORT_LIBRARY_SUFFIX)
VCPKG_FIND_LIBRARY_PREFIXES target dependent prefixes used for find_library calls in portfiles
VCPKG_FIND_LIBRARY_SUFFIXES target dependent suffixes used for find_library calls in portfiles
2020-07-14 04:43:39 +08:00
VCPKG_SYSTEM_LIBRARIES list of libraries are provide by the toolchain and are not managed by vcpkg
2021-03-11 07:33:16 +08:00
TARGET_TRIPLET the name of the current triplet to build for
CURRENT_INSTALLED_DIR the absolute path to the installed files for the current triplet
HOST_TRIPLET the name of the triplet corresponding to the host
CURRENT_HOST_INSTALLED_DIR the absolute path to the installed files for the host triplet
2019-08-29 04:49:29 +08:00
```
2019-12-23 22:10:12 +08:00
CMAKE_STATIC_LIBRARY_(PREFIX|SUFFIX), CMAKE_SHARED_LIBRARY_(PREFIX|SUFFIX) and CMAKE_IMPORT_LIBRARY_(PREFIX|SUFFIX) are defined for the target
Furthermore the variables CMAKE_FIND_LIBRARY_(PREFIXES|SUFFIXES) are also defined for the target so that
portfiles are able to use find_library calls to discover dependent libraries within the current triplet for ports.
2019-08-29 04:49:29 +08:00
## Source
2021-03-01 05:17:19 +08:00
[scripts/cmake/vcpkg\_common\_definitions.cmake ](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_common_definitions.cmake )