2021-09-28 04:27:44 +08:00
# vcpkg_host_path_list
The latest version of this document lives in the [vcpkg repo ](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_host_path_list.md ).
Modify a host path list variable (PATH, INCLUDE, LIBPATH, etc.)
```cmake
vcpkg_host_path_list(PREPEND < list-var > [< path > ...])
vcpkg_host_path_list(APPEND < list-var > [< path > ...])
2021-11-04 12:42:05 +08:00
vcpkg_host_path_list(SET < list-var > [< path > ...])
2021-09-28 04:27:44 +08:00
```
`<list-var>` may be either a regular variable name, or `ENV{variable-name}` ,
in which case `vcpkg_host_path_list` will modify the environment.
`vcpkg_host_path_list` adds all of the paths passed to it to `<list-var>` ;
`PREPEND` puts them before the existing list, so that they are searched first;
`APPEND` places them after the existing list,
2021-11-04 12:42:05 +08:00
so they would be searched after the paths which are already in the variable,
and `SET` replaces the value of the existing list.
2021-09-28 04:27:44 +08:00
2021-11-04 12:42:05 +08:00
For all of `APPEND` , `PREPEND` , and `SET` ,
2021-09-28 04:27:44 +08:00
the paths are added (and thus searched) in the order received.
2021-11-04 12:42:05 +08:00
If no paths are passed to `APPEND` or `PREPEND` , nothing will be done;
for `SET` , the variable will be set to the empty string.
2021-09-28 04:27:44 +08:00
## Source
[scripts/cmake/vcpkg\_host\_path\_list.cmake ](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_host_path_list.cmake )