diff --git a/vcpkg/users/host-dependencies.md b/vcpkg/users/host-dependencies.md index 81c61128..9b8fcc5f 100644 --- a/vcpkg/users/host-dependencies.md +++ b/vcpkg/users/host-dependencies.md @@ -73,3 +73,19 @@ tool ports are common examples. In this case, you can use the `"native"` supports expression to describe this. This supports expression is true when `VCPKG_CROSSCOMPILING` is false (implying that `TARGET_TRIPLET == HOST_TRIPLET`). + +## VCPKG_USE_HOST_TOOLS + +Set this CMake option to add executables built by vcpkg to +[`CMAKE_PROGRAM_PATH`](https://cmake.org/cmake/help/latest/variable/CMAKE_PROGRAM_PATH.html). +and make them available during your build process. + +For this option to take effect it must be set before any call to `project()` in +your `CMakeLists.txt` file. The `VCPKG_HOST_TRIPLET` variable must also be set. + +Only tools installed in the [`tools` folder](../reference/installation-tree-layout.md#layout-tools) +for the host triplet are added to `CMAKE_PROGRAM_PATH`. +Effectively, the following locations are added: + +* `${VCPKG_INSTALLED/DIR}/${VCPKG_HOST_TRIPLET}/tools` +* `${VCPKG_INSTALLED/DIR}/${VCPKG_HOST_TRIPLET}/tools/*/bin`