aboutsummaryrefslogtreecommitdiff
path: root/docs/users/integration.md
diff options
context:
space:
mode:
authorPhil Christensen <philc@microsoft.com>2019-02-27 11:56:29 -0800
committerPhil Christensen <philc@microsoft.com>2019-02-27 11:56:29 -0800
commit2cc7fa27e57f1129d1f37ccb009563509ca25720 (patch)
tree3c75e423b71e54f6f65ec085c5d3d190d9d0d1a9 /docs/users/integration.md
parent3830517ec7519b823f5d8c404710889c6bd00278 (diff)
parent2dfa568d186e4f0d199040929f9b3e44f27c8943 (diff)
downloadvcpkg-2cc7fa27e57f1129d1f37ccb009563509ca25720.tar.gz
vcpkg-2cc7fa27e57f1129d1f37ccb009563509ca25720.zip
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/philc/5254
Diffstat (limited to 'docs/users/integration.md')
-rw-r--r--docs/users/integration.md9
1 files changed, 8 insertions, 1 deletions
diff --git a/docs/users/integration.md b/docs/users/integration.md
index 10f5574c1..6d56c7c70 100644
--- a/docs/users/integration.md
+++ b/docs/users/integration.md
@@ -135,9 +135,16 @@ To override the automatically chosen [triplet][], you can specify the MSBuild pr
```
#### With CMake
-Simply set `VCPKG_TARGET_TRIPLET` on the configure line.
+You can set `VCPKG_TARGET_TRIPLET` on the configure line:
```no-highlight
cmake ../my/project -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_TOOLCHAIN_FILE=...
```
+If you use `VCPKG_DEFAULT_TRIPLET` [environment variable](config-environment.md) to contoll the unqualified triplet in vcpkg command lines you can default `VCPKG_TARGET_TRIPLET` in CMake like [Using an environment variable instead of a command line option](#using-an-environment-variable-instead-of-a-command-line-option):
+
+```cmake
+if(DEFINED ENV{VCPKG_DEFAULT_TRIPLET} AND NOT DEFINED VCPKG_TARGET_TRIPLET)
+ set(VCPKG_TARGET_TRIPLET "$ENV{VCPKG_DEFAULT_TRIPLET}" CACHE STRING "")
+endif()
+```
[triplet]: triplets.md