aboutsummaryrefslogtreecommitdiff
path: root/docs/users/integration.md
diff options
context:
space:
mode:
authorGriffin Downs <grdowns@microsoft.com>2019-02-27 16:44:17 -0800
committerGriffin Downs <grdowns@microsoft.com>2019-02-27 16:44:17 -0800
commit1908903508bf057ad05d8a344e5bc55477944cb6 (patch)
tree2a23595f1e7d8cc9a6358bfd44a00eb7368d8a1b /docs/users/integration.md
parentb0a2ff18c9f2c9131aed131f5bf0d97c0e23da8e (diff)
parent8564602d06d7c4ce236f96a4f0f3ba7c2d769cb0 (diff)
downloadvcpkg-1908903508bf057ad05d8a344e5bc55477944cb6.tar.gz
vcpkg-1908903508bf057ad05d8a344e5bc55477944cb6.zip
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/grdowns/4802
Diffstat (limited to 'docs/users/integration.md')
-rw-r--r--docs/users/integration.md11
1 files changed, 9 insertions, 2 deletions
diff --git a/docs/users/integration.md b/docs/users/integration.md
index fbaea41d9..6d56c7c70 100644
--- a/docs/users/integration.md
+++ b/docs/users/integration.md
@@ -50,7 +50,7 @@ The `CMAKE_TOOLCHAIN_FILE` setting simply must be set before the `project()` dir
```cmake
if(DEFINED ENV{VCPKG_ROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
- set(CMAKE_TOOLCHAIN_FILE "${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
+ set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
CACHE STRING "")
endif()
@@ -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